]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Now make everything else compile too
authorSamual <samual@xonotic.org>
Tue, 13 Dec 2011 09:36:05 +0000 (04:36 -0500)
committerSamual <samual@xonotic.org>
Tue, 13 Dec 2011 09:36:05 +0000 (04:36 -0500)
qcsrc/client/command/cl_cmd.qc
qcsrc/client/command/cl_cmd.qh [new file with mode: 0644]
qcsrc/client/progs.src
qcsrc/common/command/generic.qh [new file with mode: 0644]
qcsrc/common/command/shared_defs.qh [new file with mode: 0644]
qcsrc/common/util.qc
qcsrc/menu/progs.src
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/common.qh
qcsrc/server/progs.src

index a15626a71b0c82e5ebe559f1ac9f6f3ded8d84cd..74b37e193a29f1f995c27587c015d1f427f86169 100644 (file)
     }
        */
 
-
-#define GC_REQUEST_COMMAND 1
-#define GC_REQUEST_USAGE 2
-
-void Cmd_HUD_SetFields(float);
-void Cmd_HUD_Help(float);
-
-.vector view_ofs;
-entity debug_shotorg;
-
-
 // ============================
 //  Misc. Supporting Functions
 // ============================
diff --git a/qcsrc/client/command/cl_cmd.qh b/qcsrc/client/command/cl_cmd.qh
new file mode 100644 (file)
index 0000000..b55c866
--- /dev/null
@@ -0,0 +1,13 @@
+// ==============================================
+//  CSQC client commands code, written by Samual
+//  Last updated: November 26th, 2011
+// ==============================================
+
+#define GC_REQUEST_COMMAND 1
+#define GC_REQUEST_USAGE 2
+
+void Cmd_HUD_SetFields(float);
+void Cmd_HUD_Help(float);
+
+.vector view_ofs;
+entity debug_shotorg;
\ No newline at end of file
index f87bfb002cf8fef981fb47ab78cacf36be1e3e2f..7804ac4b8142899cd2111c0ff170946c7bd6ac7a 100644 (file)
@@ -17,8 +17,11 @@ Defs.qc
 ../common/util.qh
 ../common/items.qh
 ../common/explosion_equation.qh
-
 ../common/mapinfo.qh
+../common/command/generic.qh
+../common/command/shared_defs.qh
+
+command/cl_cmd.qh
 
 autocvars.qh
 
@@ -75,15 +78,16 @@ movetypes.qc
 prandom.qc
 bgmscript.qc
 noise.qc
-gamecommand.qc
 
 ../common/util.qc
-../common/gamecommand.qc
+../common/command/generic.qc
 ../common/mapinfo.qc
 ../common/items.qc
 ../server/w_all.qc
 ../common/explosion_equation.qc
 
+command/cl_cmd.qc
+
 ../warpzonelib/anglestransform.qc
 ../warpzonelib/mathlib.qc
 ../warpzonelib/common.qc
diff --git a/qcsrc/common/command/generic.qh b/qcsrc/common/command/generic.qh
new file mode 100644 (file)
index 0000000..3189d87
--- /dev/null
@@ -0,0 +1 @@
+// empty for now
\ No newline at end of file
diff --git a/qcsrc/common/command/shared_defs.qh b/qcsrc/common/command/shared_defs.qh
new file mode 100644 (file)
index 0000000..777608b
--- /dev/null
@@ -0,0 +1,8 @@
+// =========================================================
+//  Shared declarations for all commands, written by Samual
+//  Last updated: December 13th, 2011
+// =========================================================
+
+// identifiers for subfunction requests by the command code structure
+#define CMD_REQUEST_COMMAND 1
+#define CMD_REQUEST_USAGE 2
index 10e4e345b28298ead91a5420e4c0c11da92dc36b..5f648dd52a2f6e328854a457ac92fef15be0fbbf 100644 (file)
@@ -2107,3 +2107,11 @@ float lowestbit(float f)
        f &~= f * 65536;
        return f;
 }
+
+string strlimitedlen(string input, string truncation, float strip_colors, float limit)
+{
+       if(strlen((strip_colors ? strdecolorize(input) : input)) <= limit)
+               return input;
+       else
+               return strcat(substring(input, 0, (strlen(input) - strlen(truncation))), truncation);
+}
index 979ae519f77b4ca2ebb4ecb25fb641b9387365c6..84b65e12f3f30fc2a6ac2250406fe6e392707f4d 100644 (file)
@@ -15,8 +15,10 @@ oo/base.h
 ../common/mapinfo.qh
 ../common/campaign_common.qh
 ../common/items.qh
+../common/command/generic.qh
+../common/command/shared_defs.qh
 
-gamecommand.qh
+command/menu_cmd.qh
 menu.qh
 draw.qh
 skin.qh
@@ -28,8 +30,8 @@ oo/implementation.h
        classes.c
 
 ../common/util.qc
-../common/gamecommand.qc
-gamecommand.qc
+../common/command/generic.qc
+command/menu_cmd.qc
 menu.qc
 draw.qc
 xonotic/util.qc
index 9ed8aa78f050b0134c8d9ba41fc53019236ba6eb..15c03f5d24e59fa3c6eb09aff1458dcbb16f1843 100644 (file)
@@ -857,14 +857,14 @@ void ClientCommand_who(float request)
                {
                        float total_listed_players, tmp_hours, tmp_minutes, tmp_seconds;
                        entity tmp_player;
-                       string tmp_player_name;
+                       //string tmp_player_name;
                        
                        sprint(self, strcat("List of client information", (autocvar_sv_status_privacy ? " (some data is hidden for privacy)" : string_null), ":\n"));
                        sprint(self, sprintf(" %-4s %-20s %-5s %-3s %-9s %-16s %s\n", "ent", "nickname", "ping", "pl", "time", "ip", "crypto_id"));
                        
                        FOR_EACH_CLIENT(tmp_player)
                        {
-                               tmp_player_name = strlimitedlen(tmp_player.netname, TRUE, 20);
+                               //tmp_player_name = strlimitedlen(tmp_player.netname, TRUE, 20);
                                
                                tmp_hours = tmp_minutes = tmp_seconds = 0;
                                
index 8153505b55083ced9d27f8138c74e3d148c3b8df..67538cc945d18c9f27690921e12a193561a81303 100644 (file)
@@ -3,15 +3,6 @@
 //  Last updated: December 13th, 2011
 // ====================================================
 
-// TODO: move this to some util file?
-string strlimitedlen(string input, float strip_colors, float limit)
-{
-       if(strlen((strip_colors ? strdecolorize(input) : input)) <= limit)
-               return input;
-       else
-               return strcat(substring(input, 0, (strlen(input) - 3)), "...");
-}
-
 // find a player which matches the input string, and return their entity number
 float GetFilteredNumber(string input)
 {
@@ -398,14 +389,14 @@ void CommonCommand_who(float request)
                {
                        float total_listed_players, tmp_hours, tmp_minutes, tmp_seconds;
                        entity tmp_player;
-                       string tmp_player_name;
+                       //string tmp_player_name;
                        
                        sprint(self, strcat("List of client information", (autocvar_sv_status_privacy ? " (some data is hidden for privacy)" : string_null), ":\n"));
                        sprint(self, sprintf(" %-4s %-20s %-5s %-3s %-9s %-16s %s\n", "ent", "nickname", "ping", "pl", "time", "ip", "crypto_id"));
                        
                        FOR_EACH_CLIENT(tmp_player)
                        {
-                               tmp_player_name = strlimitedlen(tmp_player.netname, TRUE, 20);
+                               //tmp_player_name = strlimitedlen(tmp_player.netname, "...", TRUE, 20);
                                
                                tmp_hours = tmp_minutes = tmp_seconds = 0;
                                
index 2f6ad02b87589ff80117f9556d79d7fd03ee33c5..10c4f9bfb704f17b0192b6ea83de5233577983dc 100644 (file)
@@ -3,6 +3,4 @@
 //  Last updated: December 13th, 2011
 // ============================================================
 
-// identifiers for subfunction requests by the command code structure
-#define CMD_REQUEST_COMMAND 1
-#define CMD_REQUEST_USAGE 2
+// nothing needed here
\ No newline at end of file
index 72fac171b7044f56e3dade90c54f96ffb4002a82..46ed5dd82cddf488e5069497dfdbe67045dfb1e2 100644 (file)
@@ -17,6 +17,8 @@ sys-post.qh
 ../common/items.qh
 ../common/explosion_equation.qh
 ../common/urllib.qh
+../common/command/generic.qh
+../common/command/shared_defs.qh
 
 autocvars.qh
 constants.qh
@@ -141,7 +143,7 @@ campaign.qc
 ../common/campaign_setup.qc
 ../common/urllib.qc
 
-../common/gamecommand.qc
+../common/command/generic.qc
 command/common.qc
 command/radarmap.qc
 command/vote.qc