diff --git a/README.md b/README.md index 54a07a63..a0bdf3a1 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,9 @@ ### Subsurface Resonator * No longer needs to be powered by a Turbine +### Maxis Drone +* Switches back to correct weapon after deploying + ## Bank * Disabled diff --git a/scripts/zm/replaced/zm_tomb_craftables.gsc b/scripts/zm/replaced/zm_tomb_craftables.gsc new file mode 100644 index 00000000..77d382e6 --- /dev/null +++ b/scripts/zm/replaced/zm_tomb_craftables.gsc @@ -0,0 +1,51 @@ +#include maps\mp\_utility; +#include common_scripts\utility; +#include maps\mp\zombies\_zm_utility; + +quadrotor_control_thread() +{ + self endon( "bled_out" ); + self endon( "disconnect" ); + + while ( 1 ) + { + if ( self actionslottwobuttonpressed() && self hasweapon( "equip_dieseldrone_zm" ) ) + { + prev_wep = self getCurrentWeapon(); + + self waittill( "weapon_change_complete" ); + + self playsound( "veh_qrdrone_takeoff" ); + + if(self hasweapon(prev_wep) && prev_wep != "equip_dieseldrone_zm") + { + self switchtoweapon( prev_wep ); + } + else + { + self switchtoweapon( self getweaponslistprimaries()[0] ); + } + + self waittill( "weapon_change_complete" ); + + if ( self hasweapon( "equip_dieseldrone_zm" ) ) + { + self takeweapon( "equip_dieseldrone_zm" ); + self setactionslot( 2, "" ); + } + + str_vehicle = "heli_quadrotor_zm"; + if ( flag( "ee_maxis_drone_retrieved" ) ) + { + str_vehicle = "heli_quadrotor_upgraded_zm"; + } + + qr = spawnvehicle( "veh_t6_dlc_zm_quadrotor", "quadrotor_ai", str_vehicle, self.origin + vectorScale( ( 0, 0, 1 ), 96 ), self.angles ); + level thread maps/mp/zm_tomb_craftables::quadrotor_death_watcher( qr ); + qr thread maps/mp/zm_tomb_craftables::quadrotor_instance_watcher( self ); + return; + } + + wait 0.05; + } +} \ No newline at end of file diff --git a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc index 1fc24210..5946317e 100644 --- a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc +++ b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc @@ -2,6 +2,13 @@ #include common_scripts\utility; #include maps\mp\zombies\_zm_utility; +#include scripts/zm/replaced/zm_tomb_craftables; + +main() +{ + replaceFunc(maps/mp/zm_tomb_craftables::quadrotor_control_thread, scripts/zm/replaced/zm_tomb_craftables::quadrotor_control_thread); +} + init() { level.custom_magic_box_timer_til_despawn = ::custom_magic_box_timer_til_despawn;