1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-24 14:10:30 -05:00

Disable persistent upgrades correctly

This commit is contained in:
Jbleezy
2022-01-05 00:33:56 -08:00
parent 9a3e6d9010
commit a1aa4f57b9
2 changed files with 26 additions and 45 deletions

View File

@ -11,6 +11,7 @@
#include scripts/zm/replaced/_zm_magicbox;
#include scripts/zm/replaced/_zm_perks;
#include scripts/zm/replaced/_zm_powerups;
#include scripts/zm/replaced/_zm_pers_upgrades;
#include scripts/zm/replaced/_zm_equipment;
#include scripts/zm/replaced/_zm_ai_basic;
@ -33,6 +34,7 @@ main()
replaceFunc(maps/mp/zombies/_zm_magicbox::timer_til_despawn, scripts/zm/replaced/_zm_magicbox::timer_til_despawn);
replaceFunc(maps/mp/zombies/_zm_perks::perk_pause, scripts/zm/replaced/_zm_perks::perk_pause);
replaceFunc(maps/mp/zombies/_zm_powerups::nuke_powerup, scripts/zm/replaced/_zm_powerups::nuke_powerup);
replaceFunc(maps/mp/zombies/_zm_pers_upgrades::pers_upgrade_init, scripts/zm/replaced/_zm_pers_upgrades::pers_upgrade_init);
replaceFunc(maps/mp/zombies/_zm_equipment::show_equipment_hint, scripts/zm/replaced/_zm_equipment::show_equipment_hint);
replaceFunc(maps/mp/zombies/_zm_equipment::placed_equipment_think, scripts/zm/replaced/_zm_equipment::placed_equipment_think);
replaceFunc(maps/mp/zombies/_zm_ai_basic::inert_wakeup, scripts/zm/replaced/_zm_ai_basic::inert_wakeup);
@ -104,8 +106,6 @@ onplayerspawned()
self thread buildable_piece_remove_on_last_stand();
self thread disable_player_pers_upgrades();
//self thread disable_sniper_scope_sway(); // Buried does not load the clientfield
self thread war_machine_explode_on_impact();
@ -202,8 +202,6 @@ post_all_players_spawned()
level thread buildbuildables();
level thread buildcraftables();
level thread disable_pers_upgrades();
level thread zombie_health_fix();
level thread solo_revive_trigger_fix();
@ -1967,47 +1965,6 @@ weapon_locker_clear_stored_weapondata()
}
}
disable_pers_upgrades()
{
level waittill("initial_disable_player_pers_upgrades");
level.pers_upgrades_keys = [];
level.pers_upgrades = [];
}
disable_player_pers_upgrades()
{
flag_wait( "initial_blackscreen_passed" );
if (isDefined(self.pers_upgrades_awarded))
{
upgrade = getFirstArrayKey(self.pers_upgrades_awarded);
while (isDefined(upgrade))
{
self.pers_upgrades_awarded[upgrade] = 0;
upgrade = getNextArrayKey(self.pers_upgrades_awarded, upgrade);
}
}
if (isDefined(level.pers_upgrades_keys))
{
index = 0;
while (index < level.pers_upgrades_keys.size)
{
str_name = level.pers_upgrades_keys[index];
stat_index = 0;
while (stat_index < level.pers_upgrades[str_name].stat_names.size)
{
self maps/mp/zombies/_zm_stats::zero_client_stat(level.pers_upgrades[str_name].stat_names[stat_index], 0);
stat_index++;
}
index++;
}
}
level notify("initial_disable_player_pers_upgrades");
}
disable_carpenter()
{
arrayremoveindex(level.zombie_include_powerups, "carpenter");

View File

@ -0,0 +1,24 @@
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\zombies\_zm_utility;
pers_upgrade_init()
{
/*
setup_pers_upgrade_boards();
setup_pers_upgrade_revive();
setup_pers_upgrade_multi_kill_headshots();
setup_pers_upgrade_cash_back();
setup_pers_upgrade_insta_kill();
setup_pers_upgrade_jugg();
setup_pers_upgrade_carpenter();
setup_pers_upgrade_flopper();
setup_pers_upgrade_perk_lose();
setup_pers_upgrade_pistol_points();
setup_pers_upgrade_double_points();
setup_pers_upgrade_sniper();
setup_pers_upgrade_box_weapon();
setup_pers_upgrade_nube();
level thread pers_upgrades_monitor();
*/
}