diff --git a/AutoTrackR2/AutoTrackR2.csproj b/AutoTrackR2/AutoTrackR2.csproj index a5b39da..d49ceef 100644 --- a/AutoTrackR2/AutoTrackR2.csproj +++ b/AutoTrackR2/AutoTrackR2.csproj @@ -23,7 +23,6 @@ <None Remove="config.ini" /> <None Remove="Fonts\Orbitron-Bold.ttf" /> <None Remove="Fonts\Roboto-Regular.ttf" /> - <None Remove="kill-log.csv" /> <None Remove="KillTrackR_MainScript.ps1" /> </ItemGroup> @@ -69,7 +68,6 @@ <Resource Include="Fonts\Roboto-Regular.ttf"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Resource> - <Resource Include="kill-log.csv" /> <EmbeddedResource Include="KillTrackR_MainScript.ps1"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> diff --git a/AutoTrackR2/KillTrackR_MainScript.ps1 b/AutoTrackR2/KillTrackR_MainScript.ps1 index f69c74a..895c6d1 100644 --- a/AutoTrackR2/KillTrackR_MainScript.ps1 +++ b/AutoTrackR2/KillTrackR_MainScript.ps1 @@ -219,7 +219,7 @@ function Read-LogEntry { if ($ship -notmatch $shipManPattern){ $ship = "Player" } - If ($enemyShip -notmatch $shipManPattern) { + If ($enemyShip -notmatch $shipManPattern -or $enemyShip -notlike "Passenger" ) { $enemyShip = "Player" } @@ -359,7 +359,7 @@ function Read-LogEntry { } # Record video - if ($recording -eq $true -and $enemyShip -ne "Passenger"){ + if ($videoRecord -eq $true -and $enemyShip -ne "Passenger"){ # send keybind for windows game bar recording Start-Sleep 2 $sleeptimer = $sleeptimer -9 @@ -367,10 +367,10 @@ function Read-LogEntry { Start-Sleep 7 $latestFile = Get-ChildItem -Path $videoPath | Where-Object { -not $_.PSIsContainer } | Sort-Object CreationTime -Descending | Select-Object -First 1 - # Check if the latest file is no more than 10 seconds old + # Check if the latest file is no more than 30 seconds old if ($latestFile) { $fileAgeInSeconds = (New-TimeSpan -Start $latestFile.CreationTime -End (Get-Date)).TotalSeconds - if ($fileAgeInSeconds -le 10) { + if ($fileAgeInSeconds -le 30) { # Generate a timestamp in ddMMMyyyy-HH:mm format $timestamp = (Get-Date).ToString("ddMMMyyyy-HHmm") diff --git a/AutoTrackR2/UpdatePage.xaml.cs b/AutoTrackR2/UpdatePage.xaml.cs index 83af17c..068b11b 100644 --- a/AutoTrackR2/UpdatePage.xaml.cs +++ b/AutoTrackR2/UpdatePage.xaml.cs @@ -189,7 +189,7 @@ namespace AutoTrackR2 var processStartInfo = new System.Diagnostics.ProcessStartInfo { FileName = "msiexec", - Arguments = $"/i \"{installerPath}\" /norestart", // Silent install with no restart + Arguments = $"/i \"{installerPath}\" /norestart REINSTALLMODE=amus", // Silent install with no restart UseShellExecute = true, // Ensures that the process runs in the background CreateNoWindow = true // Hides the command prompt window }; diff --git a/AutoTrackR2/kill-log.csv b/AutoTrackR2/kill-log.csv deleted file mode 100644 index e69de29..0000000