From 592a793763b9d2dce0947dd5eec58e5e8562c9de Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Wed, 27 Mar 2024 00:21:33 -0700 Subject: [PATCH] Die Rise: move Mystery Box in Green Rooftop Behind Restaurant zone --- README.md | 1 + maps/mp/zm_highrise.d3dbsp | 20 +++++++-- scripts/zm/_zm_reimagined.gsc | 85 +++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 56a0b0ea..58c36685 100644 --- a/README.md +++ b/README.md @@ -945,6 +945,7 @@ ### Die Rise * Added M27 to the Mystery Box * Added Fire Sale powerup +* Moved Mystery Box in Green Rooftop Behind Restaurant zone to Green Rooftop Restaurant zone * Removed key * Elevators and escape pod can be called without key * Added purchase cost to call elevators and escape pod diff --git a/maps/mp/zm_highrise.d3dbsp b/maps/mp/zm_highrise.d3dbsp index c8c4761d..6130b01d 100644 --- a/maps/mp/zm_highrise.d3dbsp +++ b/maps/mp/zm_highrise.d3dbsp @@ -25355,8 +25355,20 @@ "guid" "EC50B643" } { -"origin" "2182.75 2454.49 3053" -"angles" "0 1.00179e-005 0" +"classname" "script_model" +"origin" "2179 2476 3040" +"angles" "0 90 0" +"model" "p6_zm_hr_inv_kitchen_cabinet_02" +} +{ +"classname" "script_model" +"origin" "2227 2461 3054" +"angles" "90 0 0" +"model" "p_glo_cardboardboxshortclosed_1" +} +{ +"origin" "2286 2067 3053" +"angles" "0 90 0" "targetname" "treasure_chest_use" "zombie_cost" "950" "classname" "script_struct" @@ -25364,10 +25376,10 @@ "guid" "871F4144" } { -"origin" "2182.75 2454.49 3053" +"origin" "2286 2067 3053" "script_noteworthy" "gb1_chest_zbarrier" "type" "zmcore_MagicBox" -"angles" "0 1.00179e-005 0" +"angles" "0 90 0" "barrieranimtime" "0" "showalternatemodel" "0" "showupgradedmodel" "0" diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index 42920194..26465ece 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -152,6 +152,8 @@ init() weapon_changes(); + spawn_mystery_box_blocks_and_collision(); + spawn_intercom_ents(); add_fire_sale_vox(); @@ -203,6 +205,89 @@ precache_status_icons() } } +spawn_mystery_box_blocks_and_collision() +{ + chests_to_spawn_ents = []; + + foreach (chest in level.chests) + { + if (!isDefined(chest.script_noteworthy)) + { + continue; + } + + if (level.script == "zm_highrise") + { + if (chest.script_noteworthy == "gb1_chest") + { + chests_to_spawn_ents[chests_to_spawn_ents.size] = chest; + } + } + } + + if (chests_to_spawn_ents.size == 0) + { + return; + } + + precacheModel("p_glo_cinder_block"); + + foreach (chest in chests_to_spawn_ents) + { + // spawn cinder blocks + for (i = 0; i < 8; i++) + { + block = spawn("script_model", chest.origin); + block.angles = chest.angles + (0, 90, 0); + + block.origin += anglesToRight(chest.angles) * -5; + block.origin += anglesToForward(chest.angles) * (37.5 + (i % 4 * -25)); + + if (i >= 4) + { + block.angles += (0, 0, 90); + block.origin += anglesToUp(chest.angles) * -12; + } + else + { + block.origin += anglesToUp(chest.angles) * -4; + } + + if (i % 4 == 0) + { + block.angles += (0, -45, 0); + } + else if (i % 4 == 1) + { + block.angles += (0, 22.5, 0); + } + else if (i % 4 == 2) + { + block.angles += (0, -5, 0); + } + else if (i % 4 == 3) + { + block.angles += (0, 22.5, 0); + } + + block setModel("p_glo_cinder_block"); + } + + // spawn collision + for (i = 0; i < 3; i++) + { + collision = spawn("script_model", chest.origin, 1); + collision.angles = chest.angles; + + collision.origin += anglesToForward(chest.angles) * (32 + (i * -32)); + collision.origin += anglesToUp(chest.angles) * 64; + + collision setModel("collision_clip_32x32x128"); + collision disconnectPaths(); + } + } +} + spawn_intercom_ents() { if (level.script != "zm_transit" && level.script != "zm_highrise")