From: Martin Taibr Date: Sun, 2 Oct 2016 16:12:24 +0000 (+0200) Subject: msnt: more checks X-Git-Tag: xonotic-v0.8.2~456^2~21 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3bd1a8882f72dc50b5b2566634c0abf7dafcc0cb;p=xonotic%2Fxonotic-data.pk3dir.git msnt: more checks --- 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 d699ebd55..c83ea2047 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 @@ -134,12 +134,16 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn) LOG_INFOF(" pc: %d trace_fraction %f\n", pc, trace_fraction); if(trace_fraction != 1.0) continue; + // 400 is slightly more than a typical laser jump (in overkill) tracebox(trace_endpos + '0 0 4', STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), trace_endpos - '0 0 400', MOVE_NORMAL, it); te_lightning2(NULL, prev_endpos, trace_endpos); LOG_INFOF(" trace_fraction2 %f\n", trace_fraction); if (trace_startsolid) continue; // inside another player if (trace_fraction == 1.0) continue; // above void or too high - // TODO not skybox or hurttriggers + if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY) continue; + if (pointcontents(trace_endpos + '0 0 1') != CONTENT_EMPTY) continue; // this also prevents spawning in water which i assume would be annoying + // TODO top of implosion towers + if(autocvar_g_spawn_near_teammate_ignore_spawnpoint_closetodeath) { dist = vlen(trace_endpos - player.msnt_deathloc);