]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/portals.qc
Fix race not starting (game ends) when the qualifying session ends (everyone readied...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / portals.qc
index 8f311f169ce32bd5842c2b0dbbcdcfc8507ed93d..e3cba938335f83b3752732db2bdbe7f8bebe95a1 100644 (file)
@@ -4,7 +4,7 @@
 #include "mutators/all.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes/all.qh"
-#include "../common/notifications.qh"
+#include "../common/notifications/all.qh"
 #include "../common/triggers/teleporters.qh"
 #include "../common/triggers/subs.qh"
 #include "../common/util.qh"
@@ -208,8 +208,8 @@ float Portal_FindSafeOrigin(entity portal)
 {
        vector o;
        o = portal.origin;
-       portal.mins = PL_MIN - SAFERNUDGE;
-       portal.maxs = PL_MAX + SAFERNUDGE;
+       portal.mins = STAT(PL_MIN, NULL) - SAFERNUDGE;
+       portal.maxs = STAT(PL_MAX, NULL) + SAFERNUDGE;
        fixedmakevectors(portal.mangle);
        portal.origin += 16 * v_forward;
        if(!move_out_of_solid(portal))
@@ -428,16 +428,16 @@ void Portal_Remove(entity portal, float killed)
        }
 }
 
-void Portal_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{SELFPARAM();
+void Portal_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+{
        if(deathtype == DEATH_TELEFRAG.m_id)
                return;
-       if(attacker != self.aiment)
-               if(IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(self.aiment))
+       if(attacker != this.aiment)
+               if(IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(this.aiment))
                        return;
-       self.health -= damage;
-       if(self.health < 0)
-               Portal_Remove(self, 1);
+       this.health -= damage;
+       if(this.health < 0)
+               Portal_Remove(this, 1);
 }
 
 void Portal_Think_TryTeleportPlayer(entity e, vector g)