1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-13 08:38:01 -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 ### Meat
* All zombies go after player holding the meat * All zombies go after player holding the meat
* 60% move speed while 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 * Decreased time on ground from 16 seconds to 10 seconds
* Bounces off walls when thrown * Bounces off walls when thrown
* Able to drop when players are down * 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 ) meat_bounce_override( pos, normal, ent, bounce )
{ {
if ( isdefined( ent ) && isplayer( ent ) ) if ( isdefined( ent ) && isplayer( ent ) && is_player_valid(ent) && !ent hasWeapon("item_meat_zm") && !is_true(ent.dont_touch_the_meat) )
{
if ( is_player_valid(ent) )
{ {
level thread meat_stink_player( ent ); level thread meat_stink_player( ent );
@ -36,7 +34,6 @@ meat_bounce_override( pos, normal, ent, bounce )
return; return;
} }
}
else else
{ {
players = getplayers(); players = getplayers();
@ -45,10 +42,13 @@ meat_bounce_override( pos, normal, ent, bounce )
foreach (player in players) foreach (player in players)
{ {
if ( self.owner == player ) if ( !is_player_valid(player) )
continue; continue;
if ( !is_player_valid(player) ) if ( player hasWeapon("item_meat_zm") )
continue;
if ( is_true(player.dont_touch_the_meat) )
continue; continue;
distsq = distancesquared( pos, player.origin ); distsq = distancesquared( pos, player.origin );
@ -74,9 +74,9 @@ meat_bounce_override( pos, normal, ent, bounce )
return; return;
} }
}
playfx( level._effect["meat_impact"], self.origin ); playfx( level._effect["meat_impact"], self.origin );
}
if (is_true(bounce)) 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 ); valid_poi = check_point_in_enabled_zone( pos, undefined, undefined );
if ( valid_poi ) if ( valid_poi )
@ -98,7 +96,6 @@ meat_bounce_override( pos, normal, ent, bounce )
if (level.scr_zm_ui_gametype_obj == "zmeat") 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 ); level.meat_powerup = maps\mp\zombies\_zm_powerups::specific_powerup_drop( "meat_stink", self.origin );
} }
else else
@ -110,7 +107,6 @@ meat_bounce_override( pos, normal, ent, bounce )
{ {
level notify("meat_inactive"); level notify("meat_inactive");
} }
}
self delete(); self delete();
} }