33 spawn_spot.msnt_lookat =
NULL;
39 if(
vdist(spawn_spot.origin - it.origin, <, 48))
51 else if(player.team == spawn_spot.team)
65 int num_red = 0, num_blue = 0, num_yellow = 0, num_pink = 0;
77 if(num_red == 1 || num_blue == 1 || num_yellow == 1 || num_pink == 1)
97 if (
time < it.msnt_timer)
continue;
100 if (it == player)
continue;
120 snt_ofs[0] = up * 64 + right * 128 - forward * 64;
121 snt_ofs[1] = up * 64 - right * 128 - forward * 64;
122 snt_ofs[2] = up * 64 + right * 192;
123 snt_ofs[3] = up * 64 - right * 192;
124 snt_ofs[4] = up * 64 + right * 64 - forward * 128;
125 snt_ofs[5] = up * 64 - right * 64 - forward * 128;
127 for(
int i = 0; i < 6; ++i)
137 tracebox(horizontal_trace_endpos,
STAT(PL_MIN, player),
STAT(PL_MAX, player), horizontal_trace_endpos - 400 * up,
MOVE_NORMAL, it);
143 if (pointcontents(vectical_trace_endpos) !=
CONTENT_EMPTY)
goto skip;
148 vector floor_test_start = vectical_trace_endpos + up *
STAT(PL_MAX, player).z + forward *
STAT(PL_MAX, player).x;
149 traceline(floor_test_start, floor_test_start + forward * 100 - up * 128,
MOVE_NOMONSTERS, it);
154 bool nade_in_range =
false;
157 if (vdist(it.origin - vectical_trace_endpos, <, autocvar_g_nades_nade_radius)) {
158 nade_in_range = true;
162 if (nade_in_range)
goto skip;
175 if (dist2 < best_dist2)
198 setorigin(player, best_pos);
199 player.angles = best_mate.angles;
204 else if(spawn_spot.msnt_lookat)
206 player.angles =
vectoangles(spawn_spot.msnt_lookat.origin - player.origin);
207 player.angles_x = -player.angles.x;
#define REGISTER_MUTATOR(...)
#define MUTATOR_HOOKFUNCTION(...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
#define PHYS_INPUT_BUTTON_CHAT(s)
float autocvar_sv_maxspeed
const float MOVE_NOMONSTERS
float checkpvs(vector viewpos, entity viewee)
float trace_dphitq3surfaceflags
const float CONTENT_EMPTY
ERASEABLE bool expr_evaluate(string s)
Evaluate an expression of the form: [+ | -]?
bool tracebox_hits_trigger_hurt(vector start, vector e_min, vector e_max, vector end)
#define IL_EACH(this, cond, body)
ERASEABLE void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority)
ERASEABLE void RandomSelection_Init()
#define RandomSelection_AddEnt(e, weight, priority)
entity RandomSelection_chosen_ent
vector RandomSelection_chosen_vec
vector Spawn_Score(entity this, entity spot, float mindist, float teamcheck, bool targetcheck)
const int SPAWN_PRIO_NEAR_TEAMMATE_FOUND
const int SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM
IntrusiveList g_projectiles
bool StatusEffects_active(StatusEffect this, entity actor)
float autocvar_g_balance_health_regenstable
bool autocvar_g_spawn_near_teammate_ignore_spawnpoint_check_health
float autocvar_g_spawn_near_teammate_distance
string autocvar_g_spawn_near_teammate
int autocvar_g_spawn_near_teammate_ignore_spawnpoint_max
float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay_death
float autocvar_g_spawn_near_teammate_ignore_spawnpoint_delay
int autocvar_g_spawn_near_teammate_ignore_spawnpoint
bool autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath
#define FOREACH_CLIENT_RANDOM(cond, body)
#define FOREACH_CLIENT(cond, body)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
bool weaponLocked(entity player)