mirror of
https://github.com/BubbaGumpShrump/AutoTrackR2.git
synced 2025-05-18 07:05:29 +00:00
Fix passenger vs player bug.
This commit is contained in:
parent
2d5d1f9f99
commit
52d5e6cc37
1 changed files with 6 additions and 6 deletions
|
@ -114,7 +114,6 @@ if (Test-Path "$scriptFolder\Kill-Log.csv") {
|
||||||
$killDate = [datetime]::parseExact($kill.KillTime, $dateFormat, $null)
|
$killDate = [datetime]::parseExact($kill.KillTime, $dateFormat, $null)
|
||||||
If ($killdate.year -eq $currentDate.Year -and $killdate.month -eq $currentDate.Month) {
|
If ($killdate.year -eq $currentDate.Year -and $killdate.month -eq $currentDate.Month) {
|
||||||
$global:killTally++
|
$global:killTally++
|
||||||
|
|
||||||
}
|
}
|
||||||
Try {
|
Try {
|
||||||
Write-Output "NewKill=throwaway,$($kill.EnemyPilot),$($kill.EnemyShip),$($kill.OrgAffiliation),$($kill.Enlisted),$($kill.RecordNumber),$($kill.KillTime), $($kill.PFP)"
|
Write-Output "NewKill=throwaway,$($kill.EnemyPilot),$($kill.EnemyShip),$($kill.OrgAffiliation),$($kill.Enlisted),$($kill.RecordNumber),$($kill.KillTime), $($kill.PFP)"
|
||||||
|
@ -205,11 +204,12 @@ function Read-LogEntry {
|
||||||
if ($null -eq (Get-Process -ID $parentApp -ErrorAction SilentlyContinue)) {
|
if ($null -eq (Get-Process -ID $parentApp -ErrorAction SilentlyContinue)) {
|
||||||
Stop-Process -Id $PID -Force
|
Stop-Process -Id $PID -Force
|
||||||
}
|
}
|
||||||
|
If ($enemyShip -ne "Player"){
|
||||||
If ($enemyShip -eq $global:lastKill -and $global:lastKill -ne "Player"){
|
If ($enemyShip -eq $global:lastKill){
|
||||||
$enemyShip = "Passenger"
|
$enemyShip = "Passenger"
|
||||||
} Else {
|
} Else {
|
||||||
$global:lastKill = $enemyShip
|
$global:lastKill = $enemyShip
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
If ($player -eq $global:userName -and $enemyPilot -ne $global:userName){
|
If ($player -eq $global:userName -and $enemyPilot -ne $global:userName){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue