mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-07-07 20:38:09 -05:00
Fall damage uses engine damage if below 110
This commit is contained in:
@ -1688,22 +1688,25 @@ player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath,
|
||||
ratio = self.maxhealth / 100;
|
||||
idamage = int(idamage / ratio);
|
||||
|
||||
min_velocity = 420;
|
||||
max_velocity = 740;
|
||||
if (self.divetoprone)
|
||||
{
|
||||
min_velocity = 300;
|
||||
max_velocity = 560;
|
||||
}
|
||||
diff_velocity = max_velocity - min_velocity;
|
||||
velocity = abs(self.fall_velocity);
|
||||
if (velocity < min_velocity)
|
||||
{
|
||||
velocity = min_velocity;
|
||||
}
|
||||
|
||||
// increase fall damage beyond 110
|
||||
idamage = int(((velocity - min_velocity) / diff_velocity) * 110);
|
||||
if (idamage >= 110)
|
||||
{
|
||||
min_velocity = 420;
|
||||
max_velocity = 740;
|
||||
if (self.divetoprone)
|
||||
{
|
||||
min_velocity = 300;
|
||||
max_velocity = 560;
|
||||
}
|
||||
diff_velocity = max_velocity - min_velocity;
|
||||
velocity = abs(self.fall_velocity);
|
||||
if (velocity < min_velocity)
|
||||
{
|
||||
velocity = min_velocity;
|
||||
}
|
||||
|
||||
idamage = int(((velocity - min_velocity) / diff_velocity) * 110);
|
||||
}
|
||||
}
|
||||
|
||||
return idamage;
|
||||
|
Reference in New Issue
Block a user