]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Merge branch 'Mario/target_teleporter_v2' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index 24e9a5221e1e62ac7ebb30e4d3bc52f8760f54a5..fd73969cb81a9d16cb88c55b02bee012cd0dfaa1 100644 (file)
@@ -47,7 +47,7 @@ void InitGameplayMode()
        int done = 0; for (int i = 0, n = numentityfields(); i < n; ++i) {
            string k = entityfieldname(i); vector v = (k == "mins") ? mi_min : (k == "maxs") ? mi_max : '0 0 0';
            if (v) {
-            putentityfieldstring(i, world, sprintf("%d %d %d", v));
+            putentityfieldstring(i, world, sprintf("%v", v));
             if (++done == 2) break;
         }
        }
@@ -925,6 +925,11 @@ void SV_ChangeTeam(entity this, float _color)
        source_team = Team_TeamToNumber(source_color + 1);
        destination_team = Team_TeamToNumber(destination_color + 1);
 
+       if (destination_team == -1)
+       {
+               return;
+       }
+
        CheckAllowedTeams(this);
 
        if (destination_team == 1 && c1 < 0) destination_team = 4;