aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2022-07-21 23:00:41 +0100
committerGitHub <noreply@github.com>2022-07-22 00:00:41 +0200
commitef5c3d408ddf8fd64445e30b3106543a9a925baa (patch)
tree5f4a9b1c0f9954e3fa4694950f0be83ca93d3faa /Northstar.CustomServers/mod/scripts/vscripts
parent39e75408ca8884078424f20ae01d038bb1aaec79 (diff)
downloadNorthstarMods-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.gnut6
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()
}