From 559796b28bb14e368847c1784901a6a7e4394b80 Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Fri, 7 Oct 2016 01:26:39 +0200 Subject: [PATCH] reorder --- .../spawn_near_teammate/sv_spawn_near_teammate.qc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc b/qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc index 8eff82e98..68af78af4 100644 --- a/qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc +++ b/qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc @@ -88,7 +88,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn) entity best_mate = NULL; vector best_pos = '0 0 0'; - float best_dist = 0, dist = 0; + float best_dist = 0; FOREACH_CLIENT(IS_PLAYER(it), LAMBDA( LOG_INFOF(" for client: %s %v\n", it.netname, it.origin); //if (!SAME_TEAM(player, it)) continue; // TODO DEBUGING @@ -101,7 +101,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn) if (it == player) continue; vector horiz_vel = vec2(it.velocity); - if(vdist(horiz_vel, >, 450)) + if (vdist(horiz_vel, >, 450)) fixedmakevectors(vectoangles(horiz_vel)); else fixedmakevectors(it.angles); // .angles is the angle of the model - usually/always 0 pitch @@ -113,16 +113,16 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn) switch(i) { case 0: - 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, NULL), STAT(PL_MAX, NULL), 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_right * 192 + v_up * 64, MOVE_NOMONSTERS, it); + 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); break; case 2: - 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, NULL), STAT(PL_MAX, NULL), 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_forward * 64 - v_right * 128 + v_up * 64, MOVE_NOMONSTERS, it); + tracebox(it.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), 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); @@ -167,7 +167,7 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn) if(autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath) { - dist = vlen(vectical_trace_endpos - player.msnt_deathloc); + float dist = vlen(vectical_trace_endpos - player.msnt_deathloc); LOG_INFOF(" dist: %f, best_dist %f\n", dist, best_dist); if(dist < best_dist || best_dist == 0) { -- 2.39.2