From: Martin Taibr Date: Tue, 29 Aug 2017 18:02:19 +0000 (+0200) Subject: disable SNT in ft and as X-Git-Tag: xonotic-v0.8.5~2485^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fad7d68d9df73ba9eab1cd462b1af3e428d58ea6;p=xonotic%2Fxonotic-data.pk3dir.git disable SNT in ft and as --- 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 9ff364474..fab94a1d7 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 @@ -20,6 +20,8 @@ REGISTER_MUTATOR(spawn_near_teammate, cvar("g_spawn_near_teammate")); MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score) { + if (!teamplay) return; + entity player = M_ARGV(0, entity); entity spawn_spot = M_ARGV(1, entity); vector spawn_score = M_ARGV(2, vector); @@ -29,9 +31,6 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score) spawn_spot.msnt_lookat = NULL; - if(!teamplay) - return; - RandomSelection_Init(); FOREACH_CLIENT(IS_PLAYER(it) && it != player && SAME_TEAM(it, player) && !IS_DEAD(it), { if(vdist(spawn_spot.origin - it.origin, >, autocvar_g_spawn_near_teammate_distance)) @@ -56,7 +55,14 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, Spawn_Score) MUTATOR_HOOKFUNCTION(spawn_near_teammate, PlayerSpawn) { - if(!teamplay) { return; } + if (!teamplay) return; + + // in assault it makes it prety much impossible to stop an attack + if (g_assault) return; + + // when players fall off the map they respawn near a teammate which is usually a safe place and get unforzen too easily + if (g_freezetag) return; + entity player = M_ARGV(0, entity); entity spawn_spot = M_ARGV(1, entity);