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 | |
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')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | 8 | ||||
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fw_custom.nut | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut index ee6c2c0a..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 @@ -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 +} diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fw_custom.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fw_custom.nut index 8c6e3f63..ca238d5d 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fw_custom.nut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fw_custom.nut @@ -13,8 +13,6 @@ void function SHCreateGamemodeFW_Init() void function CreateGamemodeFW() { - //entity e = CreateEntity("npc_turret_mega"); SetAISettingsWrapper( e, "npc_turret_mega_fortwar" ); e.SetOrigin(GetPlayerArray()[0].GetOrigin()); SetTeam(e,3); DispatchSpawn(e) - // we have to manually add the client/shared scripts to scripts.rson atm so we need to prevent compile errors when they aren't included // best way to do this is to just ignore this whole block for now and wait until we don't have to add them manually |