]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_freezetag.qc
Merge branch 'master' into Mario/monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_freezetag.qc
index 325b6c29c891633af5dab355785051e96230853f..c1cb5b85145ae42db57d844c1264552f60fb6a17 100644 (file)
@@ -406,9 +406,9 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink)
                n = 0;
                FOR_EACH_PLAYER(other) if(self != other)
                {
-                       if(!other.frozen)
+                       if(other.frozen == 0)
                        {
-                               if(other.team == self.team)
+                               if(SAME_TEAM(other, self))
                                {
                                        if(boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax))
                                        {
@@ -481,6 +481,17 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDamage_Calculate)
 {
        if(frag_target.frozen == 1 && frag_deathtype != DEATH_HURTTRIGGER)
        {
+               if(autocvar_g_freezetag_revive_falldamage > 0)
+               if(frag_deathtype == DEATH_FALL)
+               if(frag_damage >= autocvar_g_freezetag_revive_falldamage)
+               {
+                       freezetag_Unfreeze(frag_target);
+                       frag_target.health = autocvar_g_freezetag_revive_falldamage_health;
+                       pointparticles(particleeffectnum("iceorglass"), frag_target.origin, '0 0 0', 3);
+                       Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, frag_target.netname);
+                       Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_REVIVE_FALL);
+               }
+       
                frag_damage = 0;
                frag_force = frag_force * autocvar_g_freezetag_frozen_force;
        }