loc += tele_target.origin + '0 0 128' * iteration_scale;
- tracebox(loc, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), loc, MOVE_NORMAL, player);
+ tracebox(loc, STAT(PL_MIN, player), STAT(PL_MAX, player), loc, MOVE_NORMAL, player);
if(trace_fraction == 1.0 && !trace_startsolid)
{
traceline(tele_target.origin, loc, MOVE_NOMONSTERS, tele_target); // double check to make sure we're not spawning outside the NULL
iteration_scale -= i / 10;
loc = closest_target.origin + '0 0 96' * iteration_scale;
loc += ('0 1 0' * random()) * 128 * iteration_scale;
- tracebox(loc, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), loc, MOVE_NORMAL, player);
+ tracebox(loc, STAT(PL_MIN, player), STAT(PL_MAX, player), loc, MOVE_NORMAL, player);
if(trace_fraction == 1.0 && !trace_startsolid)
{
traceline(closest_target.origin, loc, MOVE_NOMONSTERS, closest_target); // double check to make sure we're not spawning outside the NULL
iteration_scale -= i / 10;
loc = closest_target.origin + '0 0 128' * iteration_scale;
loc += ('0 1 0' * random()) * 256 * iteration_scale;
- tracebox(loc, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), loc, MOVE_NORMAL, player);
+ tracebox(loc, STAT(PL_MIN, player), STAT(PL_MAX, player), loc, MOVE_NORMAL, player);
if(trace_fraction == 1.0 && !trace_startsolid)
{
traceline(closest_target.origin, loc, MOVE_NOMONSTERS, closest_target); // double check to make sure we're not spawning outside the NULL
switch(i)
{
case 0:
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_forward * 64 + v_right * 128 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_forward * 64 + v_right * 128 + v_up * 64, MOVE_NOMONSTERS, it);
break;
case 1:
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_forward * 64 - v_right * 128 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_forward * 64 - v_right * 128 + v_up * 64, MOVE_NOMONSTERS, it);
break;
case 2:
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin + v_right * 192 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin + v_right * 192 + v_up * 64, MOVE_NOMONSTERS, it);
break;
case 3:
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_right * 192 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_right * 192 + v_up * 64, MOVE_NOMONSTERS, it);
break;
case 4:
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_forward * 128 + v_right * 64 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_forward * 128 + v_right * 64 + v_up * 64, MOVE_NOMONSTERS, it);
break;
case 5:
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_forward * 128 - v_right * 64 + v_up * 64, MOVE_NOMONSTERS, it);
+ tracebox(it.origin, STAT(PL_MIN, player), STAT(PL_MAX, player), it.origin - v_forward * 128 - v_right * 64 + v_up * 64, MOVE_NOMONSTERS, it);
break;
}
// 400 is about the height of a typical laser jump (in overkill)
// not traceline because we need space for the whole player, not just his origin
- tracebox(horizontal_trace_endpos, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), horizontal_trace_endpos - '0 0 400', MOVE_NORMAL, it);
+ tracebox(horizontal_trace_endpos, STAT(PL_MIN, player), STAT(PL_MAX, player), horizontal_trace_endpos - '0 0 400', MOVE_NORMAL, it);
vector vectical_trace_endpos = trace_endpos;
//te_lightning1(NULL, horizontal_trace_endpos, vectical_trace_endpos);
if (trace_startsolid) goto skip; // inside another player
if (trace_fraction == 1.0) goto skip; // above void or too high
if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY) goto skip;
if (pointcontents(vectical_trace_endpos) != CONTENT_EMPTY) goto skip; // no lava or slime (or water which i assume would be annoying anyway)
- if (tracebox_hits_trigger_hurt(horizontal_trace_endpos, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), vectical_trace_endpos)) goto skip;
+ if (tracebox_hits_trigger_hurt(horizontal_trace_endpos, STAT(PL_MIN, player), STAT(PL_MAX, player), vectical_trace_endpos)) goto skip;
// make sure the spawned player will have floor ahead (or at least a wall - he shouldn't fall as soon as he starts moving)
- vector floor_test_start = vectical_trace_endpos + v_up * STAT(PL_MAX, NULL).z + v_forward * STAT(PL_MAX, NULL).x; // top front of player's bbox - highest point we know is not inside solid
+ vector floor_test_start = vectical_trace_endpos + v_up * STAT(PL_MAX, player).z + v_forward * STAT(PL_MAX, player).x; // top front of player's bbox - highest point we know is not inside solid
traceline(floor_test_start, floor_test_start + v_forward * 100 - v_up * 128, MOVE_NOMONSTERS, it);
//te_beam(NULL, floor_test_start, trace_endpos);
if (trace_fraction == 1.0) goto skip;
// wants to stand, if currently crouching we need to check for a low ceiling first
if (IS_DUCKED(this))
{
- tracebox(this.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), this.origin, MOVE_NORMAL, this);
+ tracebox(this.origin, STAT(PL_MIN, this), STAT(PL_MAX, this), this.origin, MOVE_NORMAL, this);
if (!trace_startsolid) UNSET_DUCKED(this);
}
}
{
// first calculate a typical start point for the jump
vector org = (this.absmin + this.absmax) * 0.5;
- org_z = this.absmax.z - STAT(PL_MIN, NULL).z;
+ org.z = this.absmax.z - PL_MIN_CONST.z;
if (this.target)
{
#ifdef SVQC
entity e = spawn();
setorigin(e, org);
- setsize(e, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+ setsize(e, PL_MIN_CONST, PL_MAX_CONST);
e.velocity = trigger_push_calculatevelocity(org, t, this.height);
tracetoss(e, e);
if(e.move_movetype == MOVETYPE_NONE)
{
entity e = spawn();
setorigin(e, org);
- setsize(e, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+ setsize(e, PL_MIN_CONST, PL_MAX_CONST);
e.velocity = this.movedir;
tracetoss(e, e);
waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity));
// vehicle enter/exit handling
vector vehicles_findgoodexit(entity this, vector prefer_spot)
{
- tracebox(this.origin + '0 0 32', STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), prefer_spot, MOVE_NORMAL, this.owner);
+ // TODO: we actually want the player's size here
+ tracebox(this.origin + '0 0 32', PL_MIN_CONST, PL_MAX_CONST, prefer_spot, MOVE_NORMAL, this.owner);
if(trace_fraction == 1.0 && !trace_startsolid && !trace_allsolid)
return prefer_spot;
v = randomvec();
v_z = 0;
v = v2 + normalize(v) * mysize;
- tracebox(v2, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), v, MOVE_NORMAL, this.owner);
+ tracebox(v2, PL_MIN_CONST, PL_MAX_CONST, v, MOVE_NORMAL, this.owner);
if(trace_fraction == 1.0 && !trace_startsolid && !trace_allsolid)
return v;
}
WriteAngle(MSG_ONE, 0);
}
- setsize(player, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+ setsize(player, STAT(PL_MIN,player), STAT(PL_MAX, player));
player.takedamage = DAMAGE_AIM;
player.solid = SOLID_SLIDEBOX;
player.alpha = 1;
player.PlayerPhysplug = func_null;
player.vehicle = NULL;
- player.view_ofs = STAT(PL_VIEW_OFS, NULL);
+ player.view_ofs = STAT(PL_VIEW_OFS, player);
player.event_damage = PlayerDamage;
player.hud = HUD_NORMAL;
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++ slot)
veh.vehicle_hudmodel.viewmodelforclient = pl;
pl.crouch = false;
- pl.view_ofs = STAT(PL_VIEW_OFS, NULL);
- setsize (pl, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+ pl.view_ofs = STAT(PL_VIEW_OFS, pl);
+ setsize (pl, STAT(PL_MIN, pl), STAT(PL_MAX, pl));
veh.event_damage = vehicles_damage;
veh.nextthink = 0;
//vector exitspot;
float mysize;
- tracebox(gunner.origin + '0 0 32', STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), prefer_spot, MOVE_NORMAL, player);
+ tracebox(gunner.origin + '0 0 32', STAT(PL_MIN, player), STAT(PL_MAX, player), prefer_spot, MOVE_NORMAL, player);
if(trace_fraction == 1.0 && !trace_startsolid && !trace_allsolid)
return prefer_spot;
- mysize = 1.5 * vlen(STAT(PL_MAX, NULL) - STAT(PL_MIN, NULL)); // can't use gunner's size, as they don't have a size
+ mysize = 1.5 * vlen(STAT(PL_MAX, player) - STAT(PL_MIN, player)); // can't use gunner's size, as they don't have a size
float i;
vector v, v2;
v2 = 0.5 * (gunner.absmin + gunner.absmax);
v = randomvec();
v_z = 0;
v = v2 + normalize(v) * mysize;
- tracebox(v2, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), v, MOVE_NORMAL, player);
+ tracebox(v2, STAT(PL_MIN, player), STAT(PL_MAX, player), v, MOVE_NORMAL, player);
if(trace_fraction == 1.0 && !trace_startsolid && !trace_allsolid)
return v;
}
}
CSQCVehicleSetup(player, HUD_NORMAL);
- setsize(player, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+ setsize(player, STAT(PL_MIN, player), STAT(PL_MAX, player));
player.takedamage = DAMAGE_AIM;
player.solid = SOLID_SLIDEBOX;
player.effects &= ~EF_NODRAW;
player.alpha = 1;
player.PlayerPhysplug = func_null;
- player.view_ofs = STAT(PL_VIEW_OFS, NULL);
+ player.view_ofs = STAT(PL_VIEW_OFS, player);
player.event_damage = PlayerDamage;
player.hud = HUD_NORMAL;
player.teleportable = TELEPORT_NORMAL;
norm = trace_plane_normal;
if(trace_ent.iscreature)
{
- traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * STAT(PL_MIN, NULL).z, MOVE_WORLDONLY, this);
+ // TODO: why not use entity size?
+ traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * PL_MIN_CONST.z, MOVE_WORLDONLY, this);
if(trace_fraction >= 1)
return;
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
{
if (IS_DUCKED(this) || !this.isplayermodel)
{
- this.mins = STAT(PL_CROUCH_MIN, NULL);
- this.maxs = STAT(PL_CROUCH_MAX, NULL);
- this.view_ofs = STAT(PL_CROUCH_VIEW_OFS, NULL);
+ this.mins = STAT(PL_CROUCH_MIN, this);
+ this.maxs = STAT(PL_CROUCH_MAX, this);
+ this.view_ofs = STAT(PL_CROUCH_VIEW_OFS, this);
}
else
{
- this.mins = STAT(PL_MIN, NULL);
- this.maxs = STAT(PL_MAX, NULL);
- this.view_ofs = STAT(PL_VIEW_OFS, NULL);
+ this.mins = STAT(PL_MIN, this);
+ this.maxs = STAT(PL_MAX, this);
+ this.view_ofs = STAT(PL_VIEW_OFS, this);
}
}
{
const vector v0 = ((intermission && !autocvar_cl_movement_intermissionrunning) ? '0 0 0' : pmove_vel); // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity
const float vh = STAT(VIEWHEIGHT);
- const vector pl_viewofs = STAT(PL_VIEW_OFS, NULL);
- const vector pl_viewofs_crouch = STAT(PL_CROUCH_VIEW_OFS, NULL);
+ const vector pl_viewofs = STAT(PL_VIEW_OFS);
+ const vector pl_viewofs_crouch = STAT(PL_CROUCH_VIEW_OFS);
const entity e = csqcplayer;
if (e)
{
// Flying
PHYS_INPUT_BUTTON_HOOK(this) = true;
- if(this.navigation_jetpack_point.z - STAT(PL_MAX, NULL).z + STAT(PL_MIN, NULL).z < this.origin.z)
+ if(this.navigation_jetpack_point.z - STAT(PL_MAX, this).z + STAT(PL_MIN, this).z < this.origin.z)
{
this.movement_x = dir * v_forward * maxspeed;
this.movement_y = dir * v_right * maxspeed;
{
if (walkfromwp)
{
- if (tracewalk(ent, v, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), org, bot_navigation_movemode))
+ if (tracewalk(ent, v, STAT(PL_MIN, ent), STAT(PL_MAX, ent), org, bot_navigation_movemode))
return true;
}
else
{
- if (tracewalk(ent, org, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), v, bot_navigation_movemode))
+ if (tracewalk(ent, org, STAT(PL_MIN, ent), STAT(PL_MAX, ent), v, bot_navigation_movemode))
return true;
}
}
});
vector org = ent.origin + 0.5 * (ent.mins + ent.maxs);
- org.z = ent.origin.z + ent.mins.z - STAT(PL_MIN, NULL).z; // player height
+ org.z = ent.origin.z + ent.mins.z - STAT(PL_MIN, ent).z; // player height
// TODO possibly make other code have the same support for bboxes
if(ent.tag_entity)
org = org + ent.tag_entity.origin;
float zdistance, xydistance, cost, t, fuel;
vector down, npa, npb;
- down = '0 0 -1' * (STAT(PL_MAX, NULL).z - STAT(PL_MIN, NULL).z) * 10;
+ down = '0 0 -1' * (STAT(PL_MAX, this).z - STAT(PL_MIN, this).z) * 10;
do{
npa = pointa + down;
return true;
// if it can reach the goal there is nothing more to do
- if (tracewalk(this, startposition, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), (e.absmin + e.absmax) * 0.5, bot_navigation_movemode))
+ if (tracewalk(this, startposition, STAT(PL_MIN, this), STAT(PL_MAX, this), (e.absmin + e.absmax) * 0.5, bot_navigation_movemode))
return true;
// see if there are waypoints describing a path to the item
// evaluate the next goal on the queue
float d = vlen2(this.origin - bot_waypoint_queue_goal.origin);
LOG_DEBUG(this.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with distance ", ftos(d));
- if(tracewalk(bot_waypoint_queue_goal, this.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), bot_waypoint_queue_goal.origin, bot_navigation_movemode))
+ if(tracewalk(bot_waypoint_queue_goal, this.origin, STAT(PL_MIN, this), STAT(PL_MAX, this), bot_waypoint_queue_goal.origin, bot_navigation_movemode))
{
if( d > bot_waypoint_queue_bestgoalrating)
{
if(!w.wpisbox)
{
- setsize(w, STAT(PL_MIN, NULL) - '1 1 0', STAT(PL_MAX, NULL) + '1 1 0');
+ setsize(w, PL_MIN_CONST - '1 1 0', PL_MAX_CONST + '1 1 0');
if(!move_out_of_solid(w))
{
if(!(f & WAYPOINTFLAG_GENERATED))
navigation_testtracewalk = 0;
if (!this.wpisbox)
{
- tracebox(sv - STAT(PL_MIN, NULL).z * '0 0 1', STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), sv, false, this);
+ tracebox(sv - PL_MIN_CONST.z * '0 0 1', PL_MIN_CONST, PL_MAX_CONST, sv, false, this);
if (!trace_startsolid)
{
//dprint("sv deviation", vtos(trace_endpos - sv), "\n");
}
if (!it.wpisbox)
{
- tracebox(ev - STAT(PL_MIN, NULL).z * '0 0 1', STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), ev, false, it);
+ tracebox(ev - PL_MIN_CONST.z * '0 0 1', PL_MIN_CONST, PL_MAX_CONST, ev, false, it);
if (!trace_startsolid)
{
//dprint("ev deviation", vtos(trace_endpos - ev), "\n");
}
//traceline(this.origin, it.origin, false, NULL);
//if (trace_fraction == 1)
- if (!this.wpisbox && tracewalk(this, sv, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), ev, MOVE_NOMONSTERS))
+ if (!this.wpisbox && tracewalk(this, sv, PL_MIN_CONST, PL_MAX_CONST, ev, MOVE_NOMONSTERS))
waypoint_addlink(this, it);
else
relink_walkculled += 0.5;
- if (!it.wpisbox && tracewalk(it, ev, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), sv, MOVE_NOMONSTERS))
+ if (!it.wpisbox && tracewalk(it, ev, PL_MIN_CONST, PL_MAX_CONST, sv, MOVE_NOMONSTERS))
waypoint_addlink(it, this);
else
relink_walkculled += 0.5;
vector waypoint_fixorigin(vector position)
{
- tracebox(position + '0 0 1' * (1 - STAT(PL_MIN, NULL).z), STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), position + '0 0 -512', MOVE_NOMONSTERS, NULL);
+ tracebox(position + '0 0 1' * (1 - PL_MIN_CONST.z), PL_MIN_CONST, PL_MAX_CONST, position + '0 0 -512', MOVE_NOMONSTERS, NULL);
if(trace_fraction < 1)
position = trace_endpos;
//traceline(position, position + '0 0 -512', MOVE_NOMONSTERS, NULL);
float botframe_autowaypoints_fixdown(vector v)
{
- tracebox(v, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), v + '0 0 -64', MOVE_NOMONSTERS, NULL);
+ tracebox(v, PL_MIN_CONST, PL_MAX_CONST, v + '0 0 -64', MOVE_NOMONSTERS, NULL);
if(trace_fraction >= 1)
return 0;
return 1;
e.nextthink = time;
e.solid = 0; // nothing special
setmodel(e, MDL_MARKER);
- setsize(e, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+ setsize(e, STAT(PL_MIN, this), STAT(PL_MAX, this));
e.skin = 2;
if(argc == 3)
e.cnt = stof(argv(1));
this.angles_z = 0;
this.fixangle = true;
// offset it so that the spectator spawns higher off the ground, looks better this way
- setorigin(this, spot.origin + STAT(PL_VIEW_OFS, NULL));
+ setorigin(this, spot.origin + STAT(PL_VIEW_OFS, this));
this.prevorigin = this.origin;
if (IS_REAL_CLIENT(this))
{
FixPlayermodel(this);
}
setmodel(this, MDL_Null);
- setsize(this, STAT(PL_CROUCH_MIN, NULL), STAT(PL_CROUCH_MAX, NULL));
+ setsize(this, STAT(PL_CROUCH_MIN, this), STAT(PL_CROUCH_MAX, this));
this.view_ofs = '0 0 0';
}
start = stov(vtos(start));
end = stov(vtos(end));
- tracebox(start, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), end, MOVE_NOMONSTERS, NULL);
+ tracebox(start, PL_MIN_CONST, PL_MAX_CONST, end, MOVE_NOMONSTERS, NULL);
if (!trace_startsolid && trace_fraction < 1)
{
p = trace_endpos;
- tracebox(p, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), p, MOVE_NOMONSTERS, NULL);
+ tracebox(p, PL_MIN_CONST, PL_MAX_CONST, p, MOVE_NOMONSTERS, NULL);
if (trace_startsolid)
{
rint(42); // do an engine breakpoint on VM_rint so you can get the trace that errnoeously returns startsolid
- tracebox(start, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), end, MOVE_NOMONSTERS, NULL);
+ tracebox(start, PL_MIN_CONST, PL_MAX_CONST, end, MOVE_NOMONSTERS, NULL);
// how much do we need to back off?
safe = 1;
for ( ; ; )
{
pos = p * (1 - (safe + unsafe) * 0.5) + start * ((safe + unsafe) * 0.5);
- tracebox(pos, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), pos, MOVE_NOMONSTERS, NULL);
+ tracebox(pos, PL_MIN_CONST, PL_MAX_CONST, pos, MOVE_NOMONSTERS, NULL);
if (trace_startsolid)
{
if ((safe + unsafe) * 0.5 == unsafe) break;
LOG_INFO("safe distance to back off: ", ftos(safe * vlen(p - start)), "qu\n");
LOG_INFO("unsafe distance to back off: ", ftos(unsafe * vlen(p - start)), "qu\n");
- tracebox(p, STAT(PL_MIN, NULL) + '0.1 0.1 0.1', STAT(PL_MAX, NULL) - '0.1 0.1 0.1', p, MOVE_NOMONSTERS, NULL);
+ tracebox(p, PL_MIN_CONST + '0.1 0.1 0.1', PL_MAX_CONST - '0.1 0.1 0.1', p, MOVE_NOMONSTERS, NULL);
if (trace_startsolid) LOG_INFO("trace_endpos much in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
else LOG_INFO("trace_endpos just in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
if (++hitcount >= 10) break;
{
q = p + normalize(end - p) * (dq + dqf);
if (q == q0) break;
- tracebox(p, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), q, MOVE_NOMONSTERS, NULL);
+ tracebox(p, PL_MIN_CONST, PL_MAX_CONST, q, MOVE_NOMONSTERS, NULL);
if (trace_startsolid) error("THIS ONE cannot happen");
if (trace_fraction > 0) dq += dqf * trace_fraction;
dqf *= 0.5;
IL_EACH(g_spawnpoints, true,
{
vector org = it.origin;
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - '0 0 512', MOVE_NOMONSTERS, NULL);
+ tracebox(it.origin, PL_MIN_CONST, PL_MAX_CONST, it.origin - '0 0 512', MOVE_NOMONSTERS, NULL);
setorigin(it, trace_endpos);
if (navigation_findnearestwaypoint(it, false))
{
}
// in any case:
setattachment(key, NULL, "");
- setorigin(key, key.owner.origin + '0 0 1' * (STAT(PL_MIN, NULL).z - KH_KEY_MIN_z));
+ setorigin(key, key.owner.origin + '0 0 1' * (STAT(PL_MIN, key.owner).z - KH_KEY_MIN_z));
key.angles = key.owner.angles;
#else
setorigin(key, key.owner.origin + key.origin.z * '0 0 1');
{
vector o;
o = portal.origin;
- portal.mins = STAT(PL_MIN, NULL) - SAFERNUDGE;
- portal.maxs = STAT(PL_MAX, NULL) + SAFERNUDGE;
+ portal.mins = PL_MIN_CONST - SAFERNUDGE;
+ portal.maxs = PL_MAX_CONST + SAFERNUDGE;
fixedmakevectors(portal.mangle);
portal.origin += 16 * v_forward;
if(!move_out_of_solid(portal))
settouch(this, checkpoint_touch);
o = (this.absmin + this.absmax) * 0.5;
- tracebox(o, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), o - '0 0 1' * (o.z - this.absmin.z), MOVE_NORMAL, this);
+ tracebox(o, PL_MIN_CONST, PL_MAX_CONST, o - '0 0 1' * (o.z - this.absmin.z), MOVE_NORMAL, this);
waypoint_spawnforitem_force(this, trace_endpos);
this.nearestwaypointtimeout = time + 1000000000;
if(is_trigger)
{
org = (this.absmin + this.absmax) * 0.5;
- tracebox(org, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), org - '0 0 1' * (org.z - this.absmin.z), MOVE_NORMAL, this);
+ tracebox(org, PL_MIN_CONST, PL_MAX_CONST, org - '0 0 1' * (org.z - this.absmin.z), MOVE_NORMAL, this);
waypoint_spawnforitem_force(this, trace_endpos);
this.nearestwaypointtimeout = time + 1000000000;
}