]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/spawnpoints.qc
Merge branch 'master' into TimePath/scrollpanel
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / spawnpoints.qc
index cd393b64196a1cbab9f0128623f3ef8be7adc612..9164b4febec31eb8c7056662c89bb3bbc4920821 100644 (file)
@@ -7,6 +7,7 @@
 #include <common/net_linked.qh>
 #include "../common/teams.qh"
 #include "../common/triggers/subs.qh"
+#include "../common/triggers/target/spawnpoint.qh"
 #include "../common/util.qh"
 #include "../lib/warpzone/common.qh"
 #include "../lib/warpzone/util_server.qh"
@@ -16,9 +17,7 @@ bool SpawnPoint_Send(entity this, entity to, int sf)
        WriteHeader(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT);
 
        WriteByte(MSG_ENTITY, this.team);
-       WriteCoord(MSG_ENTITY, this.origin.x);
-       WriteCoord(MSG_ENTITY, this.origin.y);
-       WriteCoord(MSG_ENTITY, this.origin.z);
+       WriteVector(MSG_ENTITY, this.origin);
 
        return true;
 }
@@ -32,9 +31,7 @@ bool SpawnEvent_Send(entity this, entity to, int sf)
        if(autocvar_g_spawn_alloweffects)
        {
                WriteByte(MSG_ENTITY, etof(this.owner));
-               WriteCoord(MSG_ENTITY, this.owner.origin.x);
-               WriteCoord(MSG_ENTITY, this.owner.origin.y);
-               WriteCoord(MSG_ENTITY, this.owner.origin.z);
+               WriteVector(MSG_ENTITY, this.owner.origin);
                send = true;
        }
        else if((to == this.owner) || (IS_SPEC(to) && (to.enemy == this.owner)) )
@@ -341,6 +338,9 @@ entity SelectSpawnPoint(entity this, bool anypoint)
        if (spot)
                return spot;
 
+       if(this.spawnpoint_targ)
+               return this.spawnpoint_targ;
+
        if(anypoint || autocvar_g_spawn_useallspawns)
                teamcheck = -1;
        else if(have_team_spawns > 0)