diff options
author | Bobbyperson <bobbyperson12345@gmail.com> | 2024-08-19 05:33:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 11:33:06 +0200 |
commit | 984a30c99842fd40769ddcf49070a99d10489727 (patch) | |
tree | 498f48a347d028a87ad955ff18bb2b37d20ff5a5 /Northstar.CustomServers/mod/scripts | |
parent | d92378f23f92c70d1ffe572cd4064b5c2515ff93 (diff) | |
download | NorthstarMods-1.27.X.tar.gz NorthstarMods-1.27.X.zip |
Fix Attrition SquadHandler crash (#839)v1.27.3-rc3v1.27.3-rc21.27.X
Adds an `IsAlive()` check to temporarily handle a rare crash
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut index 7d73c926..cacb54cf 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_aitdm.nut @@ -435,9 +435,12 @@ void function SquadHandler( array<entity> guys ) // Setup AI, first assault point foreach ( guy in guys ) { - guy.EnableNPCFlag( NPC_ALLOW_PATROL | NPC_ALLOW_INVESTIGATE | NPC_ALLOW_HAND_SIGNALS | NPC_ALLOW_FLEE ) - guy.AssaultPoint( point ) - guy.AssaultSetGoalRadius( 1600 ) // 1600 is minimum for npc_stalker, works fine for others + if ( IsAlive( guy ) ) + { + guy.EnableNPCFlag( NPC_ALLOW_PATROL | NPC_ALLOW_INVESTIGATE | NPC_ALLOW_HAND_SIGNALS | NPC_ALLOW_FLEE ) + guy.AssaultPoint( point ) + guy.AssaultSetGoalRadius( 1600 ) // 1600 is minimum for npc_stalker, works fine for others + } //thread AITdm_CleanupBoredNPCThread( guy ) } |