]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/server.qc
Merge branch 'master' into Lyberta/KillSound
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / server.qc
index 6db6122352511d9640ac75baf603103a4e96ce65..ce4535452da5405d3b57495462ac51d27c9dd1ce 100644 (file)
 
 void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity)
 {
+#ifdef SVQC
+       player.lastteleport_origin = player.origin;
+       player.lastteleporttime = time;
+#endif
        setorigin(player, to); // NOTE: this also aborts the move, when this is called by touch
 #ifdef SVQC
        player.oldorigin = to; // for DP's unsticking
@@ -57,9 +61,7 @@ void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector
 bool WarpZone_Teleported_Send(entity this, entity to, int sf)
 {
        WriteHeader(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED);
-       WriteCoord(MSG_ENTITY, this.angles.x);
-       WriteCoord(MSG_ENTITY, this.angles.y);
-       WriteCoord(MSG_ENTITY, this.angles.z);
+       WriteVector(MSG_ENTITY, this.angles);
        return true;
 }
 #endif
@@ -175,11 +177,7 @@ void WarpZone_Touch(entity this, entity toucher)
                return;
 
        // FIXME needs a better check to know what is safe to teleport and what not
-       if((toucher.move_movetype == MOVETYPE_NONE && toucher.move_movetype == MOVETYPE_NONE) || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.tag_entity
-#ifdef CSQC
-       || tag_networkentity
-#endif
-       )
+       if(toucher.move_movetype == MOVETYPE_NONE || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.tag_entity)
                return;
 
        if(WarpZoneLib_ExactTrigger_Touch(this, toucher))