if(is_new)
{
self.origin = spn_origin;
- setsize(self, '-16 -16 -24', '16 16 45');
+ setsize(self, PL_MIN_CONST, PL_MAX_CONST);
droptofloor();
/*if(autocvar_cl_spawn_point_model) // needs a model first
const int SERVERFLAG_TEAMPLAY = 2;
const int SERVERFLAG_PLAYERSTATS = 4;
-// FIXME/EXPLAINME: why?
+// FIXME/EXPLAINME: why? Mario: because
vector autocvar_sv_player_maxs = '16 16 45';
vector autocvar_sv_player_mins = '-16 -16 -24';
vector autocvar_sv_player_viewoffset = '0 0 20';
vector autocvar_sv_player_headsize = '24 24 12';
+// not so constant
#ifdef SVQC
#define PL_VIEW_OFS autocvar_sv_player_viewoffset
#define PL_MIN autocvar_sv_player_mins
#define PL_CROUCH_MAX vec3(getstatf(STAT_PL_CROUCH_MAX1), getstatf(STAT_PL_CROUCH_MAX2), getstatf(STAT_PL_CROUCH_MAX3))
#endif
+// a bit more constant
+const vector PL_MAX_CONST = '16 16 45';
+const vector PL_MIN_CONST = '-16 -16 -24';
+
// spawnpoint prios
const int SPAWN_PRIO_NEAR_TEAMMATE_FOUND = 200;
const int SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM = 100;
const int SP_CTF_RETURNS = 9;
// flag constants // for most of these, there is just one question to be asked: WHYYYYY?
-#define FLAG_MIN ('-16 -16 -24' + '0 0 -13')
-#define FLAG_MAX ('16 16 45' + '0 0 -13')
+#define FLAG_MIN (PL_MIN_CONST + '0 0 -13')
+#define FLAG_MAX (PL_MAX_CONST + '0 0 -13')
const float FLAG_SCALE = 0.6;
const vector FLAG_DROP_OFFSET = ('0 0 32');
const vector FLAG_CARRY_OFFSET = ('-16 0 8');
-#define FLAG_SPAWN_OFFSET ('0 0 1' * (45 - 13))
+#define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13))
const vector FLAG_WAYPOINT_OFFSET = ('0 0 64');
const vector FLAG_FLOAT_OFFSET = ('0 0 32');
const vector FLAG_PASS_ARC_OFFSET = ('0 0 -10');
// nudge off the floor
setorigin(self, self.origin + '0 0 1');
- tracebox(self.origin, PL_MIN, PL_MAX, self.origin, true, self);
+ tracebox(self.origin, PL_MIN_CONST, PL_MAX_CONST, self.origin, true, self);
if (trace_startsolid)
{
vector o;
o = self.origin;
- self.mins = PL_MIN;
- self.maxs = PL_MAX;
+ self.mins = PL_MIN_CONST;
+ self.maxs = PL_MAX_CONST;
if (!move_out_of_solid(self))
objerror("could not get out of solid at all!");
print("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1'));