1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-22 05:00:54 -05:00

Buried: drawing weapons no longer gives points

This commit is contained in:
Jbleezy
2023-04-03 17:38:43 -07:00
parent 7f14ad52fd
commit 30c9ceb0aa
2 changed files with 56 additions and 0 deletions

View File

@ -70,6 +70,7 @@ init()
add_jug_collision();
level thread update_buildable_stubs();
level thread remove_chalk_draw_points();
level thread enable_fountain_transport();
level thread disable_ghost_free_perk_on_damage();
level thread sloth_trap();
@ -267,6 +268,60 @@ update_buildable_stubs()
}
}
remove_chalk_draw_points()
{
flag_wait( "initial_blackscreen_passed" );
wait 1;
foreach (stub in level.buildable_stubs)
{
if ( stub.equipname == "chalk" )
{
stub.buildablestruct.onuseplantobject = ::onuseplantobject_chalk;
}
}
}
onuseplantobject_chalk( entity )
{
piece = entity maps\mp\zombies\_zm_buildables::player_get_buildable_piece( 1 );
if ( isdefined( piece ) )
{
weapon = piece.script_noteworthy;
if ( isdefined( weapon ) )
{
origin = self.origin;
angles = self.angles;
if ( isdefined( level._effect["wallbuy_replace"] ) )
playfx( level._effect["wallbuy_replace"], origin, anglestoforward( angles ) );
maps\mp\zombies\_zm_weapons::add_dynamic_wallbuy( weapon, self.target, 1 );
if ( !isdefined( level.built_wallbuys ) )
level.built_wallbuys = 0;
level.built_wallbuys++;
if ( isplayer( entity ) )
{
entity maps\mp\zombies\_zm_stats::increment_client_stat( "buried_wallbuy_placed", 0 );
entity maps\mp\zombies\_zm_stats::increment_player_stat( "buried_wallbuy_placed" );
entity maps\mp\zombies\_zm_stats::increment_client_stat( "buried_wallbuy_placed_" + weapon, 0 );
entity maps\mp\zombies\_zm_stats::increment_player_stat( "buried_wallbuy_placed_" + weapon );
}
if ( level.built_wallbuys >= 6 )
{
level.built_wallbuys = -100;
}
}
}
}
enable_fountain_transport()
{
if (!is_gametype_active("zclassic"))