diff options
author | RoyalBlue1 <malte.hoermeyer@web.de> | 2022-07-22 00:11:40 +0200 |
---|---|---|
committer | RoyalBlue1 <malte.hoermeyer@web.de> | 2022-07-22 00:11:40 +0200 |
commit | 3376f726e962b97d798b3a7e7f03ccfe45cfe971 (patch) | |
tree | 65c855f672693612c35b117c9c6dd015398444c5 /Northstar.CustomServers/mod/scripts/vscripts/ai | |
parent | ef5c3d408ddf8fd64445e30b3106543a9a925baa (diff) | |
download | NorthstarMods-3376f726e962b97d798b3a7e7f03ccfe45cfe971.tar.gz NorthstarMods-3376f726e962b97d798b3a7e7f03ccfe45cfe971.zip |
Fix Turret dying
Fix Turret when Damage was exactly Health
Some Formatting fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/ai')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut index 9d3aabbc..5961d839 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/ai/_ai_turret.gnut @@ -26,31 +26,31 @@ void function SetUsePromptForPanel( var panel, var turret ) } -void function RevivableTurret_DamageCallback(entity turret,var damageInfo) +void function RevivableTurret_DamageCallback( entity turret, var damageInfo ) { - if(turret.GetHealth()<DamageInfo_GetDamage(damageInfo)) + if( turret.GetHealth() <= DamageInfo_GetDamage( damageInfo ) ) { - turret.SetHealth(1) + turret.SetHealth( 1 ) turret.SetUsable() - turret.SetUsableByGroup("pilot") - turret.SetUsePrompts("#TURRET_WAKEUP_HOLD_USE","#TURRET_WAKEUP_PRESS_USE") + turret.SetUsableByGroup( "pilot" ) + turret.SetUsePrompts( "#TURRET_WAKEUP_HOLD_USE", "#TURRET_WAKEUP_PRESS_USE" ) turret.useFunction = RevivableTurret_UseFunction - thread RevivableTurret_Kill(turret) - DamageInfo_SetDamage(damageInfo,0.0) + thread RevivableTurret_Kill( turret ) + DamageInfo_SetDamage( damageInfo, 0.0 ) } } -function RevivableTurret_UseFunction(player,turret) +function RevivableTurret_UseFunction( player , turret ) { - entity tur = expect entity(turret) - thread RevivableTurret_Revive(tur) + entity tur = expect entity( turret ) + thread RevivableTurret_Revive( tur ) return true } -void function RevivableTurret_Revive(entity turret) +void function RevivableTurret_Revive( entity turret ) { - turret.SetHealth(turret.GetMaxHealth()) + turret.SetHealth( turret.GetMaxHealth() ) turret.ClearInvulnerable() turret.Anim_ScriptedPlay( "deploy" ) wait 1.0 @@ -59,7 +59,7 @@ void function RevivableTurret_Revive(entity turret) turret.SetNoTarget( false ) } -void function RevivableTurret_Kill(entity turret) +void function RevivableTurret_Kill( entity turret ) { turret.EnableNPCFlag( NPC_IGNORE_ALL ) turret.SetNoTarget( true ) |