From ecba9deb83af9b867bb3034f0235420c8f22cd18 Mon Sep 17 00:00:00 2001 From: x3Karma Date: Wed, 29 Dec 2021 12:47:56 +0800 Subject: Add Round Winning Kill Replay for Infection --- Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | 3 ++- 1 file changed, 2 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 ee6c2c0a..2e3f03ad 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut @@ -10,6 +10,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 ) @@ -188,4 +189,4 @@ int function TimeoutCheckSurvivors() bool function InfectionShouldPlayerStartBleedout( entity player, var damageInfo ) { return player.GetTeam() != INFECTION_TEAM_INFECTED -} \ No newline at end of file +} -- cgit v1.2.3 From 38b3a6efddbe19af38b4d75406f4794d3f8b2c7f Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Thu, 30 Dec 2021 02:12:52 +0000 Subject: speedball and dropship crash fixes --- Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut | 4 ++-- .../mod/scripts/vscripts/gamemodes/sh_gamemode_fw_custom.nut | 2 -- .../mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut | 4 +++- .../mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'Northstar.Custom/mod/scripts/vscripts') diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index 25097c6f..ecb34d47 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -502,9 +502,9 @@ void function TryUnlockNorthstarButton() // unlock "Launch Northstar" button until you're authed with masterserver, are allowing insecure auth, or 7.5 seconds have passed float time = Time() - while ( Time() < time + 7.5 || GetConVarInt( "ns_has_agreed_to_send_token" ) != NS_AGREED_TO_SEND_TOKEN ) + while ( GetConVarInt( "ns_has_agreed_to_send_token" ) != NS_AGREED_TO_SEND_TOKEN ) { - if ( NSIsMasterServerAuthenticated() || GetConVarBool( "ns_auth_allow_insecure" ) ) + if ( ( NSIsMasterServerAuthenticated() && IsStryderAllowingMP() ) || GetConVarBool( "ns_auth_allow_insecure" ) ) break WaitFrame() 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 diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut index cef0af6b..22c660d8 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut @@ -103,7 +103,9 @@ void function DropFlag() file.flag.ClearParent() file.flag.SetAngles( < 0, 0, 0 > ) SetGlobalNetEnt( "flagCarrier", file.flag ) - EmitSoundOnEntityOnlyToPlayer( file.flagCarrier, file.flagCarrier, "UI_CTF_1P_FlagDrop" ) + + if ( IsValid( file.flagCarrier ) ) + EmitSoundOnEntityOnlyToPlayer( file.flagCarrier, file.flagCarrier, "UI_CTF_1P_FlagDrop" ) foreach ( entity player in GetPlayerArray() ) MessageToPlayer( player, eEventNotifications.SPEEDBALL_FlagDropped, file.flagCarrier ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut index 78dec3d1..d3b4cd7e 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut @@ -125,6 +125,8 @@ void function EndIntroWhenFinished() void function SpawnPlayerIntoDropship( entity player ) { + player.EndSignal( "OnDestroy" ) + if ( IsAlive( player ) ) player.Die() // kill them so we don't have any issues respawning them later @@ -148,7 +150,6 @@ void function SpawnPlayerIntoDropship( entity player ) WaitFrame() player.EndSignal( "OnDeath" ) - player.EndSignal( "OnDestroy" ) // find the player's dropship and seat array teamDropships -- cgit v1.2.3 From 19f0d89e2160d0c152cf127e6bb102d7f872777a Mon Sep 17 00:00:00 2001 From: x3Karma Date: Thu, 30 Dec 2021 14:33:01 +0800 Subject: Prevents setting last survivor again when new player connects --- Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut | 5 ++++- 1 file changed, 4 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 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 playersToNotifyOfInfection } file @@ -70,7 +71,7 @@ void function InfectPlayer( entity player ) array 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() -- cgit v1.2.3