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

Meat: check for life and kill brushes

Buried: remove life brush below Maze Staircase
This commit is contained in:
Jbleezy
2023-04-01 15:04:59 -07:00
parent 05fa5c242a
commit 87c327d6bd
5 changed files with 66 additions and 6 deletions

View File

@ -192,7 +192,6 @@ main()
flag_set("mansion_door1");
level.zones["zone_mansion"].is_enabled = 0;
maps\mp\zombies\_zm::spawn_kill_brush( (4919, 575, -511), 128, 300 );
maps\mp\zombies\_zm::spawn_kill_brush( (6751, 568, -785), 256, 400 );
init_wallbuys();
init_barriers();
disable_player_spawn_locations();

View File

@ -101,4 +101,50 @@ create_zombie_point_of_interest_attractor_positions( num_attract_dists, diff_per
self notify( "attractor_positions_generated" );
level notify( "attractor_positions_generated" );
}
}
check_point_in_life_brush( origin )
{
life_brushes = getentarray( "life_brush", "script_noteworthy" );
if ( !isdefined( life_brushes ) )
return false;
check_model = spawn( "script_model", origin + vectorscale( ( 0, 0, 1 ), 40.0 ) );
valid_point = 0;
for ( i = 0; i < life_brushes.size; i++ )
{
if ( check_model istouching( life_brushes[i] ) )
{
valid_point = 1;
break;
}
}
check_model delete();
return valid_point;
}
check_point_in_kill_brush( origin )
{
kill_brushes = getentarray( "kill_brush", "script_noteworthy" );
if ( !isdefined( kill_brushes ) )
return false;
check_model = spawn( "script_model", origin + vectorscale( ( 0, 0, 1 ), 40.0 ) );
valid_point = 0;
for ( i = 0; i < kill_brushes.size; i++ )
{
if ( check_model istouching( kill_brushes[i] ) )
{
valid_point = 1;
break;
}
}
check_model delete();
return valid_point;
}

View File

@ -115,15 +115,15 @@ meat_bounce_override( pos, normal, ent, bounce )
return;
}
valid_poi = check_point_in_enabled_zone( pos, undefined, undefined );
valid_drop = scripts\zm\replaced\_zm_utility::check_point_in_life_brush(pos) || (check_point_in_enabled_zone(pos) && !scripts\zm\replaced\_zm_utility::check_point_in_kill_brush(pos));
if ( valid_poi )
if (valid_drop)
{
self hide();
if (level.scr_zm_ui_gametype_obj == "zmeat")
{
level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop( "meat_stink", self.origin );
level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop( "meat_stink", pos );
}
else
{
@ -149,7 +149,7 @@ meat_stink( who )
{
if (level.scr_zm_ui_gametype_obj == "zmeat")
{
valid_drop = check_point_in_enabled_zone( who.origin, undefined, undefined );
valid_drop = scripts\zm\replaced\_zm_utility::check_point_in_life_brush(who.origin) || (check_point_in_enabled_zone(who.origin) && !scripts\zm\replaced\_zm_utility::check_point_in_kill_brush(who.origin));
if (valid_drop)
{
@ -316,7 +316,7 @@ meat_stink_cleanup_on_downed()
if (level.scr_zm_ui_gametype_obj == "zmeat")
{
valid_drop = check_point_in_enabled_zone( self.origin, undefined, undefined );
valid_drop = scripts\zm\replaced\_zm_utility::check_point_in_life_brush(self.origin) || (check_point_in_enabled_zone(self.origin) && !scripts\zm\replaced\_zm_utility::check_point_in_kill_brush(self.origin));
if (valid_drop)
{

View File

@ -0,0 +1,13 @@
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\zombies\_zm_utility;
#include maps\mp\zombies\_zm_zonemgr;
#include maps\mp\zm_buried;
#include maps\mp\gametypes_zm\_zm_gametype;
#include maps\mp\zombies\_zm;
#include maps\mp\zm_buried_ffotd;
spawned_life_triggers()
{
// remove
}

View File

@ -3,6 +3,7 @@
#include maps\mp\zombies\_zm_utility;
#include scripts\zm\replaced\zm_buried_gamemodes;
#include scripts\zm\replaced\zm_buried_ffotd;
#include scripts\zm\replaced\_zm_buildables_pooled;
#include scripts\zm\replaced\_zm_equip_subwoofer;
#include scripts\zm\replaced\_zm_equip_springpad;
@ -20,6 +21,7 @@ main()
replaceFunc(maps\mp\zm_buried_sq::navcomputer_waitfor_navcard, scripts\zm\replaced\_zm_sq::navcomputer_waitfor_navcard);
replaceFunc(maps\mp\zm_buried_gamemodes::init, scripts\zm\replaced\zm_buried_gamemodes::init);
replaceFunc(maps\mp\zm_buried_gamemodes::buildbuildable, scripts\zm\replaced\zm_buried_gamemodes::buildbuildable);
replaceFunc(maps\mp\zm_buried_ffotd::spawned_life_triggers, scripts\zm\replaced\zm_buried_ffotd::spawned_life_triggers);
replaceFunc(maps\mp\zombies\_zm_buildables_pooled::add_buildable_to_pool, scripts\zm\replaced\_zm_buildables_pooled::add_buildable_to_pool);
replaceFunc(maps\mp\zombies\_zm_buildables_pooled::randomize_pooled_buildables, scripts\zm\replaced\_zm_buildables_pooled::randomize_pooled_buildables);
replaceFunc(maps\mp\zombies\_zm_equip_subwoofer::startsubwooferdecay, scripts\zm\replaced\_zm_equip_subwoofer::startsubwooferdecay);