diff options
author | F1F7Y <64418963+F1F7Y@users.noreply.github.com> | 2021-12-30 23:52:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-30 23:52:05 +0100 |
commit | 66ddb8c0afd4b91f0dbdc35dd4a4cac5d28dcca5 (patch) | |
tree | 2b8fe2d0fc65af16ba57cdc4163ef16030fdf841 /Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | |
parent | 8ea10a9e5c32daac938b0672efa13e7401968f0b (diff) | |
parent | aed2841ebbecb6376f00bf190503ce5c694f9fa4 (diff) | |
download | NorthstarMods-66ddb8c0afd4b91f0dbdc35dd4a4cac5d28dcca5.tar.gz NorthstarMods-66ddb8c0afd4b91f0dbdc35dd4a4cac5d28dcca5.zip |
Merge branch 'R2Northstar:main' into main
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut index ee6c2c0a0..a0e0b7431 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 @@ -10,6 +11,7 @@ void function GamemodeInfection_Init() SetSpawnpointGamemodeOverride( FFA ) SetLoadoutGracePeriodEnabled( false ) // prevent modifying loadouts with grace period SetWeaponDropsEnabled( false ) + SetShouldUseRoundWinningKillReplay( true ) Riff_ForceTitanAvailability( eTitanAvailability.Never ) Riff_ForceBoostAvailability( eBoostAvailability.Disabled ) ClassicMP_ForceDisableEpilogue( true ) @@ -69,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 ) @@ -175,6 +177,8 @@ void function SetLastSurvivor( entity player ) if ( GameTime_TimeLeftSeconds() > 45 ) SetServerVar( "gameEndTime", Time() + 45.0 ) + + file.hasHadLastInfection = true } int function TimeoutCheckSurvivors() @@ -188,4 +192,4 @@ int function TimeoutCheckSurvivors() bool function InfectionShouldPlayerStartBleedout( entity player, var damageInfo ) { return player.GetTeam() != INFECTION_TEAM_INFECTED -}
\ No newline at end of file +} |