RandomSelection_Init();
FOREACH_CLIENT(IS_PLAYER(it) && it != self && SAME_TEAM(it, self) && !IS_DEAD(it), LAMBDA(
- float l = vlen(spawn_spot.origin - it.origin);
- if(l > autocvar_g_spawn_near_teammate_distance)
+ if(vdist(spawn_spot.origin - it.origin, >, autocvar_g_spawn_near_teammate_distance))
continue;
- if(l < 48)
+ if(vdist(spawn_spot.origin - it.origin, <, 48))
continue;
if(!checkpvs(spawn_spot.origin, it))
continue;
if(STAT(FROZEN, it) == 0)
if(it != self)
{
- tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - '0 0 100', MOVE_WORLDONLY, it);
+ tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - '0 0 100', MOVE_NOMONSTERS, it);
if(trace_fraction != 1.0)
if(!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY))
{
else
fixedmakevectors(it.angles);
- for(pc = 0; pc < 5; ++pc) // test 5 diffrent spots close to mate
+ for(pc = 0; pc < 4; ++pc) // test 4 diffrent spots close to mate
{
switch(pc)
{
case 0:
- tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin + v_right * 128, MOVE_NORMAL, it);
+ tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin + v_right * 128, MOVE_NOMONSTERS, it);
break;
case 1:
- tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_right * 128 , MOVE_NORMAL, it);
+ tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_right * 128 , MOVE_NOMONSTERS, it);
break;
case 2:
- tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin + v_right * 64 - v_forward * 64, MOVE_NORMAL, it);
+ tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin + v_right * 64 - v_forward * 64, MOVE_NOMONSTERS, it);
break;
case 3:
- tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_right * 64 - v_forward * 64, MOVE_NORMAL, it);
- break;
- case 4:
- tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_forward * 128, MOVE_NORMAL, it);
+ tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_right * 64 - v_forward * 64, MOVE_NOMONSTERS, it);
break;
+ //case 4:
+ //tracebox(it.origin , STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), it.origin - v_forward * 128, MOVE_NOMONSTERS, it);
+ //break;
}
if(trace_fraction == 1.0)
{
- traceline(trace_endpos + '0 0 4', trace_endpos - '0 0 100', MOVE_NORMAL, it);
+ traceline(trace_endpos + '0 0 4', trace_endpos - '0 0 100', MOVE_NOMONSTERS, it);
if(trace_fraction != 1.0)
{
if(autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath)