From 32f3324a1743d1a958b40abc8a9f7c4e3b06351f Mon Sep 17 00:00:00 2001 From: x3Karma Date: Mon, 10 Jan 2022 21:24:05 +0800 Subject: Fix registering kills during epilogue (#82) * Fix Pilots vs Pilots registering kills during epilogue * Fix Skirmish counting kills uring epilogue * Fix Titan Brawl counting score during epilogue (if available) --- .../mod/scripts/vscripts/gamemodes/_gamemode_ps.nut | 4 ++-- .../mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut | 4 ++-- .../mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Northstar.CustomServers/mod/scripts') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut index 4f05d87a5..94aff34a8 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut @@ -30,7 +30,7 @@ void function GamemodePs_Init() void function GiveScoreForPlayerKill( entity victim, entity attacker, var damageInfo ) { - if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() || GetGameState() != eGameState.Playing ) + if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() && GetGameState() == eGameState.Playing ) AddTeamScore( attacker.GetTeam(), 1 ) } @@ -218,4 +218,4 @@ void function RateSpawnpoints_SpawnZones( int checkClass, array spawnpoi spawn.CalculateRating( checkClass, player.GetTeam(), rating, rating ) } -} \ No newline at end of file +} diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut index ba1807900..5a7b7d771 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut @@ -10,7 +10,7 @@ void function GamemodeTdm_Init() void function GiveScoreForPlayerKill( entity victim, entity attacker, var damageInfo ) { - if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() || GetGameState() != eGameState.Playing ) + if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() && GetGameState() == eGameState.Playing ) AddTeamScore( attacker.GetTeam(), 1 ) } @@ -28,4 +28,4 @@ int function CheckScoreForDraw() return TEAM_MILITIA return TEAM_UNASSIGNED -} \ No newline at end of file +} diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut index 417d0fbfd..3102326cd 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut @@ -71,7 +71,7 @@ void function PlayerWatchesTTDMIntroIntermissionCam( entity player ) void function AddTeamScoreForPlayerKilled( entity victim, entity attacker, var damageInfo ) { - if ( victim == attacker || !victim.IsPlayer() || !attacker.IsPlayer() || GetGameState() != eGameState.Playing ) + if ( victim == attacker || !victim.IsPlayer() || !attacker.IsPlayer() && GetGameState() == eGameState.Playing ) return AddTeamScore( GetOtherTeam( victim.GetTeam() ), 1 ) @@ -85,4 +85,4 @@ int function CheckScoreForDraw() return TEAM_MILITIA return TEAM_UNASSIGNED -} \ No newline at end of file +} -- cgit v1.2.3