]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/misc/teleport_dest.qc
Merge branch 'master' into terencehill/min_spec_time
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / misc / teleport_dest.qc
index ab15a689192c50ac21e2c639b54c3d26f951d8ac..40c7d46c42803ce65dc2411a5da2847d190791b0 100644 (file)
@@ -1,3 +1,4 @@
+#include "teleport_dest.qh"
 REGISTER_NET_LINKED(ENT_CLIENT_TELEPORT_DEST)
 
 #ifdef SVQC
@@ -12,9 +13,7 @@ bool teleport_dest_send(entity this, entity to, int sf)
                WriteByte(MSG_ENTITY, this.cnt);
                WriteCoord(MSG_ENTITY, this.speed);
                WriteString(MSG_ENTITY, this.targetname);
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
+               WriteVector(MSG_ENTITY, this.origin);
 
                WriteAngle(MSG_ENTITY, this.mangle_x);
                WriteAngle(MSG_ENTITY, this.mangle_y);
@@ -54,11 +53,6 @@ spawnfunc(misc_teleporter_dest)
        spawnfunc_info_teleport_destination(this);
 }
 
-spawnfunc(target_teleporter)
-{
-       spawnfunc_info_teleport_destination(this);
-}
-
 #elif defined(CSQC)
 
 void teleport_dest_remove(entity this)
@@ -82,9 +76,7 @@ NET_HANDLE(ENT_CLIENT_TELEPORT_DEST, bool isnew)
                this.cnt = ReadByte();
                this.speed = ReadCoord();
                this.targetname = strzone(ReadString());
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
 
                this.mangle_x = ReadAngle();
                this.mangle_y = ReadAngle();