From f9e56b5908800625a44a3b943ca66e4afd188fdf Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 5 Jan 2022 03:45:38 +0100 Subject: Hide death from scoreboard when playerDeathHidden is true This fixes the scoreboard showing a death when player survived a round in roundbased gamemodes --- .../mod/scripts/vscripts/mp/_base_gametype_mp.gnut | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Northstar.CustomServers/mod') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut index b8cd67ad..713cd1b5 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut @@ -261,7 +261,7 @@ void function PostDeathThread_MP( entity player, var damageInfo ) // based on ga player.SetNoTargetSmartAmmo( false ) player.ClearExtraWeaponMods() - player.AddToPlayerGameStat( PGS_DEATHS, 1 ) + if ( player.IsTitan() ) SoulDies( player.GetTitanSoul(), damageInfo ) // cleanup some titan stuff, no idea where else to put this @@ -303,7 +303,10 @@ void function PostDeathThread_MP( entity player, var damageInfo ) // based on ga player.SetObserverTarget( null ) if ( !file.playerDeathsHidden ) + { + player.AddToPlayerGameStat( PGS_DEATHS, 1 ) Remote_CallFunction_NonReplay( player, "ServerCallback_YouDied", attacker.GetEncodedEHandle(), GetHealthFrac( attacker ), methodOfDeath ) + } float deathcamLength = GetDeathCamLength( player ) wait deathcamLength -- cgit v1.2.3 From f0e833da58233c0bb6bf7aa92b8c105448d72343 Mon Sep 17 00:00:00 2001 From: x3Karma Date: Fri, 7 Jan 2022 16:16:25 +0800 Subject: ClearLastAttacker added after respawning to prevent any method of suicide to continue crediting the previous killer. --- Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Northstar.CustomServers/mod') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut index b8cd67ad..69274062 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut @@ -222,6 +222,7 @@ void function CodeCallback_OnPlayerRespawned( entity player ) player.SetPredictionEnabled( true ) Loadouts_TryGivePilotLoadout( player ) SetHumanRagdollImpactTable( player ) + ClearLastAttacker( player ) // so dying to anything doesn't credit the same attacker after respawning foreach ( entity weapon in player.GetMainWeapons() ) weapon.SetProScreenOwner( player ) @@ -630,4 +631,4 @@ float function GetTitanBuildTime(entity player) void function TitanPlayerHotDropsIntoLevel( entity player ) { -} \ No newline at end of file +} -- cgit v1.2.3