X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fportals.qc;h=d5b14bcdd87cc37603383746944c2f1b2daf6eae;hb=48e191468eb22f3b56fc45556446c0e293368d5e;hp=f0b9c5b21861a8095913ca6fc3066a53590c4411;hpb=e9fe9e8b1f5d0ec947bd6a1f0c1e5fcb469730c9;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index f0b9c5b21..d5b14bcdd 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -146,7 +146,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player) //print(vtos(to), "\n"); // ang_x stuff works around weird quake angles - if(player.classname == "player") + if(IS_PLAYER(player)) ang = Portal_ApplyTransformToPlayerAngle(transform, player.v_angle); else ang = AnglesTransform_ApplyToAngles(transform, player.angles); @@ -244,7 +244,7 @@ void Portal_Touch() if(self.solid != SOLID_TRIGGER) return; // possibly engine bug - if(other.classname == "player") + if(IS_PLAYER(other)) return; // handled by think #endif @@ -277,11 +277,11 @@ void Portal_Touch() return; } if(other != self.aiment) - if(other.classname == "player") + if(IS_PLAYER(other)) if(IS_INDEPENDENT_PLAYER(other) || IS_INDEPENDENT_PLAYER(self.aiment)) return; // cannot go through someone else's portal if(other.aiment != self.aiment) - if(other.aiment.classname == "player") + if(IS_PLAYER(other.aiment)) if(IS_INDEPENDENT_PLAYER(other.aiment) || IS_INDEPENDENT_PLAYER(self.aiment)) return; // cannot go through someone else's portal fixedmakevectors(self.mangle); @@ -479,7 +479,7 @@ void Portal_Think() float Portal_Customize() { - if(other.classname == "spectator") + if(IS_SPEC(other)) other = other.enemy; if(other == self.aiment) {