X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fportals.qc;h=d5b14bcdd87cc37603383746944c2f1b2daf6eae;hp=75dae14bf5f28d666e9beb91e820e912389a1a54;hb=e14bb786305e05541496fb5b28c090e0ff1b5783;hpb=b9ba93fc571cdcdfb7da9375cdd877f5c9927814 diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 75dae14bf..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); @@ -172,7 +172,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player) { // telefrag within 1 second of portal creation = amazing if(time < teleporter.teleport_time + 1) - AnnounceTo(player, "amazing"); + Send_Notification(NOTIF_ONE, player, MSG_ANNCE, ANNCE_ACHIEVEMENT_AMAZING); } if not(teleporter.enemy) @@ -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); @@ -309,8 +309,8 @@ void Portal_MakeBrokenPortal(entity portal) { portal.skin = 2; portal.solid = SOLID_NOT; - portal.touch = SUB_Null; - portal.think = SUB_Null; + portal.touch = func_null; + portal.think = func_null; portal.effects = 0; portal.nextthink = 0; portal.takedamage = DAMAGE_NO; @@ -320,8 +320,8 @@ void Portal_MakeWaitingPortal(entity portal) { portal.skin = 2; portal.solid = SOLID_NOT; - portal.touch = SUB_Null; - portal.think = SUB_Null; + portal.touch = func_null; + portal.think = func_null; portal.effects = EF_ADDITIVE; portal.nextthink = 0; portal.takedamage = DAMAGE_YES; @@ -342,8 +342,8 @@ void Portal_MakeOutPortal(entity portal) { portal.skin = 1; portal.solid = SOLID_NOT; - portal.touch = SUB_Null; - portal.think = SUB_Null; + portal.touch = func_null; + portal.think = func_null; portal.effects = EF_STARDUST | EF_BLUE; portal.nextthink = 0; portal.takedamage = DAMAGE_YES; @@ -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) {