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

Encounter: upgraded melee pushes farther

This commit is contained in:
Jbleezy
2023-03-12 04:56:00 -07:00
parent 3f4f52ec19
commit d4da69855e
2 changed files with 62 additions and 18 deletions

View File

@ -506,6 +506,7 @@
* Unupgraded weapons stun enemy players for 0.375 seconds * Unupgraded weapons stun enemy players for 0.375 seconds
* Upgraded weapons stun enemy players for 0.5 seconds * Upgraded weapons stun enemy players for 0.5 seconds
* Melee weapons stun enemy players for 0.75 seconds * Melee weapons stun enemy players for 0.75 seconds
* Meleeing enemy players with an upgraded melee weapon pushes 25% more
* Meleeing enemy players that are crouched pushes 25% less * Meleeing enemy players that are crouched pushes 25% less
* Meleeing enemy players that are prone pushes 50% less * Meleeing enemy players that are prone pushes 50% less
* Meleeing enemy players that are reviving pushes 50% less * Meleeing enemy players that are reviving pushes 50% less

View File

@ -1777,35 +1777,78 @@ game_module_player_damage_callback( einflictor, eattacker, idamage, idflags, sme
} }
is_melee = false; is_melee = false;
is_reviving = false;
if(isDefined(eattacker) && isplayer(eattacker) && eattacker != self && eattacker.team != self.team && (smeansofdeath == "MOD_MELEE" || issubstr(sweapon, "knife_ballistic"))) if(isDefined(eattacker) && isplayer(eattacker) && eattacker != self && eattacker.team != self.team && (smeansofdeath == "MOD_MELEE" || issubstr(sweapon, "knife_ballistic")))
{ {
is_melee = true; is_melee = true;
dir = vdir; dir = vdir;
amount = 420; // 48 units amount = 0;
if(self getStance() == "crouch")
if (self maps\mp\zombies\_zm_laststand::is_reviving_any())
{ {
amount = 327.5; // 36 units if (idamage >= 500)
{
if (self getStance() == "stand")
{
amount = 280; // 30 units
} }
else if(self getStance() == "prone") if (self getStance() == "crouch")
{
amount = 225; // 22.5 units
}
else if (self getStance() == "prone")
{
amount = 166.25; // 15 units
}
}
else
{
if (self getStance() == "stand")
{ {
amount = 235; // 24 units amount = 235; // 24 units
} }
if (self getStance() == "crouch")
if(self maps\mp\zombies\_zm_laststand::is_reviving_any())
{
is_reviving = true;
amount = 235; // 24 units
if(self getStance() == "crouch")
{ {
amount = 187.5; // 18 units amount = 187.5; // 18 units
} }
else if(self getStance() == "prone") else if (self getStance() == "prone")
{ {
amount = 142.5; // 12 units amount = 142.5; // 12 units
} }
} }
}
else
{
if (idamage >= 500)
{
if (self getStance() == "stand")
{
amount = 510; // 60 units
}
if (self getStance() == "crouch")
{
amount = 395; // 45 units
}
else if (self getStance() == "prone")
{
amount = 280; // 30 units
}
}
else
{
if (self getStance() == "stand")
{
amount = 420; // 48 units
}
if (self getStance() == "crouch")
{
amount = 327.5; // 36 units
}
else if (self getStance() == "prone")
{
amount = 235; // 24 units
}
}
}
if(self isOnGround()) if(self isOnGround())
{ {