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

Fix errors due to Grief scripts loading on all gametypes

This commit is contained in:
Jbleezy
2023-02-24 15:52:21 -08:00
parent 0147b44e70
commit 9afdc78220
5 changed files with 32 additions and 11 deletions

View File

@ -44,7 +44,7 @@ meat_stink_player( who )
players = get_players();
foreach ( player in players )
{
player thread maps\mp\gametypes_zm\zgrief::meat_stink_player_cleanup();
player thread [[level.zgrief_meat_stink_player_cleanup]]();
if ( player != who )
{
player.ignoreme = 1;
@ -59,12 +59,12 @@ meat_stink_player( who )
player iprintln("^9" + who.name + " has the meat");
}
}
who thread maps\mp\gametypes_zm\zgrief::meat_stink_player_create();
who thread [[level.zgrief_meat_stink_player_create]]();
who waittill_any_or_timeout( 30, "disconnect", "player_downed", "bled_out" );
players = get_players();
foreach ( player in players )
{
player thread maps\mp\gametypes_zm\zgrief::meat_stink_player_cleanup();
player thread [[level.zgrief_meat_stink_player_cleanup]]();
player.ignoreme = 0;
}
}

View File

@ -9,8 +9,6 @@
#include scripts\zm\replaced\_zm_game_module;
#include scripts\zm\replaced\_zm_gametype;
#include scripts\zm\replaced\_zm_blockers;
#include scripts\zm\replaced\zgrief;
#include scripts\zm\replaced\zmeat;
main()
{
@ -26,11 +24,6 @@ main()
replaceFunc(maps\mp\zombies\_zm_audio_announcer::playleaderdialogonplayer, scripts\zm\replaced\_zm_audio_announcer::playleaderdialogonplayer);
replaceFunc(maps\mp\zombies\_zm_game_module::wait_for_team_death_and_round_end, scripts\zm\replaced\_zm_game_module::wait_for_team_death_and_round_end);
replaceFunc(maps\mp\zombies\_zm_blockers::handle_post_board_repair_rewards, scripts\zm\replaced\_zm_blockers::handle_post_board_repair_rewards);
replaceFunc(maps\mp\gametypes_zm\zgrief::meat_stink_on_ground, scripts\zm\replaced\zgrief::meat_stink_on_ground);
replaceFunc(maps\mp\gametypes_zm\zgrief::meat_stink_player, scripts\zm\replaced\zgrief::meat_stink_player);
replaceFunc(maps\mp\gametypes_zm\zmeat::item_meat_watch_trigger, scripts\zm\replaced\zmeat::item_meat_watch_trigger);
replaceFunc(maps\mp\gametypes_zm\zmeat::kick_meat_monitor, scripts\zm\replaced\zmeat::kick_meat_monitor);
replaceFunc(maps\mp\gametypes_zm\zmeat::last_stand_meat_nudge, scripts\zm\replaced\zmeat::last_stand_meat_nudge);
}
init()
@ -720,7 +713,7 @@ grief_onplayerconnect()
self thread on_player_revived();
self thread headstomp_watcher();
self thread smoke_grenade_cluster_watcher();
self thread maps\mp\gametypes_zm\zmeat::create_item_meat_watcher();
self thread [[level.zmeat_create_item_meat_watcher]]();
self.killsconfirmed = 0;
if(level.scr_zm_ui_gametype_obj == "zgrief" || level.scr_zm_ui_gametype_obj == "zcontainment")

View File

@ -7,6 +7,8 @@
#include scripts\zm\replaced\_zm_equip_subwoofer;
#include scripts\zm\replaced\_zm_banking;
#include scripts\zm\replaced\_zm_weap_slowgun;
#include scripts\zm\replaced\zgrief;
#include scripts\zm\replaced\zmeat;
main()
{
@ -21,6 +23,11 @@ main()
replaceFunc(maps\mp\zombies\_zm_banking::bank_deposit_box, scripts\zm\replaced\_zm_banking::bank_deposit_box);
replaceFunc(maps\mp\zombies\_zm_banking::bank_deposit_unitrigger, scripts\zm\replaced\_zm_banking::bank_deposit_unitrigger);
replaceFunc(maps\mp\zombies\_zm_banking::bank_withdraw_unitrigger, scripts\zm\replaced\_zm_banking::bank_withdraw_unitrigger);
replaceFunc(maps\mp\gametypes_zm\zgrief::meat_stink_on_ground, scripts\zm\replaced\zgrief::meat_stink_on_ground);
replaceFunc(maps\mp\gametypes_zm\zgrief::meat_stink_player, scripts\zm\replaced\zgrief::meat_stink_player);
replaceFunc(maps\mp\gametypes_zm\zmeat::item_meat_watch_trigger, scripts\zm\replaced\zmeat::item_meat_watch_trigger);
replaceFunc(maps\mp\gametypes_zm\zmeat::kick_meat_monitor, scripts\zm\replaced\zmeat::kick_meat_monitor);
replaceFunc(maps\mp\gametypes_zm\zmeat::last_stand_meat_nudge, scripts\zm\replaced\zmeat::last_stand_meat_nudge);
}
init()
@ -28,6 +35,8 @@ init()
level.zombie_init_done = ::zombie_init_done;
level.special_weapon_magicbox_check = ::buried_special_weapon_magicbox_check;
level._is_player_in_zombie_stink = maps\mp\zombies\_zm_perk_vulture::_is_player_in_zombie_stink;
level.zgrief_meat_stink_player_create = maps\mp\gametypes_zm\zgrief::meat_stink_player_create;
level.zmeat_create_item_meat_watcher = maps\mp\gametypes_zm\zmeat::create_item_meat_watcher;
if(is_gametype_active("zgrief"))
{

View File

@ -6,6 +6,8 @@
#include scripts\zm\replaced\zm_alcatraz_classic;
#include scripts\zm\replaced\_zm_afterlife;
#include scripts\zm\replaced\_zm_ai_brutus;
#include scripts\zm\replaced\zgrief;
#include scripts\zm\replaced\zmeat;
main()
{
@ -14,6 +16,11 @@ main()
replaceFunc(maps\mp\zombies\_zm_ai_brutus::brutus_spawn, scripts\zm\replaced\_zm_ai_brutus::brutus_spawn);
replaceFunc(maps\mp\zombies\_zm_ai_brutus::brutus_health_increases, scripts\zm\replaced\_zm_ai_brutus::brutus_health_increases);
replaceFunc(maps\mp\zombies\_zm_ai_brutus::brutus_cleanup_at_end_of_grief_round, scripts\zm\replaced\_zm_ai_brutus::brutus_cleanup_at_end_of_grief_round);
replaceFunc(maps\mp\gametypes_zm\zgrief::meat_stink_on_ground, scripts\zm\replaced\zgrief::meat_stink_on_ground);
replaceFunc(maps\mp\gametypes_zm\zgrief::meat_stink_player, scripts\zm\replaced\zgrief::meat_stink_player);
replaceFunc(maps\mp\gametypes_zm\zmeat::item_meat_watch_trigger, scripts\zm\replaced\zmeat::item_meat_watch_trigger);
replaceFunc(maps\mp\gametypes_zm\zmeat::kick_meat_monitor, scripts\zm\replaced\zmeat::kick_meat_monitor);
replaceFunc(maps\mp\gametypes_zm\zmeat::last_stand_meat_nudge, scripts\zm\replaced\zmeat::last_stand_meat_nudge);
}
init()
@ -21,6 +28,8 @@ init()
level.zombie_init_done = ::zombie_init_done;
level.special_weapon_magicbox_check = ::check_for_special_weapon_limit_exist;
level.round_prestart_func = scripts\zm\replaced\_zm_afterlife::afterlife_start_zombie_logic;
level.zgrief_meat_stink_player_create = maps\mp\gametypes_zm\zgrief::meat_stink_player_create;
level.zmeat_create_item_meat_watcher = maps\mp\gametypes_zm\zmeat::create_item_meat_watcher;
remove_acid_trap_player_spawn();

View File

@ -10,6 +10,8 @@
#include scripts\zm\replaced\_zm_equip_electrictrap;
#include scripts\zm\replaced\_zm_equip_turret;
#include scripts\zm\replaced\_zm_banking;
#include scripts\zm\replaced\zgrief;
#include scripts\zm\replaced\zmeat;
main()
{
@ -30,6 +32,11 @@ main()
replaceFunc(maps\mp\zombies\_zm_banking::bank_deposit_box, scripts\zm\replaced\_zm_banking::bank_deposit_box);
replaceFunc(maps\mp\zombies\_zm_banking::bank_deposit_unitrigger, scripts\zm\replaced\_zm_banking::bank_deposit_unitrigger);
replaceFunc(maps\mp\zombies\_zm_banking::bank_withdraw_unitrigger, scripts\zm\replaced\_zm_banking::bank_withdraw_unitrigger);
replaceFunc(maps\mp\gametypes_zm\zgrief::meat_stink_on_ground, scripts\zm\replaced\zgrief::meat_stink_on_ground);
replaceFunc(maps\mp\gametypes_zm\zgrief::meat_stink_player, scripts\zm\replaced\zgrief::meat_stink_player);
replaceFunc(maps\mp\gametypes_zm\zmeat::item_meat_watch_trigger, scripts\zm\replaced\zmeat::item_meat_watch_trigger);
replaceFunc(maps\mp\gametypes_zm\zmeat::kick_meat_monitor, scripts\zm\replaced\zmeat::kick_meat_monitor);
replaceFunc(maps\mp\gametypes_zm\zmeat::last_stand_meat_nudge, scripts\zm\replaced\zmeat::last_stand_meat_nudge);
include_weapons_grief();
}
@ -39,6 +46,9 @@ init()
level.zombie_init_done = ::zombie_init_done;
level.special_weapon_magicbox_check = ::transit_special_weapon_magicbox_check;
level.grenade_safe_to_bounce = ::grenade_safe_to_bounce;
level.zgrief_meat_stink_player_create = maps\mp\gametypes_zm\zgrief::meat_stink_player_create;
level.zgrief_meat_stink_player_cleanup = maps\mp\gametypes_zm\zgrief::meat_stink_player_cleanup;
level.zmeat_create_item_meat_watcher = maps\mp\gametypes_zm\zmeat::create_item_meat_watcher;
screecher_spawner_changes();
zombie_spawn_location_changes();