mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-12 08:08:00 -05:00
Time Bomb: can have with Monkey Bombs
This commit is contained in:
@ -183,6 +183,9 @@
|
|||||||
* Can be repurchased
|
* Can be repurchased
|
||||||
* Increased max amount that can be placed from 12 to 20
|
* Increased max amount that can be placed from 12 to 20
|
||||||
|
|
||||||
|
### Time Bomb
|
||||||
|
* Can have with Monkey Bombs
|
||||||
|
|
||||||
### One Inch Punch
|
### One Inch Punch
|
||||||
* Upgraded: elemental punch changes based on which staff the player currently has
|
* Upgraded: elemental punch changes based on which staff the player currently has
|
||||||
* Fixed an issue where a player's melee weapon wouldn't reset if the player bled out in the Giant Robots
|
* Fixed an issue where a player's melee weapon wouldn't reset if the player bled out in the Giant Robots
|
||||||
|
73
scripts/zm/replaced/_zm_weap_time_bomb.gsc
Normal file
73
scripts/zm/replaced/_zm_weap_time_bomb.gsc
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
#include common_scripts\utility;
|
||||||
|
#include maps\mp\_utility;
|
||||||
|
#include maps\mp\zombies\_zm_utility;
|
||||||
|
#include maps\mp\gametypes_zm\_hud_util;
|
||||||
|
#include maps\mp\zombies\_zm_weapons;
|
||||||
|
#include maps\mp\_visionset_mgr;
|
||||||
|
#include maps\mp\zombies\_zm_audio;
|
||||||
|
#include maps\mp\zombies\_zm_blockers;
|
||||||
|
#include maps\mp\zombies\_zm_laststand;
|
||||||
|
#include maps\mp\zombies\_zm_weapon_locker;
|
||||||
|
#include maps\mp\zombies\_zm_magicbox;
|
||||||
|
#include maps\mp\zombies\_zm_perks;
|
||||||
|
#include maps\mp\zombies\_zm_score;
|
||||||
|
#include maps\mp\zombies\_zm_stats;
|
||||||
|
#include maps\mp\zombies\_zm_equipment;
|
||||||
|
#include maps\mp\zombies\_zm;
|
||||||
|
#include maps\mp\zombies\_zm_spawner;
|
||||||
|
#include maps\mp\animscripts\zm_death;
|
||||||
|
#include maps\mp\zombies\_zm_ai_basic;
|
||||||
|
#include maps\mp\zombies\_zm_weap_time_bomb;
|
||||||
|
|
||||||
|
init_time_bomb()
|
||||||
|
{
|
||||||
|
time_bomb_precache();
|
||||||
|
level thread time_bomb_post_init();
|
||||||
|
flag_init( "time_bomb_round_killed" );
|
||||||
|
flag_init( "time_bomb_enemies_restored" );
|
||||||
|
flag_init( "time_bomb_zombie_respawning_done" );
|
||||||
|
flag_init( "time_bomb_restore_active" );
|
||||||
|
flag_init( "time_bomb_restore_done" );
|
||||||
|
flag_init( "time_bomb_global_restore_done" );
|
||||||
|
flag_init( "time_bomb_detonation_enabled" );
|
||||||
|
flag_init( "time_bomb_stores_door_state" );
|
||||||
|
registerclientfield( "world", "time_bomb_saved_round_number", 12000, 8, "int" );
|
||||||
|
registerclientfield( "world", "time_bomb_lua_override", 12000, 1, "int" );
|
||||||
|
registerclientfield( "world", "time_bomb_hud_toggle", 12000, 1, "int" );
|
||||||
|
registerclientfield( "toplayer", "sndTimebombLoop", 12000, 2, "int" );
|
||||||
|
maps\mp\zombies\_zm_weapons::register_zombie_weapon_callback( "time_bomb_zm", ::player_give_time_bomb );
|
||||||
|
level.zombiemode_time_bomb_give_func = ::player_give_time_bomb;
|
||||||
|
include_weapon( "time_bomb_zm", 1 );
|
||||||
|
maps\mp\zombies\_zm_weapons::add_limited_weapon( "time_bomb_zm", 1 );
|
||||||
|
add_time_bomb_to_mystery_box();
|
||||||
|
register_equipment_for_level( "time_bomb_zm" );
|
||||||
|
register_equipment_for_level( "time_bomb_detonator_zm" );
|
||||||
|
|
||||||
|
if ( !isdefined( level.round_wait_func ) )
|
||||||
|
level.round_wait_func = ::time_bomb_round_wait;
|
||||||
|
|
||||||
|
level.zombie_round_change_custom = ::time_bomb_custom_round_change;
|
||||||
|
level._effect["time_bomb_set"] = loadfx( "weapon/time_bomb/fx_time_bomb_detonate" );
|
||||||
|
level._effect["time_bomb_ammo_fx"] = loadfx( "misc/fx_zombie_powerup_on" );
|
||||||
|
level._effect["time_bomb_respawns_enemy"] = loadfx( "maps/zombie_buried/fx_buried_time_bomb_spawn" );
|
||||||
|
level._effect["time_bomb_kills_enemy"] = loadfx( "maps/zombie_buried/fx_buried_time_bomb_death" );
|
||||||
|
level._time_bomb = spawnstruct();
|
||||||
|
level._time_bomb.enemy_type = [];
|
||||||
|
register_time_bomb_enemy( "zombie", ::is_zombie_round, ::time_bomb_saves_zombie_data, ::time_bomb_respawns_zombies );
|
||||||
|
register_time_bomb_enemy_default( "zombie" );
|
||||||
|
level._time_bomb.last_round_restored = -1;
|
||||||
|
flag_set( "time_bomb_detonation_enabled" );
|
||||||
|
}
|
||||||
|
|
||||||
|
player_give_time_bomb()
|
||||||
|
{
|
||||||
|
assert( isplayer( self ), "player_give_time_bomb can only be used on players!" );
|
||||||
|
self giveweapon( "time_bomb_zm" );
|
||||||
|
self swap_weapon_to_time_bomb();
|
||||||
|
self thread show_time_bomb_hints();
|
||||||
|
self thread time_bomb_think();
|
||||||
|
self thread detonator_think();
|
||||||
|
self thread time_bomb_inventory_slot_think();
|
||||||
|
self thread destroy_time_bomb_save_if_user_bleeds_out_or_disconnects();
|
||||||
|
self thread sndwatchforweapswitch();
|
||||||
|
}
|
@ -13,6 +13,7 @@
|
|||||||
#include scripts\zm\replaced\_zm_equip_headchopper;
|
#include scripts\zm\replaced\_zm_equip_headchopper;
|
||||||
#include scripts\zm\replaced\_zm_perk_vulture;
|
#include scripts\zm\replaced\_zm_perk_vulture;
|
||||||
#include scripts\zm\replaced\_zm_weap_slowgun;
|
#include scripts\zm\replaced\_zm_weap_slowgun;
|
||||||
|
#include scripts\zm\replaced\_zm_weap_time_bomb;
|
||||||
#include scripts\zm\replaced\_zm_banking;
|
#include scripts\zm\replaced\_zm_banking;
|
||||||
#include scripts\zm\replaced\_zm_weapon_locker;
|
#include scripts\zm\replaced\_zm_weapon_locker;
|
||||||
#include scripts\zm\replaced\_zm_sq;
|
#include scripts\zm\replaced\_zm_sq;
|
||||||
@ -41,6 +42,7 @@ main()
|
|||||||
replaceFunc(maps\mp\zombies\_zm_weap_slowgun::zombie_paralyzed, scripts\zm\replaced\_zm_weap_slowgun::zombie_paralyzed);
|
replaceFunc(maps\mp\zombies\_zm_weap_slowgun::zombie_paralyzed, scripts\zm\replaced\_zm_weap_slowgun::zombie_paralyzed);
|
||||||
replaceFunc(maps\mp\zombies\_zm_weap_slowgun::player_slow_for_time, scripts\zm\replaced\_zm_weap_slowgun::player_slow_for_time);
|
replaceFunc(maps\mp\zombies\_zm_weap_slowgun::player_slow_for_time, scripts\zm\replaced\_zm_weap_slowgun::player_slow_for_time);
|
||||||
replaceFunc(maps\mp\zombies\_zm_weap_slowgun::watch_reset_anim_rate, scripts\zm\replaced\_zm_weap_slowgun::watch_reset_anim_rate);
|
replaceFunc(maps\mp\zombies\_zm_weap_slowgun::watch_reset_anim_rate, scripts\zm\replaced\_zm_weap_slowgun::watch_reset_anim_rate);
|
||||||
|
replaceFunc(maps\mp\zombies\_zm_weap_time_bomb::init_time_bomb, scripts\zm\replaced\_zm_weap_time_bomb::init_time_bomb);
|
||||||
replaceFunc(maps\mp\zombies\_zm_banking::init, scripts\zm\replaced\_zm_banking::init);
|
replaceFunc(maps\mp\zombies\_zm_banking::init, scripts\zm\replaced\_zm_banking::init);
|
||||||
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_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_deposit_unitrigger, scripts\zm\replaced\_zm_banking::bank_deposit_unitrigger);
|
||||||
|
Reference in New Issue
Block a user