From 2e5e740558719f53cd29c979d9f78c0f9e03dbc1 Mon Sep 17 00:00:00 2001 From: x3Karma Date: Thu, 2 Mar 2023 07:59:41 +0800 Subject: Infection Bug Fixes (sonar warning and late joiners) (#454) * General Infection Bug Fixes Last player alive gets a warning that they are visible to all infected * Taken Gecko's suggestion instead. Late joiners before first infected spawn as survivors --- Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Northstar.Custom/mod/scripts/vscripts') diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut index 35e034cc..fef4c8b6 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut @@ -29,7 +29,7 @@ void function GamemodeInfection_Init() void function InfectionInitPlayer( entity player ) { - if ( GetGameState() < eGameState.Playing ) + if ( GetGameState() < eGameState.Playing || !file.hasHadFirstInfection ) // per Gecko's suggestion, make anyone joining before first infected to stay as survivor instead SetTeam( player, INFECTION_TEAM_SURVIVOR ) else InfectPlayer( player ) @@ -185,6 +185,8 @@ void function SetLastSurvivor( entity player ) Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_AnnounceLastSurvivor", player.GetEncodedEHandle() ) Highlight_SetEnemyHighlight( player, "enemy_sonar" ) + StatusEffect_AddEndless( player, eStatusEffect.sonar_detected, 1.0 ) // sonar is better here so the player themselves see the SONAR DETECTED warning. + if ( SpawnPoints_GetTitan().len() > 0 ) thread CreateTitanForPlayerAndHotdrop( player, GetTitanReplacementPoint( player, false ) ) -- cgit v1.2.3