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

Meat powerup: thrower can meat themself

This commit is contained in:
Jbleezy
2023-03-12 01:06:40 -08:00
parent 251e1974e2
commit 5e9cbcceec
2 changed files with 29 additions and 32 deletions

View File

@ -302,6 +302,7 @@
### Meat
* All zombies go after player holding the meat
* 60% move speed while holding the meat
* Player who threw the meat can meat themself
* Decreased time on ground from 16 seconds to 10 seconds
* Bounces off walls when thrown
* Able to drop when players are down

View File

@ -20,9 +20,7 @@ game_mode_spawn_player_logic()
meat_bounce_override( pos, normal, ent, bounce )
{
if ( isdefined( ent ) && isplayer( ent ) )
{
if ( is_player_valid(ent) )
if ( isdefined( ent ) && isplayer( ent ) && is_player_valid(ent) && !ent hasWeapon("item_meat_zm") && !is_true(ent.dont_touch_the_meat) )
{
level thread meat_stink_player( ent );
@ -36,7 +34,6 @@ meat_bounce_override( pos, normal, ent, bounce )
return;
}
}
else
{
players = getplayers();
@ -45,10 +42,13 @@ meat_bounce_override( pos, normal, ent, bounce )
foreach (player in players)
{
if ( self.owner == player )
if ( !is_player_valid(player) )
continue;
if ( !is_player_valid(player) )
if ( player hasWeapon("item_meat_zm") )
continue;
if ( is_true(player.dont_touch_the_meat) )
continue;
distsq = distancesquared( pos, player.origin );
@ -74,9 +74,9 @@ meat_bounce_override( pos, normal, ent, bounce )
return;
}
}
playfx( level._effect["meat_impact"], self.origin );
}
if (is_true(bounce))
{
@ -88,8 +88,6 @@ meat_bounce_override( pos, normal, ent, bounce )
}
}
if (!isDefined(level.meat_powerup) && !isDefined(level.meat_player))
{
valid_poi = check_point_in_enabled_zone( pos, undefined, undefined );
if ( valid_poi )
@ -98,7 +96,6 @@ meat_bounce_override( pos, normal, ent, bounce )
if (level.scr_zm_ui_gametype_obj == "zmeat")
{
level notify("meat_powerup_drop");
level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop( "meat_stink", self.origin );
}
else
@ -110,7 +107,6 @@ meat_bounce_override( pos, normal, ent, bounce )
{
level notify("meat_inactive");
}
}
self delete();
}