1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-11 23:57:59 -05:00

Turret equipment: fix damaging players

This commit is contained in:
Jbleezy
2022-01-22 10:43:57 -08:00
parent b027a5fc46
commit 2a5f65984a
2 changed files with 10 additions and 4 deletions

View File

@ -269,8 +269,8 @@
* No longer needs to be powered by a Turbine * No longer needs to be powered by a Turbine
* Gets destroyed after being deployed for 30 seconds * Gets destroyed after being deployed for 30 seconds
* Kills on any round in 1-4 shots (normally does 1200 damage max) * Kills on any round in 1-4 shots (normally does 1200 damage max)
* No longer damages players
* Fire type changed from burst fire to continuous fire * Fire type changed from burst fire to continuous fire
* No longer damages players if they have Juggernog
* Fixed a bug where the Turret sounds would continue playing after being picked up * Fixed a bug where the Turret sounds would continue playing after being picked up
### Subsurface Resonator ### Subsurface Resonator

View File

@ -1903,7 +1903,7 @@ melee_weapon_disable_weapon_trading()
player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime ) player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime )
{ {
if (smeansofdeath == "MOD_FALLING") if(smeansofdeath == "MOD_FALLING")
{ {
// remove fall damage being based off max health // remove fall damage being based off max health
ratio = self.maxhealth / 100; ratio = self.maxhealth / 100;
@ -1911,12 +1911,12 @@ player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath,
// increase fall damage beyond 110 // increase fall damage beyond 110
max_damage = 110; max_damage = 110;
if (idamage >= max_damage) if(idamage >= max_damage)
{ {
velocity = abs(self.fall_velocity); velocity = abs(self.fall_velocity);
min_velocity = getDvarInt("bg_fallDamageMinHeight") * 3.25; min_velocity = getDvarInt("bg_fallDamageMinHeight") * 3.25;
max_velocity = getDvarInt("bg_fallDamageMaxHeight") * 2.5; max_velocity = getDvarInt("bg_fallDamageMaxHeight") * 2.5;
if (self.divetoprone) if(self.divetoprone)
{ {
min_velocity = getDvarInt("dtp_fall_damage_min_height") * 4.5; min_velocity = getDvarInt("dtp_fall_damage_min_height") * 4.5;
max_velocity = getDvarInt("dtp_fall_damage_max_height") * 2.75; max_velocity = getDvarInt("dtp_fall_damage_max_height") * 2.75;
@ -1931,6 +1931,12 @@ player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath,
} }
} }
// fix turrets damaging players
if(sweapon == "zombie_bullet_crouch_zm" && smeansofdeath == "MOD_RIFLE_BULLET")
{
idamage = 0;
}
return idamage; return idamage;
} }