1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-10 15:17:57 -05:00

Origins: fix ascend from darkness quest step

This commit is contained in:
Jbleezy
2023-03-05 15:53:33 -08:00
parent 6b3e56e754
commit f947a93f66
3 changed files with 50 additions and 43 deletions

View File

@ -13,34 +13,6 @@
#include maps\mp\zombies\_zm_equipment;
#include maps\mp\zm_tomb_craftables;
is_unclaimed_staff_weapon( str_weapon )
{
if ( !maps\mp\zombies\_zm_equipment::is_limited_equipment( str_weapon ) )
{
return true;
}
s_elemental_staff = get_staff_info_from_weapon_name( str_weapon, 0 );
players = get_players();
foreach ( player in players )
{
if ( isdefined( player ) && player has_weapon_or_upgrade( s_elemental_staff.weapname ) )
{
return false;
}
}
e_upgraded_staff = maps\mp\zm_tomb_craftables::get_staff_info_from_weapon_name( str_weapon );
if (is_true(e_upgraded_staff.ee_in_use))
{
return false;
}
return true;
}
quadrotor_control_thread()
{
self endon( "bled_out" );

View File

@ -63,35 +63,70 @@ robot_head_trigger_think()
str_weap_staffs = array("staff_air_upgraded_zm", "staff_lightning_upgraded_zm", "staff_fire_upgraded_zm", "staff_water_upgraded_zm");
e_upgraded_staffs = [];
for (i = 0; i < str_weap_staffs.size; i++)
{
e_upgraded_staffs[i] = maps\mp\zm_tomb_craftables::get_staff_info_from_weapon_name( str_weap_staffs[i] );
}
staff_placed = 0;
while ( !staff_placed )
while ( true )
{
self waittill( "trigger", player );
if (is_true(self.stub.staff_placed))
{
continue;
}
for (i = 0; i < str_weap_staffs.size; i++)
{
if ( player hasweapon( str_weap_staffs[i] ) )
{
staff_placed = 1;
e_upgraded_staffs[i].ee_in_use = 1;
self.stub.staff_placed = 1;
e_upgraded_staff = maps\mp\zm_tomb_craftables::get_staff_info_from_weapon_name( str_weap_staffs[i] );
for (j = 0; j < level.a_elemental_staffs_upgraded.size; j++)
{
if (level.a_elemental_staffs_upgraded[j].weapname == str_weap_staffs[i])
{
level.a_elemental_staffs_upgraded[j].ee_in_use = 1;
}
}
player takeweapon( str_weap_staffs[i] );
maps\mp\zm_tomb_craftables::clear_player_staff( str_weap_staffs[i] );
level.n_ee_robot_staffs_planted++;
if ( level.n_ee_robot_staffs_planted == 4 )
{
flag_set( "ee_all_staffs_placed" );
}
e_upgraded_staffs[i] thread place_staff( self.stub.m_plinth );
break;
e_upgraded_staff thread place_staff( self.stub.m_plinth );
}
}
}
}
remove_plinth()
{
playfx( level._effect["teleport_1p"], self.m_plinth.origin );
playsoundatposition( "zmb_footprintbox_disappear", self.m_plinth.origin );
wait 3;
if ( isdefined( self.m_plinth.m_staff ) )
{
self.m_plinth.m_staff unlink();
self.m_plinth.m_staff.origin = self.m_plinth.v_old_origin;
self.m_plinth.m_staff.angles = self.m_plinth.v_old_angles;
for (i = 0; i < level.a_elemental_staffs_upgraded.size; i++)
{
if (level.a_elemental_staffs_upgraded[i].weapname == self.m_plinth.e_staff.upgrade.weapname)
{
level.a_elemental_staffs_upgraded[i].ee_in_use = undefined;
}
}
}
self.m_sign delete();
self.m_plinth delete();
self.m_coll delete();
unregister_unitrigger( self );
}

View File

@ -22,8 +22,8 @@ main()
replaceFunc(maps\mp\zm_tomb_quest_fire::fire_puzzle_1_run, scripts\zm\replaced\zm_tomb_quest_fire::fire_puzzle_1_run);
replaceFunc(maps\mp\zm_tomb_quest_ice::ice_puzzle_1_run, scripts\zm\replaced\zm_tomb_quest_ice::ice_puzzle_1_run);
replaceFunc(maps\mp\zm_tomb_ee_main_step_2::create_robot_head_trigger, scripts\zm\replaced\zm_tomb_ee_main_step_2::create_robot_head_trigger);
replaceFunc(maps\mp\zm_tomb_ee_main_step_2::remove_plinth, scripts\zm\replaced\zm_tomb_ee_main_step_2::remove_plinth);
replaceFunc(maps\mp\zm_tomb_ee_main_step_3::fire_link_cooldown, scripts\zm\replaced\zm_tomb_ee_main_step_3::fire_link_cooldown);
replaceFunc(maps\mp\zm_tomb_craftables::is_unclaimed_staff_weapon, scripts\zm\replaced\zm_tomb_craftables::is_unclaimed_staff_weapon);
replaceFunc(maps\mp\zm_tomb_craftables::quadrotor_control_thread, scripts\zm\replaced\zm_tomb_craftables::quadrotor_control_thread);
replaceFunc(maps\mp\zm_tomb_challenges::challenges_init, scripts\zm\replaced\zm_tomb_challenges::challenges_init);
replaceFunc(maps\mp\zm_tomb_dig::increment_player_perk_purchase_limit, scripts\zm\replaced\zm_tomb_dig::increment_player_perk_purchase_limit);