From ef5c3d408ddf8fd64445e30b3106543a9a925baa Mon Sep 17 00:00:00 2001 From: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Thu, 21 Jul 2022 23:00:41 +0100 Subject: [FD] Fixing another mortar spectre crash (#444) --- .../mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Northstar.CustomServers/mod/scripts/vscripts') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut index 13cbde6b..df391a88 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut @@ -72,9 +72,13 @@ void function MortarSpectreSquadThink( array< entity > spectres, entity harveste // wait for setup timer while ( Time() < setupEndTime ) { - WaitFrame() + if ( !IsValid( squadMarker ) ) + { + break + } float timeRemainingFrac = ( setupEndTime - Time() ) / GetCurrentPlaylistVarFloat( "fd_mortar_spectre_setup_time", 5 ) // default to 5 seconds squadMarker.SetShieldHealth( ( 1 - timeRemainingFrac ) * MORTAR_SPECTRE_TRACKER_SHIELD_MAX ) + WaitFrame() } -- cgit v1.2.3