From: Mario Date: Fri, 26 Oct 2018 07:11:48 +0000 (+1000) Subject: Don't respawn frozen non-players when touching the void X-Git-Tag: xonotic-v0.8.5~1743 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5de12ffb837da41082e80015a3dca1f46c68eed4;p=xonotic%2Fxonotic-data.pk3dir.git Don't respawn frozen non-players when touching the void --- diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index e9ab3d79a..1b8f838aa 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -689,12 +689,9 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de } } - if(STAT(FROZEN, targ)) - if(deathtype != DEATH_HURTTRIGGER.m_id && deathtype != DEATH_TEAMCHANGE.m_id && deathtype != DEATH_AUTOTEAMCHANGE.m_id) + if(deathtype != DEATH_HURTTRIGGER.m_id && deathtype != DEATH_TEAMCHANGE.m_id && deathtype != DEATH_AUTOTEAMCHANGE.m_id && STAT(FROZEN, targ)) { - if(autocvar_g_frozen_revive_falldamage > 0) - if(deathtype == DEATH_FALL.m_id) - if(damage >= autocvar_g_frozen_revive_falldamage) + if(autocvar_g_frozen_revive_falldamage > 0 && deathtype == DEATH_FALL.m_id && damage >= autocvar_g_frozen_revive_falldamage) { Unfreeze(targ, false); SetResourceAmount(targ, RESOURCE_HEALTH, autocvar_g_frozen_revive_falldamage_health); @@ -707,7 +704,7 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de force *= autocvar_g_frozen_force; } - if(STAT(FROZEN, targ) && deathtype == DEATH_HURTTRIGGER.m_id && !autocvar_g_frozen_damage_trigger) + if(IS_PLAYER(targ) && STAT(FROZEN, targ) && deathtype == DEATH_HURTTRIGGER.m_id && !autocvar_g_frozen_damage_trigger) { Send_Effect(EFFECT_TELEPORT, targ.origin, '0 0 0', 1);