]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/master' into samual/updatecommands
authorSamual <samual@xonotic.org>
Sun, 25 Dec 2011 16:21:20 +0000 (11:21 -0500)
committerSamual <samual@xonotic.org>
Sun, 25 Dec 2011 16:21:20 +0000 (11:21 -0500)
1  2 
qcsrc/server/g_world.qc

diff --combined qcsrc/server/g_world.qc
index 9bfdd0d52cbf3e1ad1cfcb86073886bd8a3de586,32b69286337b3b498db5f89d0decd9fc10451ba3..41288a80869b72639a97740c2cff94789e3b99ec
@@@ -388,6 -388,7 +388,7 @@@ void cvar_changes_init(
                BADCVAR("sv_allow_fullbright");
                BADCVAR("sv_checkforpacketsduringsleep");
                BADCVAR("sv_timeout");
+               BADPREFIX("sv_timeout_");
                BADCVAR("welcome_message_time");
                BADPREFIX("crypto_");
                BADPREFIX("g_chat_");
                BADCVAR("sys_ticrate");
                BADCVAR("teamplay_mode");
                BADCVAR("timelimit_override");
+               BADCVAR("g_spawnshieldtime");
                BADPREFIX("g_warmup_");
                BADPREFIX("sv_ready_restart_");
  
@@@ -1383,7 -1385,8 +1385,7 @@@ void IntermissionThink(
                && ((self.autoscreenshot > 0) && (time > self.autoscreenshot)) )
        {
                self.autoscreenshot = -1;
 -              if(clienttype(self) == CLIENTTYPE_REAL)
 -                      stuffcmd(self, "\nscreenshot\necho \"^5A screenshot has been taken at request of the server.\"\n");
 +              if(clienttype(self) == CLIENTTYPE_REAL) { stuffcmd(self, sprintf("\nautoscreenshot \"%s\" \"%s\"\n", GetMapname(), strftime(FALSE, "%s"))); }
                return;
        }
  
@@@ -2051,6 -2054,7 +2053,6 @@@ float WinningCondition_Race(float fragl
        return wc;
  }
  
 -void ReadyRestart();
  float WinningCondition_QualifyingThenRace(float limit)
  {
        float wc;
@@@ -2140,7 -2144,6 +2142,7 @@@ CheckRules_Worl
  Exit deathmatch games upon conditions
  ============
  */
 +void ReadyRestart();
  void CheckRules_World()
  {
        float timelimit;
@@@ -2337,7 -2340,7 +2339,7 @@@ float mapvote_maps_suggested[MAPVOTE_CO
  string mapvote_suggestions[MAPVOTE_COUNT];
  float mapvote_suggestion_ptr;
  float mapvote_voters;
 -float mapvote_votes[MAPVOTE_COUNT];
 +float mapvote_selections[MAPVOTE_COUNT];
  float mapvote_run;
  float mapvote_detail;
  float mapvote_abstain;
@@@ -2494,6 -2497,20 +2496,6 @@@ void MapVote_SendPicture(float id
        WritePicture(MSG_ONE, strcat(mapvote_screenshot_dirs[mapvote_maps_screenshot_dir[id]], "/", mapvote_maps[id]), 3072);
  }
  
 -float GameCommand_MapVote(string cmd)
 -{
 -      if(!intermission_running)
 -              return FALSE;
 -
 -      if(cmd == "mv_getpic")
 -      {
 -              MapVote_SendPicture(stof(argv(1)));
 -              return TRUE;
 -      }
 -
 -      return FALSE;
 -}
 -
  float MapVote_GetMapMask()
  {
        float mask, i, power;
@@@ -2561,7 -2578,7 +2563,7 @@@ float MapVote_SendEntity(entity to, flo
                if(mapvote_detail)
                        for(i = 0; i < mapvote_count; ++i)
                                if(mapvote_maps[i] != "")
 -                                      WriteByte(MSG_ENTITY, mapvote_votes[i]);
 +                                      WriteByte(MSG_ENTITY, mapvote_selections[i]);
  
                WriteByte(MSG_ENTITY, to.mapvote);
        }
@@@ -2593,16 -2610,16 +2595,16 @@@ float MapVote_Finished(float mappos
        if(autocvar_sv_eventlog)
        {
                result = strcat(":vote:finished:", mapvote_maps[mappos]);
 -              result = strcat(result, ":", ftos(mapvote_votes[mappos]), "::");
 +              result = strcat(result, ":", ftos(mapvote_selections[mappos]), "::");
                didntvote = mapvote_voters;
                for(i = 0; i < mapvote_count; ++i)
                        if(mapvote_maps[i] != "")
                        {
 -                              didntvote -= mapvote_votes[i];
 +                              didntvote -= mapvote_selections[i];
                                if(i != mappos)
                                {
                                        result = strcat(result, ":", mapvote_maps[i]);
 -                                      result = strcat(result, ":", ftos(mapvote_votes[i]));
 +                                      result = strcat(result, ":", ftos(mapvote_selections[i]));
                                }
                        }
                result = strcat(result, ":didn't vote:", ftos(didntvote));
@@@ -2627,7 -2644,7 +2629,7 @@@ void MapVote_CheckRules_1(
        for(i = 0; i < mapvote_count; ++i) if(mapvote_maps[i] != "")
        {
                //dprint("Map ", ftos(i), ": "); dprint(mapvote_maps[i], "\n");
 -              mapvote_votes[i] = 0;
 +              mapvote_selections[i] = 0;
        }
  
        mapvote_voters = 0;
                {
                        i = other.mapvote - 1;
                        //dprint("Player ", other.netname, " vote = ", ftos(other.mapvote - 1), "\n");
 -                      mapvote_votes[i] = mapvote_votes[i] + 1;
 +                      mapvote_selections[i] = mapvote_selections[i] + 1;
                }
        }
  }
@@@ -2656,11 -2673,11 +2658,11 @@@ float MapVote_CheckRules_2(
  
        mapvote_voters_real = mapvote_voters;
        if(mapvote_abstain)
 -              mapvote_voters_real -= mapvote_votes[mapvote_count - 1];
 +              mapvote_voters_real -= mapvote_selections[mapvote_count - 1];
  
        RandomSelection_Init();
        for(i = 0; i < mapvote_count_real; ++i) if(mapvote_maps[i] != "")
 -              RandomSelection_Add(world, i, string_null, 1, mapvote_votes[i]);
 +              RandomSelection_Add(world, i, string_null, 1, mapvote_selections[i]);
        firstPlace = RandomSelection_chosen_float;
        firstPlaceVotes = RandomSelection_best_priority;
        //dprint("First place: ", ftos(firstPlace), "\n");
        RandomSelection_Init();
        for(i = 0; i < mapvote_count_real; ++i) if(mapvote_maps[i] != "")
                if(i != firstPlace)
 -                      RandomSelection_Add(world, i, string_null, 1, mapvote_votes[i]);
 +                      RandomSelection_Add(world, i, string_null, 1, mapvote_selections[i]);
        secondPlace = RandomSelection_chosen_float;
        secondPlaceVotes = RandomSelection_best_priority;
        //dprint("Second place: ", ftos(secondPlace), "\n");
                        for(i = 0; i < mapvote_count; ++i)
                                if(mapvote_maps[i] != "")
                                {
 -                                      didntvote -= mapvote_votes[i];
 +                                      didntvote -= mapvote_selections[i];
                                        if(i != firstPlace)
                                                if(i != secondPlace)
                                                {
                                                        result = strcat(result, ":", mapvote_maps[i]);
 -                                                      result = strcat(result, ":", ftos(mapvote_votes[i]));
 +                                                      result = strcat(result, ":", ftos(mapvote_selections[i]));
                                                        if(i < mapvote_count_real)
                                                        {
                                                                strunzone(mapvote_maps[i]);