mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 07:37:56 -05:00
Die Rise: link doors at Lower Blue Highrise area
Fix door purchase sound origin
This commit is contained in:
@ -70,6 +70,8 @@ main()
|
||||
replaceFunc(maps\mp\zombies\_zm_laststand::revive_give_back_weapons, scripts\zm\replaced\_zm_laststand::revive_give_back_weapons);
|
||||
replaceFunc(maps\mp\zombies\_zm_laststand::revive_hud_think, scripts\zm\replaced\_zm_laststand::revive_hud_think);
|
||||
replaceFunc(maps\mp\zombies\_zm_laststand::auto_revive, scripts\zm\replaced\_zm_laststand::auto_revive);
|
||||
replaceFunc(maps\mp\zombies\_zm_blockers::door_buy, scripts\zm\replaced\_zm_blockers::door_buy);
|
||||
replaceFunc(maps\mp\zombies\_zm_blockers::door_opened, scripts\zm\replaced\_zm_blockers::door_opened);
|
||||
replaceFunc(maps\mp\zombies\_zm_blockers::player_fails_blocker_repair_trigger_preamble, scripts\zm\replaced\_zm_blockers::player_fails_blocker_repair_trigger_preamble);
|
||||
replaceFunc(maps\mp\zombies\_zm_weapons::init_weapon_upgrade, scripts\zm\replaced\_zm_weapons::init_weapon_upgrade);
|
||||
replaceFunc(maps\mp\zombies\_zm_weapons::add_dynamic_wallbuy, scripts\zm\replaced\_zm_weapons::add_dynamic_wallbuy);
|
||||
|
@ -1,6 +1,186 @@
|
||||
#include maps\mp\_utility;
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\_utility;
|
||||
#include maps\mp\zombies\_zm_net;
|
||||
#include maps\mp\zombies\_zm_utility;
|
||||
#include maps\mp\zombies\_zm_weapons;
|
||||
#include maps\mp\zombies\_zm_pers_upgrades_functions;
|
||||
#include maps\mp\zombies\_zm_score;
|
||||
#include maps\mp\_demo;
|
||||
#include maps\mp\zombies\_zm_stats;
|
||||
#include maps\mp\zombies\_zm_audio;
|
||||
#include maps\mp\zombies\_zm_zonemgr;
|
||||
#include maps\mp\zombies\_zm_laststand;
|
||||
#include maps\mp\zombies\_zm_spawner;
|
||||
#include maps\mp\zombies\_zm_unitrigger;
|
||||
#include maps\mp\zombies\_zm_blockers;
|
||||
|
||||
door_buy()
|
||||
{
|
||||
self waittill( "trigger", who, force );
|
||||
|
||||
if ( isdefined( level.custom_door_buy_check ) )
|
||||
{
|
||||
if ( !who [[ level.custom_door_buy_check ]]( self ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( getdvarint( _hash_2ECA0C0E ) > 0 || isdefined( force ) && force )
|
||||
return true;
|
||||
|
||||
if ( !who usebuttonpressed() )
|
||||
return false;
|
||||
|
||||
if ( who in_revive_trigger() )
|
||||
return false;
|
||||
|
||||
if ( is_player_valid( who ) )
|
||||
{
|
||||
players = get_players();
|
||||
cost = self.zombie_cost;
|
||||
|
||||
if ( who maps\mp\zombies\_zm_pers_upgrades_functions::is_pers_double_points_active() )
|
||||
cost = who maps\mp\zombies\_zm_pers_upgrades_functions::pers_upgrade_double_points_cost( cost );
|
||||
|
||||
if ( self._door_open == 1 )
|
||||
self.purchaser = undefined;
|
||||
else if ( who.score >= cost )
|
||||
{
|
||||
who maps\mp\zombies\_zm_score::minus_to_player_score( cost, 1 );
|
||||
maps\mp\_demo::bookmark( "zm_player_door", gettime(), who );
|
||||
who maps\mp\zombies\_zm_stats::increment_client_stat( "doors_purchased" );
|
||||
who maps\mp\zombies\_zm_stats::increment_player_stat( "doors_purchased" );
|
||||
self.purchaser = who;
|
||||
}
|
||||
else
|
||||
{
|
||||
play_sound_at_pos( "no_purchase", self.origin );
|
||||
|
||||
if ( isdefined( level.custom_generic_deny_vo_func ) )
|
||||
who thread [[ level.custom_generic_deny_vo_func ]]( 1 );
|
||||
else
|
||||
who maps\mp\zombies\_zm_audio::create_and_play_dialog( "general", "door_deny" );
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isdefined( level._door_open_rumble_func ) )
|
||||
who thread [[ level._door_open_rumble_func ]]();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
door_opened( cost, quick_close )
|
||||
{
|
||||
if ( isdefined( self.door_is_moving ) && self.door_is_moving )
|
||||
return;
|
||||
|
||||
play_sound_at_pos( "purchase", self.origin );
|
||||
|
||||
self.has_been_opened = 1;
|
||||
all_trigs = getentarray( self.target, "target" );
|
||||
self.door_is_moving = 1;
|
||||
|
||||
foreach ( trig in all_trigs )
|
||||
{
|
||||
trig.door_is_moving = 1;
|
||||
trig trigger_off();
|
||||
trig.has_been_opened = 1;
|
||||
|
||||
if ( !isdefined( trig._door_open ) || trig._door_open == 0 )
|
||||
{
|
||||
trig._door_open = 1;
|
||||
trig notify( "door_opened" );
|
||||
level thread maps\mp\zombies\_zm_audio::sndmusicstingerevent( "door_open" );
|
||||
}
|
||||
else
|
||||
trig._door_open = 0;
|
||||
|
||||
if ( isdefined( trig.script_flag ) && trig._door_open == 1 )
|
||||
{
|
||||
tokens = strtok( trig.script_flag, "," );
|
||||
|
||||
for ( i = 0; i < tokens.size; i++ )
|
||||
flag_set( tokens[i] );
|
||||
}
|
||||
else if ( isdefined( trig.script_flag ) && trig._door_open == 0 )
|
||||
{
|
||||
tokens = strtok( trig.script_flag, "," );
|
||||
|
||||
for ( i = 0; i < tokens.size; i++ )
|
||||
flag_clear( tokens[i] );
|
||||
}
|
||||
|
||||
if ( isdefined( quick_close ) && quick_close )
|
||||
{
|
||||
trig set_hint_string( trig, "" );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( trig._door_open == 1 && flag( "door_can_close" ) )
|
||||
{
|
||||
trig set_hint_string( trig, "default_buy_door_close" );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( trig._door_open == 0 )
|
||||
trig set_hint_string( trig, "default_buy_door", cost );
|
||||
}
|
||||
|
||||
level notify( "door_opened" );
|
||||
|
||||
if ( isdefined( self.doors ) )
|
||||
{
|
||||
is_script_model_door = 0;
|
||||
have_moving_clip_for_door = 0;
|
||||
use_blocker_clip_for_pathing = 0;
|
||||
|
||||
foreach ( door in self.doors )
|
||||
{
|
||||
if ( is_true( door.ignore_use_blocker_clip_for_pathing_check ) )
|
||||
continue;
|
||||
|
||||
if ( door.classname == "script_model" )
|
||||
{
|
||||
is_script_model_door = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( door.classname == "script_brushmodel" && ( !isdefined( door.script_noteworthy ) || door.script_noteworthy != "clip" ) && ( !isdefined( door.script_string ) || door.script_string != "clip" ) )
|
||||
have_moving_clip_for_door = 1;
|
||||
}
|
||||
|
||||
use_blocker_clip_for_pathing = is_script_model_door && !have_moving_clip_for_door;
|
||||
|
||||
for ( i = 0; i < self.doors.size; i++ )
|
||||
{
|
||||
self.doors[i] thread door_activate( self.doors[i].script_transition_time, self._door_open, quick_close, use_blocker_clip_for_pathing );
|
||||
}
|
||||
}
|
||||
|
||||
level.active_zone_names = maps\mp\zombies\_zm_zonemgr::get_active_zone_names();
|
||||
wait 1;
|
||||
self.door_is_moving = 0;
|
||||
|
||||
foreach ( trig in all_trigs )
|
||||
trig.door_is_moving = 0;
|
||||
|
||||
if ( isdefined( quick_close ) && quick_close )
|
||||
{
|
||||
for ( i = 0; i < all_trigs.size; i++ )
|
||||
all_trigs[i] trigger_on();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( flag( "door_can_close" ) )
|
||||
{
|
||||
wait 2.0;
|
||||
|
||||
for ( i = 0; i < all_trigs.size; i++ )
|
||||
all_trigs[i] trigger_on();
|
||||
}
|
||||
}
|
||||
|
||||
handle_post_board_repair_rewards( cost, zbarrier )
|
||||
{
|
||||
|
@ -46,6 +46,8 @@ main()
|
||||
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\zombies\_zm_weapon_locker::triggerweaponslockerisvalidweaponpromptupdate, scripts\zm\replaced\_zm_weapon_locker::triggerweaponslockerisvalidweaponpromptupdate);
|
||||
|
||||
door_changes();
|
||||
}
|
||||
|
||||
init()
|
||||
@ -65,6 +67,34 @@ init()
|
||||
level thread zombie_bad_zone_watcher();
|
||||
}
|
||||
|
||||
door_changes()
|
||||
{
|
||||
zombie_doors = getentarray( "zombie_door", "targetname" );
|
||||
for ( i = 0; i < zombie_doors.size; i++ )
|
||||
{
|
||||
new_target = undefined;
|
||||
if (zombie_doors[i].target == "pf1577_auto2497")
|
||||
{
|
||||
new_target = "pf1577_auto2496";
|
||||
}
|
||||
else if (zombie_doors[i].target == "debris_blue_level4a_left_door_parts")
|
||||
{
|
||||
new_target = "debris_blue_level4a_right_door_parts";
|
||||
}
|
||||
|
||||
if (isDefined(new_target))
|
||||
{
|
||||
targets = getentarray( zombie_doors[i].target, "targetname" );
|
||||
zombie_doors[i].target = new_target;
|
||||
|
||||
foreach (target in targets)
|
||||
{
|
||||
target.targetname = zombie_doors[i].target;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
zombie_init_done()
|
||||
{
|
||||
self.allowpain = 0;
|
||||
|
Reference in New Issue
Block a user