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

Die Rise: move Mystery Box in Green Rooftop Behind Restaurant zone

This commit is contained in:
Jbleezy
2024-03-27 00:21:33 -07:00
parent 8592798d4d
commit 592a793763
3 changed files with 102 additions and 4 deletions

View File

@ -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")