aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-30 19:09:27 +0000
committerGitHub <noreply@github.com>2021-12-30 19:09:27 +0000
commit042ce0e735a67db0f956c1b7e9951ce56d44ec5f (patch)
tree851b4bb4c1d7a669b8a0c6eb1dee5c46ac81cb50 /Northstar.Custom
parent15665a52bec2b0a6707569c7f27a8d65b34138de (diff)
parent19f0d89e2160d0c152cf127e6bb102d7f872777a (diff)
downloadNorthstarMods-042ce0e735a67db0f956c1b7e9951ce56d44ec5f.tar.gz
NorthstarMods-042ce0e735a67db0f956c1b7e9951ce56d44ec5f.zip
Merge pull request #35 from x3Karma/main
Actually put the files in the correct location
Diffstat (limited to 'Northstar.Custom')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut5
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()