diff --git a/scripts/zm/replaced/_zm_equip_headchopper.gsc b/scripts/zm/replaced/_zm_equip_headchopper.gsc index 2a5e3adc..51312ab8 100644 --- a/scripts/zm/replaced/_zm_equip_headchopper.gsc +++ b/scripts/zm/replaced/_zm_equip_headchopper.gsc @@ -94,6 +94,21 @@ headchopperthink( weapon, electricradius, armed ) } } +wait_for_targets( weapon ) +{ + weapon endon( "hi_priority_target" ); + + while ( isdefined( weapon ) ) + { + if ( isdefined( weapon.chop_targets ) && weapon.chop_targets.size > 0 ) + { + return; + } + + wait 0.05; + } +} + headchopperattack( weapon, ent ) { self endon( "death" ); diff --git a/scripts/zm/replaced/_zm_equip_springpad.gsc b/scripts/zm/replaced/_zm_equip_springpad.gsc index 30e62853..f3fccbb8 100644 --- a/scripts/zm/replaced/_zm_equip_springpad.gsc +++ b/scripts/zm/replaced/_zm_equip_springpad.gsc @@ -100,4 +100,19 @@ springpadthink( weapon, electricradius, armed ) else wait 0.1; } +} + +wait_for_targets( weapon ) +{ + weapon endon( "hi_priority_target" ); + + while ( isdefined( weapon ) ) + { + if ( isdefined( weapon.fling_targets ) && weapon.fling_targets.size > 0 ) + { + return; + } + + wait 0.05; + } } \ No newline at end of file