diff options
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/ai')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut | 15 |
1 files changed, 8 insertions, 7 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 df391a88..a136c2c9 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_mortar_spectres.gnut @@ -110,13 +110,12 @@ void function MortarSpectreAttack( entity spectre, entity harvester, entity sign while( true ) { - entity weapon = spectre.GetActiveWeapon() - - while ( weapon.IsWeaponOffhand() ) - { - WaitFrame() - weapon = spectre.GetActiveWeapon() - } + array<entity> weapons = spectre.GetMainWeapons() + if ( weapons.len() == 0 ) + break + entity weapon = weapons[0] + if ( !IsValid( weapon ) ) + break originalWeaponClassName = weapon.GetWeaponClassName() originalWeaponMods = weapon.GetMods() @@ -131,6 +130,8 @@ void function MortarSpectreAttack( entity spectre, entity harvester, entity sign wait MORTAR_SPECTRE_REENGAGE_DELAY + if ( !IsValid( spectre ) ) + break } } |