aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts
diff options
context:
space:
mode:
authorx3Karma <juliuslimck@gmail.com>2022-07-21 08:30:10 +0800
committerGitHub <noreply@github.com>2022-07-21 02:30:10 +0200
commita7df0676bfc21eb9471aa4f486b0383b533a1317 (patch)
treea45c8b0b504baf56563c1f11910abbfc7aad394e /Northstar.CustomServers/mod/scripts
parentef30d11ccada0a708366245ab9aa87e6c4fbede9 (diff)
downloadNorthstarMods-a7df0676bfc21eb9471aa4f486b0383b533a1317.tar.gz
NorthstarMods-a7df0676bfc21eb9471aa4f486b0383b533a1317.zip
Prevent crashing when an NPC titan kills a player or tries to earn score in Attrition (#425)v1.9.2-rc1
* Small Fix towards Attrition * Update again after having more thoughts
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut6
1 files changed, 5 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut
index 9a94b848..fae778d6 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut
@@ -78,6 +78,10 @@ void function HandleScoreEvent( entity victim, entity attacker, var damageInfo )
// Hacked spectre filter
if ( victim.GetOwner() == attacker )
return
+
+ // NPC titans without an owner player will not count towards any team's score
+ if ( attacker.IsNPC() && attacker.IsTitan() && !IsValid( GetPetTitanOwner( attacker ) ) )
+ return
// Split score so we can check if we are over the score max
// without showing the wrong value on client
@@ -507,4 +511,4 @@ void function AITdm_CleanupBoredNPCThread( entity guy )
print( "cleaning up bored npc: " + guy + " from team " + guy.GetTeam() )
guy.Destroy()
-} \ No newline at end of file
+}