diff options
Diffstat (limited to 'Northstar.Custom/mod')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut index 2e3f03ad..a0e0b743 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut @@ -2,6 +2,7 @@ global function GamemodeInfection_Init struct { bool hasHadFirstInfection = false + bool hasHadLastInfection = false array<entity> playersToNotifyOfInfection } file @@ -70,7 +71,7 @@ void function InfectPlayer( entity player ) array<entity> survivors = GetPlayerArrayOfTeam( INFECTION_TEAM_SURVIVOR ) if ( survivors.len() == 0 ) SetWinner( INFECTION_TEAM_INFECTED ) - else if ( survivors.len() == 1 ) + else if ( survivors.len() == 1 && !file.hasHadLastInfection ) SetLastSurvivor( survivors[ 0 ] ) if ( !file.hasHadFirstInfection ) @@ -176,6 +177,8 @@ void function SetLastSurvivor( entity player ) if ( GameTime_TimeLeftSeconds() > 45 ) SetServerVar( "gameEndTime", Time() + 45.0 ) + + file.hasHadLastInfection = true } int function TimeoutCheckSurvivors() |