SERVER: Fix radius explosions misbehaving around clinets

This commit is contained in:
cypress 2023-11-12 11:07:06 -05:00
parent fb40427c3c
commit 4be7dbcce6

View file

@ -581,12 +581,14 @@ void(entity inflictor, entity attacker, float damage2, float mindamage, float ra
while (ent != world) while (ent != world)
{ {
if(ent.classname == "player" && inflictor.owner == ent) // we don't want OUR explosives to harm other players.. if(ent.classname == "player")
{ {
if (ent.perks & P_FLOP) // PhD Flopper makes us immune to any explosive damage if (ent.perks & P_FLOP) // PhD Flopper makes us immune to any explosive damage
final_damage = 0; final_damage = 0;
else if (inflictor.classname == "betty") // Self-inflicted betties don't do damage either. else if (inflictor.classname == "betty") // Self-inflicted betties don't do damage either.
final_damage = 0; final_damage = 0;
else if (inflictor.owner != ent) // we don't want OUR explosives to harm other players..
final_damage = 0;
else else
{ {
final_damage = (radius - vlen(inflictor.origin - ent.origin))*1.5; final_damage = (radius - vlen(inflictor.origin - ent.origin))*1.5;