]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/notification_updates
authorSamual Lenks <samual@xonotic.org>
Mon, 26 Aug 2013 03:09:19 +0000 (23:09 -0400)
committerSamual Lenks <samual@xonotic.org>
Mon, 26 Aug 2013 03:09:19 +0000 (23:09 -0400)
1  2 
qcsrc/common/util.qh
qcsrc/server/command/common.qc
qcsrc/server/g_world.qc

diff --combined qcsrc/common/util.qh
index 96a8b680595581b649d05c7eed4767d4d4943e2e,ad612f954f459ca0aaba9e2e553dbd72b8293122..ebc37cfd665b4b9aa38b857904f3a41f58f29605
@@@ -203,7 -203,7 +203,7 @@@ float compressShotOrigin(vector v)
  vector decompressShotOrigin(float f);
  
  #ifdef SVQC
- string rankings_reply, ladder_reply, lsmaps_reply, lsnewmaps_reply, maplist_reply; // cached replies
+ string rankings_reply, ladder_reply, lsmaps_reply, maplist_reply; // cached replies
  string records_reply[10];
  #endif
  
@@@ -404,11 -404,5 +404,11 @@@ void dedicated_print(string input)
  #endif
  
  #ifndef MENUQC
 -float Announcer_PickNumber(float num);
 +#define CNT_NORMAL 1
 +#define CNT_GAMESTART 2
 +#define CNT_IDLE 3
 +#define CNT_KILL 4
 +#define CNT_RESPAWN 5
 +#define CNT_ROUNDSTART 6
 +float Announcer_PickNumber(float type, float num);
  #endif
index 2cbed75d389bba697cbbd0211344499d5b78c39c,80b1d23a442f00c4dc1fb418f653bf128401ee7e..ca59aba6012c7a1d092692bc379609fe616b46f8
@@@ -360,26 -360,6 +360,6 @@@ void CommonCommand_lsmaps(float request
        }
  }
  
- void CommonCommand_lsnewmaps(float request, entity caller)
- {
-       switch(request)
-       {
-               case CMD_REQUEST_COMMAND:
-               {
-                       print_to(caller, lsnewmaps_reply);
-                       return; // never fall through to usage
-               }
-                       
-               default:
-               case CMD_REQUEST_USAGE:
-               {
-                       print_to(caller, strcat("\nUsage:^3 ", GetCommandPrefix(caller), " lsnewmaps"));
-                       print_to(caller, "  No arguments required.");
-                       return;
-               }
-       }
- }
  void CommonCommand_printmaplist(float request, entity caller)
  {
        switch(request)
@@@ -554,7 -534,7 +534,7 @@@ void CommonCommand_timeout(float reques
                                
                                if(timeout_status) { print_to(caller, "^7Error: A timeout is already active."); }
                                else if(vote_called) { print_to(caller, "^7Error: You can not call a timeout while a vote is active."); }
 -                              else if(inWarmupStage && !g_warmup_allow_timeout) { print_to(caller, "^7Error: You can not call a timeout in warmup-stage."); }
 +                              else if(warmup_stage && !g_warmup_allow_timeout) { print_to(caller, "^7Error: You can not call a timeout in warmup-stage."); }
                                else if(time < game_starttime) { print_to(caller, "^7Error: You can not call a timeout while the map is being restarted."); }
                                else if(caller && (caller.allowed_timeouts < 1)) { print_to(caller, "^7Error: You already used all your timeout calls for this map."); }
                                else if(caller && !IS_PLAYER(caller)) { print_to(caller, "^7Error: You must be a player to call a timeout."); }
@@@ -693,7 -673,6 +673,6 @@@ void CommonCommand_(float request, enti
        COMMON_COMMAND("info", CommonCommand_info(request, caller, arguments), "Request for unique server information set up by admin") \
        COMMON_COMMAND("ladder", CommonCommand_ladder(request, caller), "Get information about top players if supported") \
        COMMON_COMMAND("lsmaps", CommonCommand_lsmaps(request, caller), "List maps which can be used with the current game mode") \
-       COMMON_COMMAND("lsnewmaps", CommonCommand_lsnewmaps(request, caller), "List maps which have no records or are seemingly unplayed yet") \
        COMMON_COMMAND("printmaplist", CommonCommand_printmaplist(request, caller), "Display full server maplist reply") \
        COMMON_COMMAND("rankings", CommonCommand_rankings(request, caller), "Print information about rankings") \
        COMMON_COMMAND("records", CommonCommand_records(request, caller), "List top 10 records for the current map") \
diff --combined qcsrc/server/g_world.qc
index 52cf9643014781d260f4320cbd90851f1c758a2d,e3b796c4a6271041f31296f5549a4db39650ec00..01473d5b025665b8e1fe96d09f670a089a1a1b62
@@@ -563,7 -563,7 +563,7 @@@ void WeaponStats_Shutdown()
  void spawnfunc_worldspawn (void)
  {
        float fd, l, i, j, n;
-       string s, col;
+       string s;
  
        cvar = cvar_normal;
        cvar_string = cvar_string_normal;
        detect_maptype();
  
        // set up information replies for clients and server to use
-       lsmaps_reply = "^7Maps available: ";
-       lsnewmaps_reply = "^7Maps without a record set: ";
-       for(i = 0, j = 0; i < MapInfo_count; ++i)
-       {
-               if(MapInfo_Get_ByID(i))
-                       if not(MapInfo_Map_flags & MapInfo_ForbiddenFlags())
-                       {
-                               if(mod(i, 2))
-                                       col = "^2";
-                               else
-                                       col = "^3";
-                               ++j;
-                               lsmaps_reply = strcat(lsmaps_reply, col, MapInfo_Map_bspname, " ");
-                               if(g_race && !stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, RACE_RECORD, "time"))))
-                                       lsnewmaps_reply = strcat(lsnewmaps_reply, col, MapInfo_Map_bspname, " ");
-                               else if(g_cts && !stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, CTS_RECORD, "time"))))
-                                       lsnewmaps_reply = strcat(lsnewmaps_reply, col, MapInfo_Map_bspname, " ");
-                       }
-       }
-       lsmaps_reply = strzone(strcat(lsmaps_reply, "\n"));
-       lsnewmaps_reply = strzone(strcat(((!g_race && !g_cts) ? "Need to be playing race or CTS for lsnewmaps to work." : lsnewmaps_reply), "\n"));
-       maplist_reply = "^7Maps in list: ";
-       n = tokenize_console(autocvar_g_maplist);
-       for(i = 0, j = 0; i < n; ++i)
-       {
-               if(MapInfo_CheckMap(argv(i)))
-               {
-                       if(mod(j, 2))
-                               col = "^2";
-                       else
-                               col = "^3";
-                       maplist_reply = strcat(maplist_reply, col, argv(i), " ");
-                       ++j;
-               }
-       }
-       maplist_reply = strzone(strcat(maplist_reply, "\n"));
-       MapInfo_ClearTemps();
+       maplist_reply = strzone(getmaplist());
+       lsmaps_reply = strzone(getlsmaps());
        for(i = 0; i < 10; ++i)
        {
                s = getrecords(i);
                if (s)
                        records_reply[i] = strzone(s);
        }
        ladder_reply = strzone(getladder());
        rankings_reply = strzone(getrankings());
  
        // begin other init
@@@ -1709,7 -1666,7 +1666,7 @@@ float WinningCondition_Onslaught(
  
        WinningConditionHelper(); // set worldstatus
  
 -      if(inWarmupStage)
 +      if(warmup_stage)
                return WINNING_NO;
  
        // first check if the game has ended
@@@ -2102,7 -2059,7 +2059,7 @@@ void CheckRules_World(
        fraglimit = autocvar_fraglimit;
        leadlimit = autocvar_leadlimit;
  
 -      if(inWarmupStage || time <= game_starttime) // NOTE: this is <= to prevent problems in the very tic where the game starts
 +      if(warmup_stage || time <= game_starttime) // NOTE: this is <= to prevent problems in the very tic where the game starts
        {
                if(timelimit > 0)
                        timelimit = 0; // timelimit is not made for warmup