mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-07 21:59:49 -05:00
Maze: fix random wallbuys
This commit is contained in:
parent
2c88ca2f88
commit
da3e9dbbcc
@ -33009,8 +33009,8 @@
|
||||
"angles" "0 1.00179e-005 0"
|
||||
"origin" "4923.88 -178.33 61"
|
||||
"classname" "script_struct"
|
||||
"zombie_weapon_upgrade" "saritch_zm"
|
||||
"targetname" "weapon_upgrade"
|
||||
"zombie_weapon_upgrade" "dynamic"
|
||||
"targetname" "buildable_wallbuy"
|
||||
"target" "me1_auto38"
|
||||
"guid" "7004ED06"
|
||||
}
|
||||
@ -33018,7 +33018,7 @@
|
||||
"script_noteworthy" "zstandard_maze, zgrief_maze"
|
||||
"targetname" "me1_auto38"
|
||||
"classname" "script_struct"
|
||||
"model" "t6_wpn_ar_saritch_world"
|
||||
"model" "p6_zm_bu_chalk"
|
||||
"angles" "0 1.00179e-005 0"
|
||||
"origin" "4923.88 -178.33 61"
|
||||
"guid" "6D2A1B25"
|
||||
@ -33028,8 +33028,8 @@
|
||||
"angles" "0 180 0"
|
||||
"origin" "4916.12 1512.33 61"
|
||||
"classname" "script_struct"
|
||||
"zombie_weapon_upgrade" "ballista_zm"
|
||||
"targetname" "weapon_upgrade"
|
||||
"zombie_weapon_upgrade" "dynamic"
|
||||
"targetname" "buildable_wallbuy"
|
||||
"target" "me2_auto38"
|
||||
"guid" "F0390DB3"
|
||||
}
|
||||
@ -33037,7 +33037,7 @@
|
||||
"script_noteworthy" "zstandard_maze, zgrief_maze"
|
||||
"targetname" "me2_auto38"
|
||||
"classname" "script_struct"
|
||||
"model" "t6_wpn_sniper_ballista_world"
|
||||
"model" "p6_zm_bu_chalk"
|
||||
"angles" "0 180 0"
|
||||
"origin" "4916.12 1512.33 61"
|
||||
"guid" "6D2A1B25"
|
||||
@ -33048,8 +33048,8 @@
|
||||
"origin" "4328.88 696.67 63"
|
||||
"angles" "0 1.00179e-005 0"
|
||||
"classname" "script_struct"
|
||||
"zombie_weapon_upgrade" "beretta93r_zm"
|
||||
"targetname" "weapon_upgrade"
|
||||
"zombie_weapon_upgrade" "dynamic"
|
||||
"targetname" "buildable_wallbuy"
|
||||
"target" "me3_auto38"
|
||||
"guid" "C15AD568"
|
||||
}
|
||||
@ -33057,7 +33057,7 @@
|
||||
"script_noteworthy" "zstandard_maze, zgrief_maze"
|
||||
"origin" "4328.88 696.67 63"
|
||||
"angles" "0 1.00179e-005 0"
|
||||
"model" "t6_wpn_pistol_b2023r_world"
|
||||
"model" "p6_zm_bu_chalk"
|
||||
"classname" "script_struct"
|
||||
"targetname" "me3_auto38"
|
||||
"guid" "7004ED06"
|
||||
@ -33067,8 +33067,8 @@
|
||||
"origin" "4931.88 -359.33 61"
|
||||
"angles" "0 1.00179e-005 0"
|
||||
"classname" "script_struct"
|
||||
"zombie_weapon_upgrade" "pdw57_zm"
|
||||
"targetname" "weapon_upgrade"
|
||||
"zombie_weapon_upgrade" "dynamic"
|
||||
"targetname" "buildable_wallbuy"
|
||||
"target" "me4_auto38"
|
||||
"guid" "1A88F438"
|
||||
}
|
||||
@ -33076,7 +33076,7 @@
|
||||
"script_noteworthy" "zstandard_maze, zgrief_maze"
|
||||
"origin" "4931.88 -359.33 61"
|
||||
"angles" "0 1.00179e-005 0"
|
||||
"model" "t6_wpn_smg_pdw57_world"
|
||||
"model" "p6_zm_bu_chalk"
|
||||
"classname" "script_struct"
|
||||
"targetname" "me4_auto38"
|
||||
"guid" "A92D07CF"
|
||||
@ -33086,8 +33086,8 @@
|
||||
"script_noteworthy" "zstandard_maze, zgrief_maze"
|
||||
"origin" "5837.67 1113.62 61"
|
||||
"classname" "script_struct"
|
||||
"zombie_weapon_upgrade" "an94_zm"
|
||||
"targetname" "weapon_upgrade"
|
||||
"zombie_weapon_upgrade" "dynamic"
|
||||
"targetname" "buildable_wallbuy"
|
||||
"target" "me5_auto38"
|
||||
"guid" "CD6140BB"
|
||||
}
|
||||
@ -33096,7 +33096,7 @@
|
||||
"script_noteworthy" "zstandard_maze, zgrief_maze"
|
||||
"targetname" "me5_auto38"
|
||||
"classname" "script_struct"
|
||||
"model" "t6_wpn_ar_an94_world"
|
||||
"model" "p6_zm_bu_chalk"
|
||||
"origin" "5837.67 1113.62 61"
|
||||
"guid" "C6DDEDA5"
|
||||
}
|
||||
@ -33105,8 +33105,8 @@
|
||||
"origin" "4152.17 411.12 62"
|
||||
"angles" "0 270 0"
|
||||
"classname" "script_struct"
|
||||
"zombie_weapon_upgrade" "lsat_zm"
|
||||
"targetname" "weapon_upgrade"
|
||||
"zombie_weapon_upgrade" "dynamic"
|
||||
"targetname" "buildable_wallbuy"
|
||||
"target" "me6_auto38"
|
||||
"guid" "FF59A3C9"
|
||||
}
|
||||
@ -33114,7 +33114,7 @@
|
||||
"script_noteworthy" "zstandard_maze, zgrief_maze"
|
||||
"origin" "4152.17 411.12 62"
|
||||
"angles" "0 270 0"
|
||||
"model" "t6_wpn_lmg_lsat_world"
|
||||
"model" "p6_zm_bu_chalk"
|
||||
"classname" "script_struct"
|
||||
"targetname" "me6_auto38"
|
||||
"guid" "45A420E3"
|
||||
|
@ -4,6 +4,5 @@
|
||||
main()
|
||||
{
|
||||
replaceFunc(clientscripts\mp\zombies\_zm::init_wallbuy_fx, scripts\zm\replaced\_zm::init_wallbuy_fx);
|
||||
replaceFunc(clientscripts\mp\zombies\_zm_weapons::wallbuy_player_connect, scripts\zm\replaced\_zm_weapons::wallbuy_player_connect);
|
||||
replaceFunc(clientscripts\mp\zombies\_zm_weapons::wallbuy_callback_idx, scripts\zm\replaced\_zm_weapons::wallbuy_callback_idx);
|
||||
replaceFunc(clientscripts\mp\zombies\_zm_weapons::init, scripts\zm\replaced\_zm_weapons::init);
|
||||
}
|
@ -169,7 +169,7 @@ main()
|
||||
level.zones["zone_mansion"].is_enabled = 0;
|
||||
maps\mp\zm_buried_fountain::init_fountain();
|
||||
maps\mp\zombies\_zm::spawn_kill_brush((4919, 575, -511), 128, 300);
|
||||
init_wallbuys();
|
||||
level thread init_wallbuys();
|
||||
init_barriers();
|
||||
disable_mansion();
|
||||
scripts\zm\locs\loc_common::init();
|
||||
@ -188,18 +188,25 @@ maze_treasure_chest_init()
|
||||
|
||||
init_wallbuys()
|
||||
{
|
||||
og_weapon_structs = [];
|
||||
structs = getstructarray("weapon_upgrade", "targetname");
|
||||
flag_wait("start_zombie_round_logic");
|
||||
|
||||
wallbuy_structs = [];
|
||||
structs = getstructarray("buildable_wallbuy", "targetname");
|
||||
|
||||
foreach (struct in structs)
|
||||
{
|
||||
if (isDefined(struct.script_noteworthy) && isSubStr(struct.script_noteworthy, "maze"))
|
||||
{
|
||||
og_weapon_structs[og_weapon_structs.size] = struct;
|
||||
wallbuy_structs[wallbuy_structs.size] = struct;
|
||||
}
|
||||
}
|
||||
|
||||
og_weapon_structs = array_randomize(og_weapon_structs);
|
||||
random_weapons = array_randomize(level.buildable_wallbuy_weapons);
|
||||
|
||||
for (i = 0; i < wallbuy_structs.size; i++)
|
||||
{
|
||||
maps\mp\zombies\_zm_weapons::add_dynamic_wallbuy(random_weapons[i], wallbuy_structs[i].target, 1);
|
||||
}
|
||||
}
|
||||
|
||||
init_barriers()
|
||||
|
@ -2,6 +2,76 @@
|
||||
#include clientscripts\mp\_utility;
|
||||
#include clientscripts\mp\zombies\_zm_utility;
|
||||
|
||||
init()
|
||||
{
|
||||
spawn_list = [];
|
||||
spawnable_weapon_spawns = getstructarray("weapon_upgrade", "targetname");
|
||||
spawnable_weapon_spawns = arraycombine(spawnable_weapon_spawns, getstructarray("bowie_upgrade", "targetname"), 1, 0);
|
||||
spawnable_weapon_spawns = arraycombine(spawnable_weapon_spawns, getstructarray("sickle_upgrade", "targetname"), 1, 0);
|
||||
spawnable_weapon_spawns = arraycombine(spawnable_weapon_spawns, getstructarray("tazer_upgrade", "targetname"), 1, 0);
|
||||
spawnable_weapon_spawns = arraycombine(spawnable_weapon_spawns, getstructarray("buildable_wallbuy", "targetname"), 1, 0);
|
||||
|
||||
if (!level.headshots_only)
|
||||
spawnable_weapon_spawns = arraycombine(spawnable_weapon_spawns, getstructarray("claymore_purchase", "targetname"), 1, 0);
|
||||
|
||||
location = level.scr_zm_map_start_location;
|
||||
|
||||
if ((location == "default" || location == "") && isdefined(level.default_start_location))
|
||||
location = level.default_start_location;
|
||||
|
||||
match_string = level.scr_zm_ui_gametype + "_" + location;
|
||||
match_string_plus_space = " " + match_string;
|
||||
|
||||
for (i = 0; i < spawnable_weapon_spawns.size; i++)
|
||||
{
|
||||
spawnable_weapon = spawnable_weapon_spawns[i];
|
||||
|
||||
if (isdefined(spawnable_weapon.zombie_weapon_upgrade) && spawnable_weapon.zombie_weapon_upgrade == "sticky_grenade_zm" && is_true(level.headshots_only))
|
||||
continue;
|
||||
|
||||
if (!isdefined(spawnable_weapon.script_noteworthy) || spawnable_weapon.script_noteworthy == "")
|
||||
{
|
||||
spawn_list[spawn_list.size] = spawnable_weapon;
|
||||
continue;
|
||||
}
|
||||
|
||||
matches = strtok(spawnable_weapon.script_noteworthy, ",");
|
||||
|
||||
for (j = 0; j < matches.size; j++)
|
||||
{
|
||||
if (matches[j] == match_string || matches[j] == match_string_plus_space)
|
||||
spawn_list[spawn_list.size] = spawnable_weapon;
|
||||
}
|
||||
}
|
||||
|
||||
level._active_wallbuys = [];
|
||||
|
||||
for (i = 0; i < spawn_list.size; i++)
|
||||
{
|
||||
spawn_list[i].script_label = spawn_list[i].zombie_weapon_upgrade + "_" + spawn_list[i].origin;
|
||||
level._active_wallbuys[spawn_list[i].script_label] = spawn_list[i];
|
||||
numbits = 2;
|
||||
|
||||
if (isdefined(level._wallbuy_override_num_bits))
|
||||
numbits = level._wallbuy_override_num_bits;
|
||||
|
||||
registerclientfield("world", spawn_list[i].script_label, 1, numbits, "int", ::wallbuy_callback, 0);
|
||||
target_struct = getstruct(spawn_list[i].target, "targetname");
|
||||
|
||||
if (spawn_list[i].targetname == "buildable_wallbuy")
|
||||
{
|
||||
bits = 4;
|
||||
|
||||
if (isdefined(level.buildable_wallbuy_weapons))
|
||||
bits = getminbitcountfornum(level.buildable_wallbuy_weapons.size + 1);
|
||||
|
||||
registerclientfield("world", spawn_list[i].script_label + "_idx", 12000, bits, "int", ::wallbuy_callback_idx, 0);
|
||||
}
|
||||
}
|
||||
|
||||
onplayerconnect_callback(::wallbuy_player_connect);
|
||||
}
|
||||
|
||||
wallbuy_player_connect(localclientnum)
|
||||
{
|
||||
keys = getarraykeys(level._active_wallbuys);
|
||||
|
@ -17,40 +17,56 @@
|
||||
prepare_chalk_weapon_list()
|
||||
{
|
||||
level.buildable_wallbuy_weapons = [];
|
||||
level.buildable_wallbuy_weapons[0] = "vector_zm";
|
||||
level.buildable_wallbuy_weapons[1] = "an94_zm";
|
||||
level.buildable_wallbuy_weapons[2] = "pdw57_zm";
|
||||
level.buildable_wallbuy_weapons[3] = "svu_zm";
|
||||
level.buildable_wallbuy_weapons[4] = "tazer_knuckles_zm";
|
||||
level.buildable_wallbuy_weapons[5] = "870mcs_zm";
|
||||
level.buildable_wallbuy_weapon_hints = [];
|
||||
level.buildable_wallbuy_weapon_hints["vector_zm"] = &"ZM_BURIED_WB_VECTOR";
|
||||
level.buildable_wallbuy_weapon_hints["an94_zm"] = &"ZM_BURIED_WB_AN94";
|
||||
level.buildable_wallbuy_weapon_hints["pdw57_zm"] = &"ZM_BURIED_WB_PDW57";
|
||||
level.buildable_wallbuy_weapon_hints["svu_zm"] = &"ZM_BURIED_WB_SVU";
|
||||
level.buildable_wallbuy_weapon_hints["tazer_knuckles_zm"] = &"ZM_BURIED_WB_TAZER";
|
||||
level.buildable_wallbuy_weapon_hints["870mcs_zm"] = &"ZM_BURIED_WB_870MCS";
|
||||
level.buildable_wallbuy_pickup_hints = [];
|
||||
level.buildable_wallbuy_pickup_hints["vector_zm"] = &"ZM_BURIED_PU_VECTOR";
|
||||
level.buildable_wallbuy_pickup_hints["an94_zm"] = &"ZM_BURIED_PU_AN94";
|
||||
level.buildable_wallbuy_pickup_hints["pdw57_zm"] = &"ZM_BURIED_PU_PDW57";
|
||||
level.buildable_wallbuy_pickup_hints["svu_zm"] = &"ZM_BURIED_PU_SVU";
|
||||
level.buildable_wallbuy_pickup_hints["tazer_knuckles_zm"] = &"ZM_BURIED_PU_TAZER";
|
||||
level.buildable_wallbuy_pickup_hints["870mcs_zm"] = &"ZM_BURIED_PU_870MCS";
|
||||
|
||||
if (getdvar("ui_zm_mapstartlocation") == "maze")
|
||||
{
|
||||
level.buildable_wallbuy_weapons[0] = "saritch_zm";
|
||||
level.buildable_wallbuy_weapons[1] = "ballista_zm";
|
||||
level.buildable_wallbuy_weapons[2] = "beretta93r_zm";
|
||||
level.buildable_wallbuy_weapons[3] = "pdw57_zm";
|
||||
level.buildable_wallbuy_weapons[4] = "an94_zm";
|
||||
level.buildable_wallbuy_weapons[5] = "lsat_zm";
|
||||
|
||||
foreach (buildable_wallbuy_weapon in level.buildable_wallbuy_weapons)
|
||||
{
|
||||
level.buildable_wallbuy_weapon_hints[buildable_wallbuy_weapon] = undefined;
|
||||
level.buildable_wallbuy_pickup_hints[buildable_wallbuy_weapon] = undefined;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
level.buildable_wallbuy_weapons[0] = "vector_zm";
|
||||
level.buildable_wallbuy_weapons[1] = "an94_zm";
|
||||
level.buildable_wallbuy_weapons[2] = "pdw57_zm";
|
||||
level.buildable_wallbuy_weapons[3] = "svu_zm";
|
||||
level.buildable_wallbuy_weapons[4] = "tazer_knuckles_zm";
|
||||
level.buildable_wallbuy_weapons[5] = "870mcs_zm";
|
||||
|
||||
level.buildable_wallbuy_weapon_hints["vector_zm"] = &"ZM_BURIED_WB_VECTOR";
|
||||
level.buildable_wallbuy_weapon_hints["an94_zm"] = &"ZM_BURIED_WB_AN94";
|
||||
level.buildable_wallbuy_weapon_hints["pdw57_zm"] = &"ZM_BURIED_WB_PDW57";
|
||||
level.buildable_wallbuy_weapon_hints["svu_zm"] = &"ZM_BURIED_WB_SVU";
|
||||
level.buildable_wallbuy_weapon_hints["tazer_knuckles_zm"] = &"ZM_BURIED_WB_TAZER";
|
||||
level.buildable_wallbuy_weapon_hints["870mcs_zm"] = &"ZM_BURIED_WB_870MCS";
|
||||
|
||||
level.buildable_wallbuy_pickup_hints["vector_zm"] = &"ZM_BURIED_PU_VECTOR";
|
||||
level.buildable_wallbuy_pickup_hints["an94_zm"] = &"ZM_BURIED_PU_AN94";
|
||||
level.buildable_wallbuy_pickup_hints["pdw57_zm"] = &"ZM_BURIED_PU_PDW57";
|
||||
level.buildable_wallbuy_pickup_hints["svu_zm"] = &"ZM_BURIED_PU_SVU";
|
||||
level.buildable_wallbuy_pickup_hints["tazer_knuckles_zm"] = &"ZM_BURIED_PU_TAZER";
|
||||
level.buildable_wallbuy_pickup_hints["870mcs_zm"] = &"ZM_BURIED_PU_870MCS";
|
||||
}
|
||||
|
||||
level.buildable_wallbuy_weapon_models = [];
|
||||
level.buildable_wallbuy_weapon_models["vector_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["an94_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["pdw57_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["svu_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["tazer_knuckles_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["870mcs_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles = [];
|
||||
level.buildable_wallbuy_weapon_angles["vector_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["an94_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["pdw57_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["svu_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["tazer_knuckles_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["870mcs_zm"] = undefined;
|
||||
|
||||
foreach (buildable_wallbuy_weapon in level.buildable_wallbuy_weapons)
|
||||
{
|
||||
level.buildable_wallbuy_weapon_models[buildable_wallbuy_weapon] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles[buildable_wallbuy_weapon] = undefined;
|
||||
}
|
||||
|
||||
foreach (model in level.buildable_wallbuy_weapon_models)
|
||||
{
|
||||
|
@ -14,24 +14,32 @@ init()
|
||||
prepare_chalk_weapon_list()
|
||||
{
|
||||
level.buildable_wallbuy_weapons = [];
|
||||
level.buildable_wallbuy_weapons[0] = "vector_zm";
|
||||
level.buildable_wallbuy_weapons[1] = "an94_zm";
|
||||
level.buildable_wallbuy_weapons[2] = "pdw57_zm";
|
||||
level.buildable_wallbuy_weapons[3] = "svu_zm";
|
||||
level.buildable_wallbuy_weapons[4] = "tazer_knuckles_zm";
|
||||
level.buildable_wallbuy_weapons[5] = "870mcs_zm";
|
||||
|
||||
if (getdvar("ui_zm_mapstartlocation") == "maze")
|
||||
{
|
||||
level.buildable_wallbuy_weapons[0] = "saritch_zm";
|
||||
level.buildable_wallbuy_weapons[1] = "ballista_zm";
|
||||
level.buildable_wallbuy_weapons[2] = "beretta93r_zm";
|
||||
level.buildable_wallbuy_weapons[3] = "pdw57_zm";
|
||||
level.buildable_wallbuy_weapons[4] = "an94_zm";
|
||||
level.buildable_wallbuy_weapons[5] = "lsat_zm";
|
||||
}
|
||||
else
|
||||
{
|
||||
level.buildable_wallbuy_weapons[0] = "vector_zm";
|
||||
level.buildable_wallbuy_weapons[1] = "an94_zm";
|
||||
level.buildable_wallbuy_weapons[2] = "pdw57_zm";
|
||||
level.buildable_wallbuy_weapons[3] = "svu_zm";
|
||||
level.buildable_wallbuy_weapons[4] = "tazer_knuckles_zm";
|
||||
level.buildable_wallbuy_weapons[5] = "870mcs_zm";
|
||||
}
|
||||
|
||||
level.buildable_wallbuy_weapon_models = [];
|
||||
level.buildable_wallbuy_weapon_models["vector_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["an94_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["pdw57_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["svu_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["tazer_knuckles_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_models["870mcs_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles = [];
|
||||
level.buildable_wallbuy_weapon_angles["vector_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["an94_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["pdw57_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["svu_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["tazer_knuckles_zm"] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles["870mcs_zm"] = undefined;
|
||||
|
||||
foreach (buildable_wallbuy_weapon in level.buildable_wallbuy_weapons)
|
||||
{
|
||||
level.buildable_wallbuy_weapon_models[buildable_wallbuy_weapon] = undefined;
|
||||
level.buildable_wallbuy_weapon_angles[buildable_wallbuy_weapon] = undefined;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user