]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/getreplies.qc
Show compact times (1.34 instead of 0:01.34) in some places (messages, scoreboard...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / getreplies.qc
index 95ee35a36f52348480366a6a7e257c113f7f023a..b6bde0c68c210121793de4b84275bc83e195e7f6 100644 (file)
@@ -1,23 +1,24 @@
 #include "getreplies.qh"
 
-#include <common/weapons/_all.qh>
-#include <common/wepent.qh>
-#include <common/stats.qh>
-#include <server/intermission.qh>
-#include <server/world.qh>
-#include <server/miscfunctions.qh>
-
 #include <common/command/_mod.qh>
-#include "getreplies.qh"
-
-#include "../race.qh"
-
 #include <common/constants.qh>
 #include <common/gamemodes/_mod.qh>
+#include <common/monsters/_mod.qh>
 #include <common/net_linked.qh>
+#include <common/notifications/all.qh>
+#include <common/playerstats.qh>
+#include <common/stats.qh>
 #include <common/util.qh>
-
-#include <common/monsters/_mod.qh>
+#include <common/weapons/_all.qh>
+#include <common/wepent.qh>
+#include <server/command/getreplies.qh>
+#include <server/intermission.qh>
+#include <server/main.qh>
+#include <server/mapvoting.qh>
+#include <server/mutators/_mod.qh>
+#include <server/race.qh>
+#include <server/weapons/selection.qh>
+#include <server/world.qh>
 
 // =========================================================
 //  Reply messages for common commands, re-worked by Samual
@@ -31,7 +32,7 @@
 
 // See common.qc for their proper commands
 
-string getrecords(int page)  // 50 records per page
+string getrecords(int page)
 {
        string s = "";
 
@@ -39,9 +40,6 @@ string getrecords(int page)  // 50 records per page
        s = M_ARGV(1, string);
 
        MapInfo_ClearTemps();
-
-       if (s == "" && page == 0)
-               return "No records are available on this server for the current game mode.\n";
        return s;
 }
 
@@ -61,7 +59,7 @@ string getrankings()
 
                n = race_readName(map, i);
                p = count_ordinal(i);
-               s = strcat(s, strpad(8, p), " ", strpad(-8, TIME_ENCODED_TOSTRING(t)), " ", n, "\n");
+               s = strcat(s, strpad(8, p), " ", strpad(-8, TIME_ENCODED_TOSTRING(t, false)), " ", n, "\n");
        }
 
        MapInfo_ClearTemps();
@@ -306,6 +304,7 @@ string getmonsterlist()
 =============
 GetCvars
 =============
+Superseded by REPLICATE
 Called with:
   0:  sends the request
   >0: receives a cvar from name=argv(f) value=argv(f+1)
@@ -375,12 +374,6 @@ void GetCvars_handleFloatOnce(entity this, entity store, string thisname, float
                        stuffcmd(this, strcat("cl_cmd sendcvar ", name, "\n"));
        }
 }
-string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(entity this, string wo)
-{
-       string o = W_FixWeaponOrder_ForceComplete(wo);
-       strcpy(CS(this).weaponorder_byimpulse, W_FixWeaponOrder_BuildImpulseList(o));
-       return o;
-}
 
 /**
  * @param f -1: cleanup, 0: request, 1: receive
@@ -399,39 +392,9 @@ void GetCvars(entity this, entity store, int f)
        get_cvars_s = s;
        MUTATOR_CALLHOOK(GetCvars);
 
-       Notification_GetCvars(this);
+       Notification_GetCvars(this, store);
 
        ReplicateVars(this, store, s, f);
-
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[0], "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[1], "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[2], "cl_weaponpriority2", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[3], "cl_weaponpriority3", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[4], "cl_weaponpriority4", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[5], "cl_weaponpriority5", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[6], "cl_weaponpriority6", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[7], "cl_weaponpriority7", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[8], "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
-
-       GetCvars_handleFloat(this, store, s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
-
-       // fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)
        if (f > 0)
-       {
-               if (s == "cl_weaponpriority")
-               {
-                       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-                       {
-                               .entity weaponentity = weaponentities[slot];
-                               if (this.(weaponentity) && (this.(weaponentity).m_weapon != WEP_Null || slot == 0))
-                                       this.(weaponentity).m_switchweapon = w_getbestweapon(this, weaponentity);
-                       }
-               }
-               if (s == "cl_allow_uidtracking")
-                       PlayerStats_GameReport_AddPlayer(this);
-               //if (s == "cl_gunalign")
-                       //W_ResetGunAlign(this, store.cvar_cl_gunalign);
-       }
+               ReplicateVars_ApplyChange(this, store, s, f);
 }