Merge branch 'terencehill/quickmenu_file_example' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / commands / cl_cmd.qc
1 // ==============================================
2 //  CSQC client commands code, written by Samual
3 //  Last updated: December 28th, 2011
4 // ==============================================
5
6 #include "../../common/command/command.qh"
7 #include "cl_cmd.qh"
8
9 #include "../autocvars.qh"
10 #include "../defs.qh"
11 #include "../hud/all.qh"
12 #include "../main.qh"
13 #include "../mapvoting.qh"
14 #include "../miscfunctions.qh"
15
16 #include "../mutators/events.qh"
17
18 #include "../../common/mapinfo.qh"
19
20 #include "../../common/command/generic.qh"
21
22 void DrawDebugModel(entity this)
23 {
24         if (time - floor(time) > 0.5)
25         {
26                 PolyDrawModel(self);
27                 self.drawmask = 0;
28         }
29         else
30         {
31                 self.renderflags = 0;
32                 self.drawmask = MASK_NORMAL;
33         }
34 }
35
36
37 // =======================
38 //  Command Sub-Functions
39 // =======================
40
41 void LocalCommand_blurtest(int request)
42 {
43         // Simple command to work with postprocessing temporarily... possibly completely pointless, the glsl shader is used for a real feature now...
44         // Anyway, to enable it, just compile the client with -DBLURTEST and then you can use the command.
45
46         #ifdef BLURTEST
47         switch (request)
48         {
49                 case CMD_REQUEST_COMMAND:
50                 {
51                         blurtest_time0 = time;
52                         blurtest_time1 = time + stof(argv(1));
53                         blurtest_radius = stof(argv(2));
54                         blurtest_power = stof(argv(3));
55                         LOG_INFO("Enabled blurtest\n");
56                         return;
57                 }
58
59                 default:
60                 case CMD_REQUEST_USAGE:
61                 {
62                         LOG_INFO("\nUsage:^3 cl_cmd blurtest\n");
63                         LOG_INFO("  No arguments required.\n");
64                         return;
65                 }
66         }
67         #else
68         if (request)
69         {
70                 LOG_INFO("Blurtest is not enabled on this client.\n");
71                 return;
72         }
73         #endif
74 }
75
76 void LocalCommand_boxparticles(int request, int argc)
77 {
78         switch (request)
79         {
80                 case CMD_REQUEST_COMMAND:
81                 {
82                         if (argc == 9)
83                         {
84                                 int effect = _particleeffectnum(argv(1));
85                                 if (effect >= 0)
86                                 {
87                                         int index = stoi(argv(2));
88                                         entity own;
89                                         if (index <= 0)
90                                                 own = entitybyindex(-index);
91                                         else
92                                                 own = findfloat(world, entnum, index);
93                                         vector org_from = stov(argv(3));
94                                         vector org_to = stov(argv(4));
95                                         vector dir_from = stov(argv(5));
96                                         vector dir_to = stov(argv(6));
97                                         int countmultiplier = stoi(argv(7));
98                                         int flags = stoi(argv(8));
99                                         boxparticles(effect, own, org_from, org_to, dir_from, dir_to, countmultiplier, flags);
100                                         return;
101                                 }
102                         }
103                 }
104
105                 default:
106                 {
107                         LOG_INFO("Incorrect parameters for ^2boxparticles^7\n");
108                 }
109                 case CMD_REQUEST_USAGE:
110                 {
111                         LOG_INFO("\nUsage:^3 lv_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n");
112                         LOG_INFO("  'effectname' is the name of a particle effect in effectinfo.txt\n");
113                         LOG_INFO("  'own' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n");
114                         LOG_INFO("  'org_from' is the starting origin of the box\n");
115                         LOG_INFO("  'org_to' is the ending origin of the box\n");
116                         LOG_INFO("  'dir_from' is the minimum velocity\n");
117                         LOG_INFO("  'dir_to' is the maximum velocity\n");
118                         LOG_INFO("  'countmultiplier' defines a multiplier for the particle count (affects count only, not countabsolute or trailspacing)\n");
119                         LOG_INFO("  'flags' can contain:\n");
120                         LOG_INFO("    1 to respect globals particles_alphamin, particles_alphamax (set right before via prvm_globalset client)\n");
121                         LOG_INFO("    2 to respect globals particles_colormin, particles_colormax (set right before via prvm_globalset client)\n");
122                         LOG_INFO("    4 to respect globals particles_fade (set right before via prvm_globalset client)\n");
123                         LOG_INFO("    128 to draw a trail, not a box\n");
124                         return;
125                 }
126         }
127 }
128
129 void LocalCommand_create_scrshot_ent(int request)
130 {
131         switch (request)
132         {
133                 case CMD_REQUEST_COMMAND:
134                 {
135                         string filename = strcat(MapInfo_Map_bspname, "_scrshot_ent.txt");
136                         int fh = fopen(filename, FILE_WRITE);
137
138                         if (fh >= 0)
139                         {
140                                 fputs(fh, "{\n");
141                                 fputs(fh, strcat("\"classname\" \"info_autoscreenshot\"\n"));
142                                 fputs(fh, strcat("\"origin\" \"", strcat(ftos(view_origin.x), " ", ftos(view_origin.y), " ", ftos(view_origin.z)), "\"\n"));
143                                 fputs(fh, strcat("\"angles\" \"", strcat(ftos(view_angles.x), " ", ftos(view_angles.y), " ", ftos(view_angles.z)), "\"\n"));
144                                 fputs(fh, "}\n");
145
146                                 LOG_INFO("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
147
148                                 fclose(fh);
149                         }
150                         else
151                         {
152                                 LOG_INFO("^1Error: ^7Could not dump to file!\n");
153                         }
154                         return;
155                 }
156
157                 default:
158                 case CMD_REQUEST_USAGE:
159                 {
160                         LOG_INFO("\nUsage:^3 cl_cmd create_scrshot_ent\n");
161                         LOG_INFO("  No arguments required.\n");
162                         return;
163                 }
164         }
165 }
166
167 void LocalCommand_debugmodel(int request, int argc)
168 {
169         switch (request)
170         {
171                 case CMD_REQUEST_COMMAND:
172                 {
173                         string modelname = argv(1);
174
175                         entity debugmodel_entity = new(debugmodel);
176                         precache_model(modelname);
177                         _setmodel(debugmodel_entity, modelname);
178                         setorigin(debugmodel_entity, view_origin);
179                         debugmodel_entity.angles = view_angles;
180                         debugmodel_entity.draw = DrawDebugModel;
181
182                         return;
183                 }
184
185                 default:
186                 case CMD_REQUEST_USAGE:
187                 {
188                         LOG_INFO("\nUsage:^3 cl_cmd debugmodel model\n");
189                         LOG_INFO("  Where 'model' is a string of the model name to use for the debug model.\n");
190                         return;
191                 }
192         }
193 }
194
195 void LocalCommand_handlevote(int request, int argc)
196 {
197         switch (request)
198         {
199                 case CMD_REQUEST_COMMAND:
200                 {
201                         int vote_selection;
202                         string vote_string;
203
204                         if (InterpretBoolean(argv(1)))
205                         {
206                                 vote_selection = 2;
207                                 vote_string = "yes";
208                         }
209                         else
210                         {
211                                 vote_selection = 1;
212                                 vote_string = "no";
213                         }
214
215                         if (vote_selection)
216                         {
217                                 if (uid2name_dialog)  // handled by "uid2name" option
218                                 {
219                                         vote_active = 0;
220                                         vote_prev = 0;
221                                         vote_change = -9999;
222                                         localcmd(strcat("setreport cl_allow_uid2name ", ftos(vote_selection - 1), "\n"));
223                                         uid2name_dialog = 0;
224                                 }
225                                 else { localcmd(strcat("cmd vote ", vote_string, "\n")); }
226
227                                 return;
228                         }
229                 }
230
231                 default:
232                 {
233                         LOG_INFO("Incorrect parameters for ^2handlevote^7\n");
234                 }
235                 case CMD_REQUEST_USAGE:
236                 {
237                         LOG_INFO("\nUsage:^3 cl_cmd handlevote vote\n");
238                         LOG_INFO("  Where 'vote' is the selection for either the current poll or uid2name.\n");
239                         return;
240                 }
241         }
242 }
243
244 bool QuickMenu_IsOpened();
245 void QuickMenu_Close();
246 bool QuickMenu_Open(string mode, string submenu);
247
248 bool HUD_MinigameMenu_IsOpened();
249 void HUD_MinigameMenu_Close();
250 void HUD_MinigameMenu_Open();
251
252 void HUD_Radar_Show_Maximized(bool doshow, bool clickable);
253
254 void LocalCommand_hud(int request, int argc)
255 {
256         switch (request)
257         {
258                 case CMD_REQUEST_COMMAND:
259                 {
260                         switch (argv(1))
261                         {
262                                 case "configure":
263                                 {
264                                         cvar_set("_hud_configure", ftos(!autocvar__hud_configure));
265                                         return;
266                                 }
267
268                                 case "quickmenu":
269                                 {
270                                         if (argv(2) == "help")
271                                         {
272                                                 LOG_INFO(" quickmenu [[default | file | \"\"] submenu]\n");
273                                                 LOG_INFO("Called without options (or with \"\") loads either the default quickmenu or a quickmenu file if hud_panel_quickmenu_file is set to a valid filename.\n");
274                                                 LOG_INFO("A submenu name can be given to open the quickmenu directly in a submenu; it requires to specify 'default', 'file' or '\"\"' option.\n");
275                                                 return;
276                                         }
277                                         if (QuickMenu_IsOpened())
278                                                 QuickMenu_Close();
279                                         else
280                                                 QuickMenu_Open(argv(2), argv(3));  // mode, submenu
281                                         return;
282                                 }
283
284                                 case "minigame":
285                                 {
286                                         if (HUD_MinigameMenu_IsOpened())
287                                                 HUD_MinigameMenu_Close();
288                                         else
289                                                 HUD_MinigameMenu_Open();
290                                         return;
291                                 }
292
293                                 case "save":
294                                 {
295                                         if (argv(2))
296                                         {
297                                                 HUD_Panel_ExportCfg(argv(2));
298                                                 return;
299                                         }
300                                         else
301                                         {
302                                                 break;  // go to usage, we're missing the paramater needed here.
303                                         }
304                                 }
305
306                                 case "scoreboard_columns_set":
307                                 {
308                                         Cmd_HUD_SetFields(argc);
309                                         return;
310                                 }
311
312                                 case "scoreboard_columns_help":
313                                 {
314                                         Cmd_HUD_Help();
315                                         return;
316                                 }
317
318                                 case "radar":
319                                 {
320                                         if (argv(2))
321                                                 HUD_Radar_Show_Maximized(InterpretBoolean(argv(2)), 0);
322                                         else
323                                                 HUD_Radar_Show_Maximized(!hud_panel_radar_maximized, 0);
324                                         return;
325                                 }
326
327                                 case "clickradar":
328                                 {
329                                         HUD_Radar_Show_Maximized(!hud_panel_radar_mouse, 1);
330                                         return;
331                                 }
332                         }
333                 }
334
335                 default:
336                 {
337                         LOG_INFO("Incorrect parameters for ^2hud^7\n");
338                 }
339                 case CMD_REQUEST_USAGE:
340                 {
341                         LOG_INFO("\nUsage:^3 cl_cmd hud action [configname | radartoggle | layout]\n");
342                         LOG_INFO("  Where 'action' is the command to complete,\n");
343                         LOG_INFO("  'configname' is the name to save to for \"save\" action,\n");
344                         LOG_INFO("  'radartoggle' is to control hud_panel_radar_maximized for \"radar\" action,\n");
345                         LOG_INFO("  and 'layout' is how to organize the scoreboard columns for the set action.\n");
346                         LOG_INFO("  Full list of commands here: \"configure, quickmenu, minigame, save, scoreboard_columns_help, scoreboard_columns_set, radar.\"\n");
347                         return;
348                 }
349         }
350 }
351
352 void LocalCommand_localprint(int request, int argc)
353 {
354         switch (request)
355         {
356                 case CMD_REQUEST_COMMAND:
357                 {
358                         if (argv(1))
359                         {
360                                 centerprint_hud(argv(1));
361                                 return;
362                         }
363                 }
364
365                 default:
366                 {
367                         LOG_INFO("Incorrect parameters for ^2localprint^7\n");
368                 }
369                 case CMD_REQUEST_USAGE:
370                 {
371                         LOG_INFO("\nUsage:^3 cl_cmd localprint \"message\"\n");
372                         LOG_INFO("  'message' is the centerprint message to send to yourself.\n");
373                         return;
374                 }
375         }
376 }
377
378 void LocalCommand_mv_download(int request, int argc)
379 {
380         switch (request)
381         {
382                 case CMD_REQUEST_COMMAND:
383                 {
384                         if (argv(1))
385                         {
386                                 Cmd_MapVote_MapDownload(argc);
387                                 return;
388                         }
389                 }
390
391                 default:
392                 {
393                         LOG_INFO("Incorrect parameters for ^2mv_download^7\n");
394                 }
395                 case CMD_REQUEST_USAGE:
396                 {
397                         LOG_INFO("\nUsage:^3 cl_cmd mv_download mapid\n");
398                         LOG_INFO("  Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n");
399                         return;
400                 }
401         }
402 }
403
404 void LocalCommand_find(int request, int argc)
405 {
406         switch (request)
407         {
408                 case CMD_REQUEST_COMMAND:
409                 {
410                         entity client;
411
412                         for (client = world; (client = find(client, classname, argv(1))); )
413                                 LOG_INFO(etos(client), "\n");
414
415                         return;
416                 }
417
418                 default:
419                 {
420                         LOG_INFO("Incorrect parameters for ^2find^7\n");
421                 }
422                 case CMD_REQUEST_USAGE:
423                 {
424                         LOG_INFO("\nUsage:^3 cl_cmd find classname\n");
425                         LOG_INFO("  Where 'classname' is the classname to search for.\n");
426                         return;
427                 }
428         }
429 }
430
431 void LocalCommand_sendcvar(int request, int argc)
432 {
433         switch (request)
434         {
435                 case CMD_REQUEST_COMMAND:
436                 {
437                         if (argv(1))
438                         {
439                                 // W_FixWeaponOrder will trash argv, so save what we need.
440                                 string thiscvar = strzone(argv(1));
441                                 string s = cvar_string(thiscvar);
442
443                                 if (thiscvar == "cl_weaponpriority")
444                                         s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 1);
445                                 else if (substring(thiscvar, 0, 17) == "cl_weaponpriority" && strlen(thiscvar) == 18)
446                                         s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 0);
447
448                                 localcmd("cmd sentcvar ", thiscvar, " \"", s, "\"\n");
449                                 strunzone(thiscvar);
450                                 return;
451                         }
452                 }
453
454                 default:
455                 {
456                         LOG_INFO("Incorrect parameters for ^2sendcvar^7\n");
457                 }
458                 case CMD_REQUEST_USAGE:
459                 {
460                         LOG_INFO("\nUsage:^3 cl_cmd sendcvar <cvar>\n");
461                         LOG_INFO("  Where 'cvar' is the cvar plus arguments to send to the server.\n");
462                         return;
463                 }
464         }
465 }
466
467 /* use this when creating a new command, making sure to place it in alphabetical order... also,
468 ** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
469 void LocalCommand_(int request)
470 {
471     switch(request)
472     {
473         case CMD_REQUEST_COMMAND:
474         {
475
476             return;
477         }
478
479         default:
480         case CMD_REQUEST_USAGE:
481         {
482             print("\nUsage:^3 cl_cmd \n");
483             print("  No arguments required.\n");
484             return;
485         }
486     }
487 }
488 */
489
490
491 // ==================================
492 //  Macro system for client commands
493 // ==================================
494
495 // Normally do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
496 #define CLIENT_COMMANDS(request, arguments) \
497         CLIENT_COMMAND("blurtest", LocalCommand_blurtest(request), "Feature for testing blur postprocessing") \
498         CLIENT_COMMAND("boxparticles", LocalCommand_boxparticles(request, arguments), "Spawn particles manually") \
499         CLIENT_COMMAND("create_scrshot_ent", LocalCommand_create_scrshot_ent(request), "Create an entity at this location for automatic screenshots") \
500         CLIENT_COMMAND("debugmodel", LocalCommand_debugmodel(request, arguments), "Spawn a debug model manually") \
501         CLIENT_COMMAND("handlevote", LocalCommand_handlevote(request, arguments), "System to handle selecting a vote or option") \
502         CLIENT_COMMAND("hud", LocalCommand_hud(request, arguments), "Commands regarding/controlling the HUD system") \
503         CLIENT_COMMAND("localprint", LocalCommand_localprint(request, arguments), "Create your own centerprint sent to yourself") \
504         CLIENT_COMMAND("find", LocalCommand_find(request, arguments), "Search through entities for matching classname") \
505         CLIENT_COMMAND("mv_download", LocalCommand_mv_download(request, arguments), "Retrieve mapshot picture from the server") \
506         CLIENT_COMMAND("sendcvar", LocalCommand_sendcvar(request, arguments), "Send a cvar to the server (like weaponpriority)") \
507         /* nothing */
508
509 void LocalCommand_macro_help()
510 {
511         #define CLIENT_COMMAND(name, function, description) \
512                 { if (strtolower(description) != "") { LOG_INFO("  ^2", name, "^7: ", description, "\n"); } }
513
514         CLIENT_COMMANDS(0, 0);
515         #undef CLIENT_COMMAND
516 }
517
518 bool LocalCommand_macro_command(int argc)
519 {
520         #define CLIENT_COMMAND(name, function, description) \
521                 { if (name == strtolower(argv(0))) { function; return true; } }
522
523         CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc);
524         #undef CLIENT_COMMAND
525
526         return false;
527 }
528
529 bool LocalCommand_macro_usage(int argc)
530 {
531         #define CLIENT_COMMAND(name, function, description) \
532                 { if (name == strtolower(argv(1))) { function; return true; } }
533
534         CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc);
535         #undef CLIENT_COMMAND
536
537         return false;
538 }
539
540 void LocalCommand_macro_write_aliases(int fh)
541 {
542         #define CLIENT_COMMAND(name, function, description) \
543                 { if (strtolower(description) != "") { CMD_Write_Alias("qc_cmd_cl", name, description); } }
544
545         CLIENT_COMMANDS(0, 0);
546         #undef CLIENT_COMMAND
547 }
548
549
550 // =========================================
551 //  Main Function Called By Engine (cl_cmd)
552 // =========================================
553 // If this function exists, client code handles gamecommand instead of the engine code.
554
555 void GameCommand(string command)
556 {
557         int argc = tokenize_console(command);
558
559         // Guide for working with argc arguments by example:
560         // argc:   1    - 2      - 3     - 4
561         // argv:   0    - 1      - 2     - 3
562         // cmd     vote - master - login - password
563         string s = strtolower(argv(0));
564         if (s == "help")
565         {
566                 if (argc == 1)
567                 {
568                         LOG_INFO("\nClient console commands:\n");
569                         LocalCommand_macro_help();
570
571                         LOG_INFO("\nGeneric commands shared by all programs:\n");
572                         GenericCommand_macro_help();
573
574                         LOG_INFO("\nUsage:^3 cl_cmd COMMAND...^7, where possible commands are listed above.\n");
575                         LOG_INFO("For help about a specific command, type cl_cmd help COMMAND\n");
576
577                         return;
578                 }
579                 else if (GenericCommand_macro_usage(argc))  // Instead of trying to call a command, we're going to see detailed information about it
580                 {
581                         return;
582                 }
583                 else if (LocalCommand_macro_usage(argc))  // now try for normal commands too
584                 {
585                         return;
586                 }
587         }
588         // continue as usual and scan for normal commands
589         if (GenericCommand(command)                                    // handled by common/command/generic.qc
590             || LocalCommand_macro_command(argc)                        // handled by one of the above LocalCommand_* functions
591             || MUTATOR_CALLHOOK(CSQC_ConsoleCommand, s, argc, command) // handled by a mutator
592            ) return;
593
594         // nothing above caught the command, must be invalid
595         LOG_INFO(((command != "") ? strcat("Unknown client command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try cl_cmd help.\n");
596 }
597
598
599 // ===================================
600 //  Macro system for console commands
601 // ===================================
602
603 // These functions are here specifically to add special + - commands to the game, and are not really normal commands.
604 // Please add client commands to the function above this, as this is only for special reasons.
605 #define CONSOLE_COMMANDS_NORMAL() \
606         CONSOLE_COMMAND("+showscores", { scoreboard_showscores = true; }) \
607         CONSOLE_COMMAND("-showscores", { scoreboard_showscores = false; }) \
608         CONSOLE_COMMAND("+showaccuracy", { scoreboard_showaccuracy = true; }) \
609         CONSOLE_COMMAND("-showaccuracy", { scoreboard_showaccuracy = false; }) \
610         /* nothing */
611
612 #define CONSOLE_COMMANDS_MOVEMENT() \
613         CONSOLE_COMMAND("+forward", { ++camera_direction.x; }) \
614         CONSOLE_COMMAND("-forward", { --camera_direction.x; }) \
615         CONSOLE_COMMAND("+back", { --camera_direction.x; }) \
616         CONSOLE_COMMAND("-back", { ++camera_direction.x; }) \
617         CONSOLE_COMMAND("+moveup", { ++camera_direction.z; }) \
618         CONSOLE_COMMAND("-moveup", { --camera_direction.z; }) \
619         CONSOLE_COMMAND("+movedown", { --camera_direction.z; }) \
620         CONSOLE_COMMAND("-movedown", { ++camera_direction.z; }) \
621         CONSOLE_COMMAND("+moveright", { --camera_direction.y; }) \
622         CONSOLE_COMMAND("-moveright", { ++camera_direction.y; }) \
623         CONSOLE_COMMAND("+moveleft", { ++camera_direction.y; }) \
624         CONSOLE_COMMAND("-moveleft", { --camera_direction.y; }) \
625         CONSOLE_COMMAND("+roll_right", { ++camera_roll; }) \
626         CONSOLE_COMMAND("-roll_right", { --camera_roll; }) \
627         CONSOLE_COMMAND("+roll_left", { --camera_roll; }) \
628         CONSOLE_COMMAND("-roll_left", { ++camera_roll; }) \
629         /* nothing */
630
631 void ConsoleCommand_macro_init()
632 {
633         // first init normal commands
634         #define CONSOLE_COMMAND(name, execution) \
635                 { registercommand(name); }
636
637         CONSOLE_COMMANDS_NORMAL();
638         #undef CONSOLE_COMMAND
639
640         // then init movement commands
641         #ifndef CAMERATEST
642         if (isdemo())
643         {
644         #endif
645         #define CONSOLE_COMMAND(name, execution) \
646                 registercommand(name);
647
648         CONSOLE_COMMANDS_MOVEMENT();
649                 #undef CONSOLE_COMMAND
650         #ifndef CAMERATEST
651 }
652         #endif
653 }
654
655 bool ConsoleCommand_macro_normal(string s, int argc)
656 {
657         #define CONSOLE_COMMAND(name, execution) \
658                 { if (name == s) { { execution } return true; } }
659
660         CONSOLE_COMMANDS_NORMAL();
661         #undef CONSOLE_COMMAND
662
663         return false;
664 }
665
666 bool ConsoleCommand_macro_movement(string s, int argc)
667 {
668         if (camera_active)
669         {
670                 #define CONSOLE_COMMAND(name, execution) \
671                         { if (name == s) { { execution } return true; } }
672
673                 CONSOLE_COMMANDS_MOVEMENT();
674                 #undef CONSOLE_COMMAND
675         }
676
677         return false;
678 }
679
680
681 // ======================================================
682 //  Main Function Called By Engine (registered commands)
683 // ======================================================
684 // Used to parse commands in the console that have been registered with the "registercommand" function
685
686 bool CSQC_ConsoleCommand(string command)
687 {
688         int argc = tokenize_console(command);
689         string s = strtolower(argv(0));
690         // Return value should be true if CSQC handled the command, otherwise return false to have the engine handle it.
691         return ConsoleCommand_macro_normal(s, argc)
692                || ConsoleCommand_macro_movement(s, argc)
693         ;
694 }