#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"
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;
}
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)) )
this.maxs = PL_MAX_CONST;
if (!move_out_of_solid(this))
objerror(this, "could not get out of solid at all!");
- LOG_INFO("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1'));
- LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(this.origin.x - o.x));
- LOG_INFO(" ", ftos(this.origin.y - o.y));
- LOG_INFO(" ", ftos(this.origin.z - o.z), "'\n");
+ LOG_INFOF(
+ "^1NOTE: this map needs FIXING. Spawnpoint at %s needs to be moved out of solid, e.g. by %s",
+ vtos(o - '0 0 1'),
+ vtos(this.origin - o)
+ );
if (autocvar_g_spawnpoints_auto_move_out_of_solid)
{
if (!spawnpoint_nag)
- LOG_INFO("\{1}^1NOTE: this map needs FIXING (it contains spawnpoints in solid, see server log)\n");
+ LOG_INFO("\{1}^1NOTE: this map needs FIXING (it contains spawnpoints in solid, see server log)");
spawnpoint_nag = 1;
}
else
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)