mirror of
https://github.com/nzp-team/quakec.git
synced 2025-02-08 09:21:45 +00:00
SERVER Add fix for raygun runaway loop
This commit is contained in:
parent
5d8af19ecc
commit
09c2802675
1 changed files with 16 additions and 5 deletions
|
@ -561,7 +561,10 @@ void(entity inflictor, entity attacker, float damage2, float mindamage, float ra
|
||||||
final_damage = radius - vlen(inflictor.origin - ent.origin);
|
final_damage = radius - vlen(inflictor.origin - ent.origin);
|
||||||
|
|
||||||
if(final_damage < 0)
|
if(final_damage < 0)
|
||||||
|
{
|
||||||
|
ent = ent.chain;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (final_damage > radius * 0.6)
|
if (final_damage > radius * 0.6)
|
||||||
final_damage = 100;
|
final_damage = 100;
|
||||||
|
@ -588,7 +591,10 @@ void(entity inflictor, entity attacker, float damage2, float mindamage, float ra
|
||||||
final_damage *= 4;
|
final_damage *= 4;
|
||||||
|
|
||||||
if (final_damage < 0)
|
if (final_damage < 0)
|
||||||
|
{
|
||||||
|
ent = ent.chain;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ent.health -= final_damage;
|
ent.health -= final_damage;
|
||||||
|
|
||||||
|
@ -607,7 +613,8 @@ void(entity inflictor, entity attacker, float damage2, float mindamage, float ra
|
||||||
if (mapname == "ndu" && ent.classname == "ai_zombie" && inflictor.classname == "explosive_barrel") {
|
if (mapname == "ndu" && ent.classname == "ai_zombie" && inflictor.classname == "explosive_barrel") {
|
||||||
ach_tracker_barr++;
|
ach_tracker_barr++;
|
||||||
|
|
||||||
if (ach_tracker_barr >= 15) {
|
if (ach_tracker_barr >= 15)
|
||||||
|
{
|
||||||
GiveAchievement(13);
|
GiveAchievement(13);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -621,9 +628,13 @@ void(entity inflictor, entity attacker, float damage2, float mindamage, float ra
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mindamage == 75)
|
if (mindamage == 75)
|
||||||
|
{
|
||||||
final_damage = (200 * multi) + 185;
|
final_damage = (200 * multi) + 185;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
final_damage = (mindamage + damage2)/2;
|
final_damage = (mindamage + damage2)/2;
|
||||||
|
}
|
||||||
|
|
||||||
if (final_damage > 0)
|
if (final_damage > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue