]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
disable SNT in ft and as
authorMartin Taibr <taibr.martin@gmail.com>
Tue, 29 Aug 2017 18:02:19 +0000 (20:02 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Tue, 29 Aug 2017 18:02:19 +0000 (20:02 +0200)
qcsrc/common/mutators/mutator/spawn_near_teammate/sv_spawn_near_teammate.qc

index 9ff3644748112eaad8c6dc1894487b52afe4dd21..fab94a1d7d34b54c87e35cff8fc17e6e68684931 100644 (file)
@@ -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);