]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't respawn frozen non-players when touching the void
authorMario <mario@smbclan.net>
Fri, 26 Oct 2018 07:11:48 +0000 (17:11 +1000)
committerMario <mario@smbclan.net>
Fri, 26 Oct 2018 07:11:48 +0000 (17:11 +1000)
qcsrc/server/g_damage.qc

index e9ab3d79ac945a2fa9cec1cf2a392b16aa72fbe0..1b8f838aa43d0bd4d4d9ac31742da5f5e382d432 100644 (file)
@@ -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);