diff options
author | Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2022-07-21 23:00:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-22 00:00:41 +0200 |
commit | ef5c3d408ddf8fd64445e30b3106543a9a925baa (patch) | |
tree | 5f4a9b1c0f9954e3fa4694950f0be83ca93d3faa /Northstar.CustomServers/mod/scripts/vscripts | |
parent | 39e75408ca8884078424f20ae01d038bb1aaec79 (diff) | |
download | NorthstarMods-ef5c3d408ddf8fd64445e30b3106543a9a925baa.tar.gz NorthstarMods-ef5c3d408ddf8fd64445e30b3106543a9a925baa.zip |
[FD] Fixing another mortar spectre crash (#444)
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut | 6 |
1 files changed, 5 insertions, 1 deletions
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() } |