mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 23:57:59 -05:00
Maxis Drone: fix not switching back to previous weapon
This commit is contained in:
@ -195,6 +195,9 @@
|
|||||||
### Subsurface Resonator
|
### Subsurface Resonator
|
||||||
* No longer needs to be powered by a Turbine
|
* No longer needs to be powered by a Turbine
|
||||||
|
|
||||||
|
### Maxis Drone
|
||||||
|
* Switches back to correct weapon after deploying
|
||||||
|
|
||||||
## Bank
|
## Bank
|
||||||
* Disabled
|
* Disabled
|
||||||
|
|
||||||
|
51
scripts/zm/replaced/zm_tomb_craftables.gsc
Normal file
51
scripts/zm/replaced/zm_tomb_craftables.gsc
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,13 @@
|
|||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
#include maps\mp\zombies\_zm_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()
|
init()
|
||||||
{
|
{
|
||||||
level.custom_magic_box_timer_til_despawn = ::custom_magic_box_timer_til_despawn;
|
level.custom_magic_box_timer_til_despawn = ::custom_magic_box_timer_til_despawn;
|
||||||
|
Reference in New Issue
Block a user