]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/arena.qc
YAY found a way to block player movement, but still allow him to be pushed around
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / arena.qc
index b80a2830cd9748383a6b604ac4da56e887f7400d..dbd7e964b1b00b2425238467dc23313a11e26498 100644 (file)
@@ -39,6 +39,10 @@ void reset_map(float dorespawn)
                warmup = time + cvar("g_ca_warmup");
                allowed_to_spawn = 1;
        }
+       else if(g_freezetag)
+       {
+               warmup = time + cvar("g_freezetag_warmup");
+       }
 
        lms_lowest_lives = 999;
        lms_next_place = player_count;
@@ -92,6 +96,11 @@ void reset_map(float dorespawn)
                                self.classname = "player";
                                PutClientInServer();
                        }
+                       else if(g_freezetag)
+                       {
+                               if(self.classname == "player")
+                                       PutClientInServer();
+                       }
                        else
                        {
                                /*
@@ -192,7 +201,7 @@ void Arena_Warmup()
        float f;
        string msg;
 
-       if((!g_arena && !g_ca) || (g_arena && !arena_roundbased) || (time < game_starttime))
+       if((!g_arena && !g_ca && !g_freezetag) || (g_arena && !arena_roundbased) || (time < game_starttime))
                return;
 
        f = ceil(warmup - time);
@@ -256,7 +265,7 @@ void Arena_Warmup()
                }
        }
 
-       if(self.classname == "player" && self.health > 0)
+       if(self.classname == "player" && self.health > 0 && self.movetype == MOVETYPE_NONE)
                self.movetype = MOVETYPE_WALK;
 }
 
@@ -364,6 +373,12 @@ void Spawnqueue_Check()
                        next_round = 0;
                        reset_map(TRUE);
                }
+       } else if(g_freezetag) {
+               if((next_round && next_round < time))
+               {
+                       next_round = 0;
+                       reset_map(TRUE);
+               }
        } else { // arena
                //extend next_round if it isn't set yet and only 1 player is spawned
                if(!next_round)