]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Small cleanup, get rid of a redundant check, an unused variable and an outdated comment
authorterencehill <piuntn@gmail.com>
Wed, 2 Jan 2013 09:48:47 +0000 (10:48 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 21 Jan 2013 18:27:55 +0000 (19:27 +0100)
qcsrc/server/command/vote.qc
qcsrc/server/mutators/gamemode_arena.qh
qcsrc/server/mutators/gamemode_keyhunt.qh

index f6f99d01bf826fff3b569059fc67a7c07f5dc40c..0506ade2c70e601e42d4c16b41cc7ff6e6820990 100644 (file)
@@ -319,9 +319,7 @@ void VoteThink()
 //  Game logic for warmup
 // =======================
 
-/**
- * Resets the state of all clients, items, flags, runes, keys, weapons, waypoints, ... of the map.
- */
+// Resets the state of all clients, items, flags, runes, keys, weapons, waypoints, ... of the map.
 void reset_map(float dorespawn)
 {
        entity oldself;
@@ -368,31 +366,27 @@ void reset_map(float dorespawn)
        // on spawnpoint entities which have to be reset first --blub
        if(dorespawn)
        if(!MUTATOR_CALLHOOK(reset_map_players))
-       FOR_EACH_CLIENT(self) {
-               if(self.flags & FL_CLIENT)                              // reset all players
+       FOR_EACH_CLIENT(self) // reset all players
+       {
+               /*
+               only reset players if a restart countdown is active
+               this can either be due to cvar sv_ready_restart_after_countdown having set
+               restart_mapalreadyrestarted to 1 after the countdown ended or when
+               sv_ready_restart_after_countdown is not used and countdown is still running
+               */
+               if (restart_mapalreadyrestarted || (time < game_starttime))
                {
-                       {
-                               /*
-                               only reset players if a restart countdown is active
-                               this can either be due to cvar sv_ready_restart_after_countdown having set
-                               restart_mapalreadyrestarted to 1 after the countdown ended or when
-                               sv_ready_restart_after_countdown is not used and countdown is still running
-                               */
-                               if (restart_mapalreadyrestarted || (time < game_starttime))
-                               {
-                                       //NEW: changed behaviour so that it prevents that previous spectators/observers suddenly spawn as players
-                                       if (self.classname == "player") {
-                                               //PlayerScore_Clear(self);
-                                               if(g_lms)
-                                                       PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives());
-                                               self.killcount = 0;
-                                               //stop the player from moving so that he stands still once he gets respawned
-                                               self.velocity = '0 0 0';
-                                               self.avelocity = '0 0 0';
-                                               self.movement = '0 0 0';
-                                               PutClientInServer();
-                                       }
-                               }
+                       //NEW: changed behaviour so that it prevents that previous spectators/observers suddenly spawn as players
+                       if (self.classname == "player") {
+                               //PlayerScore_Clear(self);
+                               if(g_lms)
+                                       PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives());
+                               self.killcount = 0;
+                               //stop the player from moving so that he stands still once he gets respawned
+                               self.velocity = '0 0 0';
+                               self.avelocity = '0 0 0';
+                               self.movement = '0 0 0';
+                               PutClientInServer();
                        }
                }
        }
index 2c455dbdd8f344ffd45e4d398dfd223a177fcfac..7e23d4f1c35d902dbc12d9f3cc88f058a5bb7162 100644 (file)
@@ -1,7 +1,6 @@
 float maxspawned;
 float numspawned;
 float arena_roundbased;
-float arena_roundbased_state;
 .float spawned;
 .entity spawnqueue_next;
 .entity spawnqueue_prev;
index 8ee8434293669b00a15501c92612f7c1d3eedf51..55614ff8effba562ed5f9fa21120caed6fc9188a 100644 (file)
@@ -6,7 +6,6 @@ float kh_tracking_enabled;
 .entity kh_next;
 float kh_Key_AllOwnedByWhichTeam();
 
-// used by arena.qc ready-restart:
 typedef void(void) kh_Think_t;
 void kh_StartRound();
 void kh_Controller_SetThink_NoMsg(float t, kh_Think_t func);