]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Simplify progs.inc
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 24 Mar 2016 00:01:48 +0000 (11:01 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 24 Mar 2016 00:01:48 +0000 (11:01 +1100)
172 files changed:
qcsrc/client/_mod.inc [new file with mode: 0644]
qcsrc/client/commands/_mod.inc [new file with mode: 0644]
qcsrc/client/commands/all.qc
qcsrc/client/hud/_mod.inc [new file with mode: 0644]
qcsrc/client/hud/all.qc [deleted file]
qcsrc/client/hud/panel/_mod.inc [new file with mode: 0644]
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/client/hud/panel/quickmenu.qh
qcsrc/client/main.qc
qcsrc/client/mutators/_mod.inc [new file with mode: 0644]
qcsrc/client/progs.inc
qcsrc/client/quickmenu.qc [deleted file]
qcsrc/client/quickmenu.qh [deleted file]
qcsrc/client/scoreboard.qc
qcsrc/client/view.qc
qcsrc/client/weapons/_mod.inc [new file with mode: 0644]
qcsrc/common/_all.inc
qcsrc/common/_mod.inc [new file with mode: 0644]
qcsrc/common/command/_mod.inc [new file with mode: 0644]
qcsrc/common/deathtypes/_mod.inc [new file with mode: 0644]
qcsrc/common/effects/_mod.inc [new file with mode: 0644]
qcsrc/common/effects/qc/_mod.inc [new file with mode: 0644]
qcsrc/common/effects/qc/casings.qc
qcsrc/common/gamemodes/_mod.inc [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/_mod.inc [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/nexball/_mod.inc [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/onslaught/_mod.inc [new file with mode: 0644]
qcsrc/common/impulses/_mod.inc [new file with mode: 0644]
qcsrc/common/items/_mod.inc [new file with mode: 0644]
qcsrc/common/items/all.inc [deleted file]
qcsrc/common/items/all.qc
qcsrc/common/items/all.qh
qcsrc/common/items/item.qh
qcsrc/common/items/item/_mod.inc [new file with mode: 0644]
qcsrc/common/minigames/_mod.inc [new file with mode: 0644]
qcsrc/common/minigames/minigame/_mod.inc [new file with mode: 0644]
qcsrc/common/models/_mod.inc [new file with mode: 0644]
qcsrc/common/monsters/_mod.inc [new file with mode: 0644]
qcsrc/common/monsters/all.inc [deleted file]
qcsrc/common/monsters/all.qc
qcsrc/common/monsters/all.qh
qcsrc/common/monsters/monster.qh
qcsrc/common/monsters/monster/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/bloodloss/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/breakablehook/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/buffs/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/bugrigs/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/campcheck/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/cloaked/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/damagetext/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/dodging/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/doublejump/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/hook/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/instagib/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/invincibleproj/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/melee_only/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/midair/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/multijump/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/nades/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/new_toys/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/nix/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/overkill/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/physical_items/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/pinata/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/random_gravity/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/rocketflying/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/rocketminsta/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/running_guns/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/sandbox/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/spawn_near_teammate/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/superspec/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/touchexplode/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/vampire/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/vampirehook/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/waypoints/_mod.inc [new file with mode: 0644]
qcsrc/common/mutators/mutator/weaponarena_random/_mod.inc [new file with mode: 0644]
qcsrc/common/notifications/_mod.inc [new file with mode: 0644]
qcsrc/common/physics/_mod.inc [new file with mode: 0644]
qcsrc/common/physics/movetypes/_mod.inc [new file with mode: 0644]
qcsrc/common/physics/player.qh
qcsrc/common/sounds/_mod.inc [new file with mode: 0644]
qcsrc/common/triggers/_mod.inc [new file with mode: 0644]
qcsrc/common/triggers/func/_mod.inc [new file with mode: 0644]
qcsrc/common/triggers/misc/_mod.inc [new file with mode: 0644]
qcsrc/common/triggers/target/_mod.inc [new file with mode: 0644]
qcsrc/common/triggers/trigger/_mod.inc [new file with mode: 0644]
qcsrc/common/turrets/_mod.inc [new file with mode: 0644]
qcsrc/common/turrets/all.inc [deleted file]
qcsrc/common/turrets/all.qc
qcsrc/common/turrets/all.qh
qcsrc/common/turrets/turret/_mod.inc [new file with mode: 0644]
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/ewheel_weapon.qc
qcsrc/common/turrets/turret/ewheel_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/flac.qc
qcsrc/common/turrets/turret/flac_weapon.qc
qcsrc/common/turrets/turret/flac_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/hellion.qc
qcsrc/common/turrets/turret/hellion_weapon.qc
qcsrc/common/turrets/turret/hellion_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/hk.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/common/turrets/turret/hk_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/machinegun.qc
qcsrc/common/turrets/turret/machinegun_weapon.qc
qcsrc/common/turrets/turret/machinegun_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/mlrs.qc
qcsrc/common/turrets/turret/mlrs_weapon.qc
qcsrc/common/turrets/turret/mlrs_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/phaser.qc
qcsrc/common/turrets/turret/phaser_weapon.qc
qcsrc/common/turrets/turret/phaser_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/plasma.qc
qcsrc/common/turrets/turret/plasma_dual.qc
qcsrc/common/turrets/turret/plasma_weapon.qc
qcsrc/common/turrets/turret/plasma_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/tesla.qc
qcsrc/common/turrets/turret/tesla_weapon.qc
qcsrc/common/turrets/turret/tesla_weapon.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/turrets/turret/walker_weapon.qc
qcsrc/common/turrets/turret/walker_weapon.qh [new file with mode: 0644]
qcsrc/common/vehicles/_mod.inc [new file with mode: 0644]
qcsrc/common/vehicles/all.inc [deleted file]
qcsrc/common/vehicles/all.qc
qcsrc/common/vehicles/all.qh
qcsrc/common/vehicles/vehicle/_mod.inc [new file with mode: 0644]
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/bumblebee.qh
qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc
qcsrc/common/vehicles/vehicle/bumblebee_weapons.qh [new file with mode: 0644]
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qh [new file with mode: 0644]
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qh [new file with mode: 0644]
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qh [new file with mode: 0644]
qcsrc/common/weapons/_mod.inc [new file with mode: 0644]
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/_mod.inc [new file with mode: 0644]
qcsrc/lib/_mod.inc [new file with mode: 0644]
qcsrc/lib/csqcmodel/_mod.inc [new file with mode: 0644]
qcsrc/lib/oo.qh
qcsrc/lib/warpzone/_mod.inc [new file with mode: 0644]
qcsrc/menu/_mod.inc [new file with mode: 0644]
qcsrc/menu/anim/_mod.inc [new file with mode: 0644]
qcsrc/menu/classes.inc
qcsrc/menu/command/_mod.inc [new file with mode: 0644]
qcsrc/menu/command/all.qc [new file with mode: 0644]
qcsrc/menu/item.qc
qcsrc/menu/item/_mod.inc [new file with mode: 0644]
qcsrc/menu/mutators/_mod.inc [new file with mode: 0644]
qcsrc/menu/progs.inc
qcsrc/menu/xonotic/_mod.inc [new file with mode: 0644]
qcsrc/server/_mod.inc [new file with mode: 0644]
qcsrc/server/bot/_all.inc [deleted file]
qcsrc/server/bot/_mod.inc [new file with mode: 0644]
qcsrc/server/bot/havocbot/_all.inc [deleted file]
qcsrc/server/bot/havocbot/_mod.inc [new file with mode: 0644]
qcsrc/server/command/_mod.inc [new file with mode: 0644]
qcsrc/server/command/all.qc
qcsrc/server/mutators/_mod.inc [new file with mode: 0644]
qcsrc/server/mutators/mutator/_mod.inc [new file with mode: 0644]
qcsrc/server/pathlib/_mod.inc [new file with mode: 0644]
qcsrc/server/progs.inc
qcsrc/server/weapons/_mod.inc [new file with mode: 0644]
qcsrc/tools/genmod.sh [new file with mode: 0755]

diff --git a/qcsrc/client/_mod.inc b/qcsrc/client/_mod.inc
new file mode 100644 (file)
index 0000000..acb6977
--- /dev/null
@@ -0,0 +1,13 @@
+// generated file; do not modify
+#include "announcer.qc"
+#include "bgmscript.qc"
+#include "csqcmodel_hooks.qc"
+#include "main.qc"
+#include "mapvoting.qc"
+#include "miscfunctions.qc"
+#include "player_skeleton.qc"
+#include "scoreboard.qc"
+#include "shownames.qc"
+#include "teamradar.qc"
+#include "view.qc"
+#include "wall.qc"
diff --git a/qcsrc/client/commands/_mod.inc b/qcsrc/client/commands/_mod.inc
new file mode 100644 (file)
index 0000000..d9220c6
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "all.qc"
+#include "cl_cmd.qc"
index 8a40a3b14656d3b726c7434fba651298259ebaea..bc15eeb689560fbaa07b91647cbd6cbe15ff1bdd 100644 (file)
@@ -1,4 +1,2 @@
 #include "all.qh"
 #include <common/command/all.qc>
-
-#include "cl_cmd.qc"
diff --git a/qcsrc/client/hud/_mod.inc b/qcsrc/client/hud/_mod.inc
new file mode 100644 (file)
index 0000000..73066c3
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "hud.qc"
+#include "hud_config.qc"
diff --git a/qcsrc/client/hud/all.qc b/qcsrc/client/hud/all.qc
deleted file mode 100644 (file)
index 1e4b558..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "all.qh"
-#include "hud.qc"
-#include "hud_config.qc"
diff --git a/qcsrc/client/hud/panel/_mod.inc b/qcsrc/client/hud/panel/_mod.inc
new file mode 100644 (file)
index 0000000..2995164
--- /dev/null
@@ -0,0 +1,20 @@
+// generated file; do not modify
+#include "ammo.qc"
+#include "centerprint.qc"
+#include "chat.qc"
+#include "engineinfo.qc"
+#include "healtharmor.qc"
+#include "infomessages.qc"
+#include "minigame.qc"
+#include "modicons.qc"
+#include "notify.qc"
+#include "physics.qc"
+#include "powerups.qc"
+#include "pressedkeys.qc"
+#include "quickmenu.qc"
+#include "racetimer.qc"
+#include "radar.qc"
+#include "score.qc"
+#include "timer.qc"
+#include "vote.qc"
+#include "weapons.qc"
index dd733a8134d7ca41a50cc3307e7021f841a8626f..de4a05f132d185505b08c7e34c2dfcc94e6839f9 100644 (file)
@@ -1,4 +1,878 @@
 #include "quickmenu.qh"
 // QuickMenu (#23)
 
-#include <client/quickmenu.qc>
+#include <common/ent_cs.qh>
+#include <client/hud/all.qh>
+#include <client/mapvoting.qh>
+
+// QUICKMENU_MAXLINES must be <= 10
+const int QUICKMENU_MAXLINES = 10;
+// visible entries are loaded from QuickMenu_Buffer into QuickMenu_Page_* arrays
+string QuickMenu_Page_Command[QUICKMENU_MAXLINES];
+string QuickMenu_Page_Description[QUICKMENU_MAXLINES];
+int QuickMenu_Page_Command_Type[QUICKMENU_MAXLINES];
+int QuickMenu_Page_Entries;
+int QuickMenu_Page;
+int QuickMenu_Page_ActivatedEntry = -1;
+bool QuickMenu_Page_ActivatedEntry_Close;
+float QuickMenu_Page_ActivatedEntry_Time;
+bool QuickMenu_IsLastPage;
+// all the entries are loaded into QuickMenu_Buffer
+// each entry (submenu or command) is composed of 2 entries
+const int QUICKMENU_MAXENTRIES = 256;
+const int QUICKMENU_BUFFER_MAXENTRIES = 2 * QUICKMENU_MAXENTRIES;
+int QuickMenu_Buffer = -1;
+int QuickMenu_Buffer_Size;
+int QuickMenu_Buffer_Index;
+string QuickMenu_CurrentSubMenu;
+float QuickMenu_TimeOut;
+
+// QuickMenu_Buffer are labeled with these tags
+#define QM_TAG_TITLE "T"
+#define QM_TAG_SUBMENU "S"
+#define QM_TAG_COMMAND "C"
+#define QM_TAG_PLCOMMAND "P"
+
+#define QuickMenu_Buffer_Set(tag, string) bufstr_set(QuickMenu_Buffer, QuickMenu_Buffer_Size, strcat(tag, string))
+#define QuickMenu_Buffer_Get() bufstr_get(QuickMenu_Buffer, QuickMenu_Buffer_Index)
+
+// if s1 is not empty s will be displayed as command otherwise as submenu
+void QuickMenu_Page_LoadEntry(int i, string s, string s1)
+{
+    TC(int, i);
+       //printf("^xc80 entry %d: %s, %s\n", i, s, s1);
+       if (QuickMenu_Page_Description[i])
+               strunzone(QuickMenu_Page_Description[i]);
+       QuickMenu_Page_Description[i] = strzone(s);
+       if (QuickMenu_Page_Command[i])
+               strunzone(QuickMenu_Page_Command[i]);
+       QuickMenu_Page_Command[i] = strzone(s1);
+}
+
+void QuickMenu_Page_ClearEntry(int i)
+{
+    TC(int, i);
+       if (QuickMenu_Page_Description[i])
+               strunzone(QuickMenu_Page_Description[i]);
+       QuickMenu_Page_Description[i] = string_null;
+       if (QuickMenu_Page_Command[i])
+               strunzone(QuickMenu_Page_Command[i]);
+       QuickMenu_Page_Command[i] = string_null;
+}
+
+float QuickMenu_Page_Load(string target_submenu, float new_page);
+void QuickMenu_Default(string submenu);
+bool QuickMenu_Open(string mode, string submenu)
+{
+       int fh = -1;
+       string s;
+
+       if(mode == "")
+       {
+               if(autocvar_hud_panel_quickmenu_file == "" || autocvar_hud_panel_quickmenu_file == "0")
+                       mode = "default";
+               else
+                       mode = "file";
+       }
+
+       if(mode == "file")
+       {
+               if(autocvar_hud_panel_quickmenu_file == "" || autocvar_hud_panel_quickmenu_file == "0")
+                       LOG_INFO("No file name is set in hud_panel_quickmenu_file, loading default quickmenu\n");
+               else
+               {
+                       fh = fopen(autocvar_hud_panel_quickmenu_file, FILE_READ);
+                       if(fh < 0)
+                               LOG_INFOF("Couldn't open file \"%s\", loading default quickmenu\n", autocvar_hud_panel_quickmenu_file);
+               }
+               if(fh < 0)
+                       mode = "default";
+       }
+
+       if(mode == "default")
+       {
+               QuickMenu_Buffer = buf_create();
+               if(QuickMenu_Buffer < 0)
+                       return false;
+
+               QuickMenu_Default(submenu);
+       }
+       else if(mode == "file")
+       {
+               QuickMenu_Buffer = buf_create();
+               if(QuickMenu_Buffer < 0)
+               {
+                       fclose(fh);
+                       return false;
+               }
+
+               QuickMenu_Buffer_Size = 0;
+               while((s = fgets(fh)) && QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES)
+               {
+                       // first skip invalid entries, so we don't check them anymore
+                       float argc;
+                       argc = tokenize_console(s);
+                       if(argc == 0 || argv(0) == "")
+                               continue;
+                       if(argc == 1)
+                               QuickMenu_Buffer_Set(QM_TAG_SUBMENU, argv(0));
+                       else if(argc == 2)
+                       {
+                               if(argv(1) == "")
+                                       continue;
+                               QuickMenu_Buffer_Set(QM_TAG_TITLE, argv(0));
+                               ++QuickMenu_Buffer_Size;
+                               QuickMenu_Buffer_Set(QM_TAG_COMMAND, argv(1));
+                       }
+                       else if(argc == 3)
+                       {
+                               // check for special keywords
+                               float teamplayers = 0, without_me = 0;
+                               switch(argv(2))
+                               {
+                                       case "ALLPLAYERS_BUT_ME":               without_me = 1; // fall through
+                                       case "ALLPLAYERS":                              teamplayers = 0; break;
+                                       case "OWNTEAMPLAYERS_BUT_ME":   without_me = 1; // fall through
+                                       case "OWNTEAMPLAYERS":                  teamplayers = 1; break;
+                                       case "ENEMYTEAMPLAYERS":                teamplayers = 2; break;
+                                       default: continue;
+                               }
+
+                               if(QuickMenu_Buffer_Size + 3 < QUICKMENU_BUFFER_MAXENTRIES)
+                               {
+                                       QuickMenu_Buffer_Set(QM_TAG_SUBMENU, argv(0));
+                                       ++QuickMenu_Buffer_Size;
+                                       QuickMenu_Buffer_Set(QM_TAG_TITLE, strcat(ftos(teamplayers), ftos(without_me))); // put PLCOMMAND arguments in the title string
+                                       ++QuickMenu_Buffer_Size;
+                                       QuickMenu_Buffer_Set(QM_TAG_PLCOMMAND, argv(1));
+                                       ++QuickMenu_Buffer_Size;
+                                       QuickMenu_Buffer_Set(QM_TAG_SUBMENU, argv(0));
+                               }
+                       }
+                       ++QuickMenu_Buffer_Size;
+               }
+               fclose(fh);
+       }
+       else
+       {
+               LOG_WARNINGF("Unrecognized mode %s\n", mode);
+               return false;
+       }
+
+       if (QuickMenu_Buffer_Size <= 0)
+       {
+               buf_del(QuickMenu_Buffer);
+               QuickMenu_Buffer = -1;
+               return false;
+       }
+
+       if(mode == "file")
+               QuickMenu_Page_Load(submenu, 0);
+       else
+               QuickMenu_Page_Load("", 0);
+
+       hud_panel_quickmenu = 1;
+       if(autocvar_hud_cursormode)
+               setcursormode(1);
+       hudShiftState = 0;
+
+       QuickMenu_TimeOut = ((autocvar_hud_panel_quickmenu_time > 0) ? time + autocvar_hud_panel_quickmenu_time : 0);
+       return true;
+}
+
+void QuickMenu_Buffer_Close()
+{
+       if (QuickMenu_Buffer >= 0)
+       {
+               buf_del(QuickMenu_Buffer);
+               QuickMenu_Buffer = -1;
+               QuickMenu_Buffer_Size = 0;
+       }
+}
+
+void QuickMenu_Close()
+{
+       if (QuickMenu_CurrentSubMenu)
+               strunzone(QuickMenu_CurrentSubMenu);
+       QuickMenu_CurrentSubMenu = string_null;
+       int i;
+       for (i = 0; i < QUICKMENU_MAXLINES; ++i)
+               QuickMenu_Page_ClearEntry(i);
+       QuickMenu_Page_Entries = 0;
+       hud_panel_quickmenu = 0;
+       mouseClicked = 0;
+       prevMouseClicked = 0;
+       QuickMenu_Buffer_Close();
+
+       if(autocvar_hud_cursormode)
+       if(!mv_active)
+               setcursormode(0);
+}
+
+// It assumes submenu open tag is already detected
+void QuickMenu_skip_submenu(string submenu)
+{
+       string s, z_submenu;
+       z_submenu = strzone(submenu);
+       for(++QuickMenu_Buffer_Index ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
+       {
+               s = QuickMenu_Buffer_Get();
+               if(substring(s, 0, 1) != QM_TAG_SUBMENU)
+                       continue;
+               if(substring(s, 1, -1) == z_submenu) // submenu end
+                       break;
+               QuickMenu_skip_submenu(substring(s, 1, -1));
+       }
+       strunzone(z_submenu);
+}
+
+bool QuickMenu_IsOpened()
+{
+       return (QuickMenu_Page_Entries > 0);
+}
+
+void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me);
+bool HUD_Quickmenu_PlayerListEntries_Create(string cmd, int teamplayers, bool without_me)
+{
+    TC(int, teamplayers); TC(bool, without_me);
+       int i;
+       for(i = 0; i < QUICKMENU_MAXLINES; ++i)
+               QuickMenu_Page_ClearEntry(i);
+       QuickMenu_Buffer_Close();
+
+       QuickMenu_Buffer = buf_create();
+       if(QuickMenu_Buffer < 0)
+               return false;
+
+       HUD_Quickmenu_PlayerListEntries(cmd, teamplayers, without_me);
+
+       if(QuickMenu_Buffer_Size <= 0)
+       {
+               buf_del(QuickMenu_Buffer);
+               QuickMenu_Buffer = -1;
+               return false;
+       }
+       return true;
+}
+
+// new_page 0 means page 0, new_page != 0 means next page
+int QuickMenu_Buffer_Index_Prev;
+bool QuickMenu_Page_Load(string target_submenu, bool new_page)
+{
+    TC(bool, new_page);
+       string s = string_null, cmd = string_null, z_submenu;
+
+       if (new_page == 0)
+               QuickMenu_Page = 0;
+       else
+               ++QuickMenu_Page;
+
+       z_submenu = strzone(target_submenu);
+       if (QuickMenu_CurrentSubMenu)
+               strunzone(QuickMenu_CurrentSubMenu);
+       QuickMenu_CurrentSubMenu = strzone(z_submenu);
+
+       QuickMenu_IsLastPage = true;
+       QuickMenu_Page_Entries = 0;
+
+       QuickMenu_Buffer_Index = 0;
+       if (z_submenu != "")
+       {
+               // skip everything until the submenu open tag is found
+               for( ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
+               {
+                       s = QuickMenu_Buffer_Get();
+                       if(substring(s, 0, 1) == QM_TAG_SUBMENU && substring(s, 1, -1) == z_submenu)
+                       {
+                               // printf("^3 beginning of %s\n", z_submenu);
+                               ++QuickMenu_Buffer_Index;
+                               break; // target_submenu found!
+                       }
+                       // printf("^1 skipping %s\n", s);
+               }
+               if(QuickMenu_Buffer_Index == QuickMenu_Buffer_Size)
+                       LOG_WARNINGF("Couldn't find submenu \"%s\"\n", z_submenu);
+       }
+
+       // only the last page can contain up to QUICKMENU_MAXLINES entries
+       // the other ones contain only (QUICKMENU_MAXLINES - 2) entries
+       // so that the panel can show an empty row and "Continue..."
+       float first_entry = QuickMenu_Page * (QUICKMENU_MAXLINES - 2);
+       int entry_num = 0; // counts entries in target_submenu
+       for( ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
+       {
+               s = QuickMenu_Buffer_Get();
+
+               if(z_submenu != "" && substring(s, 1, -1) == z_submenu)
+               {
+                       // printf("^3 end of %s\n", z_submenu);
+                       break;
+               }
+
+               if(entry_num >= first_entry)
+               {
+                       ++QuickMenu_Page_Entries;
+                       if(QuickMenu_Page_Entries == QUICKMENU_MAXLINES - 2)
+                               QuickMenu_Buffer_Index_Prev = QuickMenu_Buffer_Index;
+                       else if(QuickMenu_Page_Entries == QUICKMENU_MAXLINES)
+                       {
+                               QuickMenu_Page_ClearEntry(QUICKMENU_MAXLINES - 1);
+                               QuickMenu_Buffer_Index = QuickMenu_Buffer_Index_Prev;
+                               QuickMenu_IsLastPage = false;
+                               break;
+                       }
+               }
+
+               // NOTE: entries are loaded starting from 1, not from 0
+               if(substring(s, 0, 1) == QM_TAG_SUBMENU)
+               {
+                       if(entry_num >= first_entry)
+                               QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, substring(s, 1, -1), "");
+                       QuickMenu_skip_submenu(substring(s, 1, -1));
+               }
+               else if(entry_num >= first_entry && substring(s, 0, 1) == QM_TAG_TITLE)
+               {
+                       ++QuickMenu_Buffer_Index;
+                       cmd = QuickMenu_Buffer_Get();
+                       string command_code = substring(cmd, 0, 1);
+                       if(command_code == QM_TAG_COMMAND)
+                               cmd = substring(cmd, 1, -1);
+                       else if(command_code == QM_TAG_PLCOMMAND)
+                       {
+                               // throw away the current quickmenu buffer and load a new one
+                               cmd = substring(cmd, 1, -1);
+                               strunzone(z_submenu);
+                               if(HUD_Quickmenu_PlayerListEntries_Create(cmd, stof(substring(s, 1, 1)), stof(substring(s, 2, 1))))
+                                       return QuickMenu_Page_Load("", 0);
+                               QuickMenu_Close();
+                               return false;
+                       }
+
+                       tokenize_console(cmd);
+                       QuickMenu_Page_Command_Type[QuickMenu_Page_Entries] = (argv(1) && argv(0) == "toggle");
+
+                       QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, substring(s, 1, -1), cmd);
+               }
+
+               ++entry_num;
+       }
+       strunzone(z_submenu);
+       if (QuickMenu_Page_Entries == 0)
+       {
+               QuickMenu_Close();
+               return false;
+       }
+       QuickMenu_TimeOut = ((autocvar_hud_panel_quickmenu_time > 0) ? time + autocvar_hud_panel_quickmenu_time : 0);
+       return true;
+}
+
+bool QuickMenu_ActionForNumber(int num)
+{
+    TC(int, num);
+       if (!QuickMenu_IsLastPage)
+       {
+               if (num < 0 || num >= QUICKMENU_MAXLINES)
+                       return false;
+               if (num == QUICKMENU_MAXLINES - 1)
+                       return false;
+               if (num == 0)
+               {
+                       QuickMenu_Page_Load(QuickMenu_CurrentSubMenu, +1);
+                       return false;
+               }
+       } else if (num <= 0 || num > QuickMenu_Page_Entries)
+               return false;
+
+       if (QuickMenu_Page_Command[num] != "")
+       {
+               localcmd(strcat("\n", QuickMenu_Page_Command[num], "\n"));
+               QuickMenu_TimeOut = ((autocvar_hud_panel_quickmenu_time > 0) ? time + autocvar_hud_panel_quickmenu_time : 0);
+               return true;
+       }
+       if (QuickMenu_Page_Description[num] != "")
+               QuickMenu_Page_Load(QuickMenu_Page_Description[num], 0);
+       return false;
+}
+
+void QuickMenu_Page_ActiveEntry(int entry_num)
+{
+    TC(int, entry_num);
+       QuickMenu_Page_ActivatedEntry = entry_num;
+       QuickMenu_Page_ActivatedEntry_Time = time + 0.1;
+       if(QuickMenu_Page_Command[QuickMenu_Page_ActivatedEntry])
+       {
+               bool f = QuickMenu_ActionForNumber(QuickMenu_Page_ActivatedEntry);
+               // toggle commands don't close the quickmenu
+               if(QuickMenu_Page_Command_Type[QuickMenu_Page_ActivatedEntry] == 1)
+                       QuickMenu_Page_ActivatedEntry_Close = false;
+               else
+                       QuickMenu_Page_ActivatedEntry_Close = (f && !(hudShiftState & S_CTRL));
+       }
+       else
+               QuickMenu_Page_ActivatedEntry_Close = (!(hudShiftState & S_CTRL));
+}
+
+bool QuickMenu_InputEvent(int bInputType, float nPrimary, float nSecondary)
+{
+    TC(int, bInputType);
+       // we only care for keyboard events
+       if(bInputType == 2)
+               return false;
+
+       if(!QuickMenu_IsOpened() || autocvar__hud_configure || mv_active)
+               return false;
+
+       if(bInputType == 3)
+       {
+               mousepos.x = nPrimary;
+               mousepos.y = nSecondary;
+               return true;
+       }
+
+       // allow console bind to work
+       string con_keys;
+       float keys;
+       con_keys = findkeysforcommand("toggleconsole", 0);
+       keys = tokenize(con_keys); // findkeysforcommand returns data for this
+
+       bool hit_con_bind = false;
+       int i;
+       for (i = 0; i < keys; ++i)
+       {
+               if(nPrimary == stof(argv(i)))
+                       hit_con_bind = true;
+       }
+
+       if(bInputType == 0) {
+               if(nPrimary == K_ALT) hudShiftState |= S_ALT;
+               if(nPrimary == K_CTRL) hudShiftState |= S_CTRL;
+               if(nPrimary == K_SHIFT) hudShiftState |= S_SHIFT;
+       }
+       else if(bInputType == 1) {
+               if(nPrimary == K_ALT) hudShiftState -= (hudShiftState & S_ALT);
+               if(nPrimary == K_CTRL) hudShiftState -= (hudShiftState & S_CTRL);
+               if(nPrimary == K_SHIFT) hudShiftState -= (hudShiftState & S_SHIFT);
+       }
+
+       if(nPrimary == K_ESCAPE)
+       {
+               if (bInputType == 1)
+                       return true;
+               QuickMenu_Close();
+       }
+       else if(nPrimary >= '0' && nPrimary <= '9')
+       {
+               if (bInputType == 1)
+                       return true;
+               QuickMenu_Page_ActiveEntry(stof(chr2str(nPrimary)));
+       }
+       if(nPrimary == K_MOUSE1)
+       {
+               if(bInputType == 0) // key pressed
+                       mouseClicked |= S_MOUSE1;
+               else if(bInputType == 1) // key released
+                       mouseClicked -= (mouseClicked & S_MOUSE1);
+       }
+       else if(nPrimary == K_MOUSE2)
+       {
+               if(bInputType == 0) // key pressed
+                       mouseClicked |= S_MOUSE2;
+               else if(bInputType == 1) // key released
+                       mouseClicked -= (mouseClicked & S_MOUSE2);
+       }
+       else if(hit_con_bind)
+               return false;
+
+       return true;
+}
+
+void QuickMenu_Mouse()
+{
+       if(mv_active) return;
+
+       if(!mouseClicked)
+       if(prevMouseClicked & S_MOUSE2)
+       {
+               QuickMenu_Close();
+               return;
+       }
+
+       if(!autocvar_hud_cursormode)
+       {
+               mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
+
+               mousepos.x = bound(0, mousepos.x, vid_conwidth);
+               mousepos.y = bound(0, mousepos.y, vid_conheight);
+       }
+
+       HUD_Panel_UpdateCvars();
+
+       if(panel_bg_padding)
+       {
+               panel_pos += '1 1 0' * panel_bg_padding;
+               panel_size -= '2 2 0' * panel_bg_padding;
+       }
+
+       float first_entry_pos, entries_height;
+       vector fontsize;
+       fontsize = '1 1 0' * (panel_size.y / QUICKMENU_MAXLINES);
+       first_entry_pos = panel_pos.y + ((QUICKMENU_MAXLINES - QuickMenu_Page_Entries) * fontsize.y) / 2;
+       entries_height = panel_size.y - ((QUICKMENU_MAXLINES - QuickMenu_Page_Entries) * fontsize.y);
+
+       if (mousepos.x >= panel_pos.x && mousepos.y >= first_entry_pos && mousepos.x <= panel_pos.x + panel_size.x && mousepos.y <= first_entry_pos + entries_height)
+       {
+               float entry_num;
+               entry_num = floor((mousepos.y - first_entry_pos) / fontsize.y);
+               if (QuickMenu_IsLastPage || entry_num != QUICKMENU_MAXLINES - 2)
+               {
+                       panel_pos.y = first_entry_pos + entry_num * fontsize.y;
+                       vector color;
+                       if(mouseClicked & S_MOUSE1)
+                               color = '0.5 1 0.5';
+                       else if(hudShiftState & S_CTRL)
+                               color = '1 1 0.3';
+                       else
+                               color = '1 1 1';
+                       drawfill(panel_pos, eX * panel_size.x + eY * fontsize.y, color, .2, DRAWFLAG_NORMAL);
+
+                       if(!mouseClicked && (prevMouseClicked & S_MOUSE1))
+                               QuickMenu_Page_ActiveEntry((entry_num < QUICKMENU_MAXLINES - 1) ? entry_num + 1 : 0);
+               }
+       }
+
+       draw_cursor_normal(mousepos, '1 1 1', 0.8);
+
+       prevMouseClicked = mouseClicked;
+}
+
+void HUD_Quickmenu_DrawEntry(vector pos, string desc, string option, vector fontsize)
+{
+       string entry;
+       float offset;
+       float desc_width = panel_size.x;
+       if(option)
+       {
+               string pic = strcat(hud_skin_path, "/", option);
+               if(precache_pic(pic) == "")
+                       pic = strcat("gfx/hud/default/", option);
+               vector option_size = '1 1 0' * fontsize.y * 0.8;
+               desc_width -= option_size.x;
+               drawpic(pos + eX * desc_width + eY * (fontsize.y - option_size.y) / 2, pic, option_size, '1 1 1', panel_fg_alpha, DRAWFLAG_ADDITIVE);
+               desc_width -= fontsize.x / 4;
+       }
+       entry = textShortenToWidth(desc, desc_width, fontsize, stringwidth_colors);
+       if (autocvar_hud_panel_quickmenu_align > 0)
+       {
+               float real_desc_width = stringwidth_colors(entry, fontsize);
+               offset = (desc_width - real_desc_width) * min(autocvar_hud_panel_quickmenu_align, 1);
+
+               if(option)
+               {
+                       // when there's enough room align description regardless the checkbox
+                       float extra_offset = (panel_size.x - desc_width) * min(autocvar_hud_panel_quickmenu_align, 1);
+                       if(offset + real_desc_width + extra_offset < desc_width)
+                               offset += extra_offset;
+                       else
+                               offset = max(0, desc_width - real_desc_width);
+               }
+               drawcolorcodedstring(pos + eX * offset, entry, fontsize, panel_fg_alpha, DRAWFLAG_ADDITIVE);
+       }
+       else
+               drawcolorcodedstring(pos, entry, fontsize, panel_fg_alpha, DRAWFLAG_ADDITIVE);
+}
+
+void HUD_QuickMenu()
+{
+       if(!autocvar__hud_configure)
+       {
+               if (hud_configure_prev && hud_configure_prev != -1)
+                       QuickMenu_Close();
+
+               if(!hud_draw_maximized) return;
+               if(mv_active) return;
+               //if(!autocvar_hud_panel_quickmenu) return;
+               if(!hud_panel_quickmenu) return;
+
+               if(QuickMenu_TimeOut)
+               if(time > QuickMenu_TimeOut)
+               {
+                       QuickMenu_Close();
+                       return;
+               }
+       }
+       else
+       {
+               if(!QuickMenu_IsOpened())
+               {
+                       QuickMenu_Page_Entries = 1;
+                       QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, sprintf(_("Submenu%d"), QuickMenu_Page_Entries), "");
+                       ++QuickMenu_Page_Entries;
+                       QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, sprintf(_("Submenu%d"), QuickMenu_Page_Entries), "");
+                       ++QuickMenu_Page_Entries;
+                       // although real command doesn't matter here, it must not be empty
+                       // otherwise the entry is displayed like a submenu
+                       for (; QuickMenu_Page_Entries < QUICKMENU_MAXLINES - 1; ++QuickMenu_Page_Entries)
+                               QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, sprintf(_("Command%d"), QuickMenu_Page_Entries), "-");
+                       ++QuickMenu_Page_Entries;
+                       QuickMenu_Page_ClearEntry(QuickMenu_Page_Entries);
+                       QuickMenu_IsLastPage = false;
+               }
+       }
+
+       HUD_Panel_UpdateCvars();
+
+       HUD_Panel_DrawBg(1);
+
+       if(panel_bg_padding)
+       {
+               panel_pos += '1 1 0' * panel_bg_padding;
+               panel_size -= '2 2 0' * panel_bg_padding;
+       }
+
+       int i;
+       vector fontsize;
+       string color;
+       fontsize = '1 1 0' * (panel_size.y / QUICKMENU_MAXLINES);
+
+       if (!QuickMenu_IsLastPage)
+       {
+               color = "^5";
+               HUD_Quickmenu_DrawEntry(panel_pos + eY * (panel_size.y - fontsize.y), sprintf("%d: %s%s", 0, color, _("Continue...")), string_null, fontsize);
+       }
+       else
+               panel_pos.y += ((QUICKMENU_MAXLINES - QuickMenu_Page_Entries) * fontsize.y) / 2;
+
+       for (i = 1; i <= QuickMenu_Page_Entries; ++i) {
+               if (QuickMenu_Page_Description[i] == "")
+                       break;
+               string option = string_null;
+               if (QuickMenu_Page_Command[i] == "")
+                       color = "^4";
+               else
+               {
+                       color = "^3";
+                       if(QuickMenu_Page_Command_Type[i] == 1) // toggle command
+                       {
+                               int end = strstrofs(QuickMenu_Page_Command[i], ";", 0);
+                               if(end < 0)
+                                       tokenize_console(QuickMenu_Page_Command[i]);
+                               else
+                                       tokenize_console(substring(QuickMenu_Page_Command[i], 0, end));
+
+                               //if(argv(1) && argv(0) == "toggle") // already checked
+                               {
+                                       // "enable feature xxx" "toggle xxx" (or "toggle xxx 1 0")
+                                       // "disable feature xxx" "toggle xxx 0 1"
+                                       float ON_value = 1, OFF_value = 0;
+                                       if(argv(2))
+                                               ON_value = stof(argv(2));
+
+                                       if(argv(3))
+                                               OFF_value = stof(argv(3));
+                                       else
+                                               OFF_value = !ON_value;
+
+                                       float value = cvar(argv(1));
+                                       if(value == ON_value)
+                                               option = "checkbox_checked";
+                                       else if(value == OFF_value)
+                                               option = "checkbox_empty";
+                                       else
+                                               option = "checkbox_undefined";
+                               }
+                       }
+               }
+               HUD_Quickmenu_DrawEntry(panel_pos, sprintf("%d: %s%s", i, color, QuickMenu_Page_Description[i]), option, fontsize);
+
+               if(QuickMenu_Page_ActivatedEntry_Time && time < QuickMenu_Page_ActivatedEntry_Time
+                       && QuickMenu_Page_ActivatedEntry == i)
+                       drawfill(panel_pos, eX * panel_size.x + eY * fontsize.y, '0.5 1 0.5', .2, DRAWFLAG_NORMAL);
+
+               panel_pos.y += fontsize.y;
+       }
+
+       if(QuickMenu_Page_ActivatedEntry >= 0 && time >= QuickMenu_Page_ActivatedEntry_Time)
+       {
+               if(!QuickMenu_Page_Command[QuickMenu_Page_ActivatedEntry])
+               {
+                       bool f = QuickMenu_ActionForNumber(QuickMenu_Page_ActivatedEntry);
+                       if(f && QuickMenu_Page_ActivatedEntry_Close)
+                               QuickMenu_Close();
+               }
+               else if(QuickMenu_Page_ActivatedEntry_Close)
+                       QuickMenu_Close();
+               QuickMenu_Page_ActivatedEntry = -1;
+               QuickMenu_Page_ActivatedEntry_Time = 0;
+       }
+}
+
+
+#define QUICKMENU_SMENU(submenu,eng_submenu) { \
+       if(target_submenu == eng_submenu && target_submenu_found) \
+               return; /* target_submenu entries are now loaded, exit */ \
+       if(QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES) \
+               QuickMenu_Buffer_Set(QM_TAG_SUBMENU, submenu); \
+       ++QuickMenu_Buffer_Size; \
+       if(target_submenu == eng_submenu && !target_submenu_found) { \
+               QuickMenu_Buffer_Size = 0; /* enable load of next entries */ \
+               target_submenu_found = true; \
+       } \
+}
+
+#define QUICKMENU_ENTRY(title,command) { \
+       if(QuickMenu_Buffer_Size + 1 < QUICKMENU_BUFFER_MAXENTRIES) \
+       { \
+               QuickMenu_Buffer_Set(QM_TAG_TITLE, title); \
+               ++QuickMenu_Buffer_Size; \
+               QuickMenu_Buffer_Set(QM_TAG_COMMAND, command); \
+       } \
+       ++QuickMenu_Buffer_Size; \
+}
+
+#define QUICKMENU_SMENU_PL(submenu,eng_submenu,command,teamplayers,without_me) { \
+       if(QuickMenu_Buffer_Size + 3 < QUICKMENU_BUFFER_MAXENTRIES) {\
+               QUICKMENU_SMENU(submenu,eng_submenu) \
+               QuickMenu_Buffer_Set(QM_TAG_TITLE, strcat(ftos(teamplayers), ftos(without_me))); \
+               ++QuickMenu_Buffer_Size; \
+               QuickMenu_Buffer_Set(QM_TAG_PLCOMMAND, command); \
+               ++QuickMenu_Buffer_Size; \
+               QUICKMENU_SMENU(submenu,eng_submenu) \
+       } \
+}
+
+
+
+// useful to Translate a string inside the Command
+#define QUICKMENU_ENTRY_TC(title,command,text,translated_text) {\
+       if(prvm_language == "en") \
+               QUICKMENU_ENTRY(title, sprintf(command, text)) \
+       else if(!autocvar_hud_panel_quickmenu_translatecommands || translated_text == text) \
+               QUICKMENU_ENTRY(strcat("(en)", title), sprintf(command, text)) \
+       else \
+               QUICKMENU_ENTRY(strcat("(", prvm_language, ")", title), sprintf(command, translated_text)) \
+}
+
+void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me)
+{
+    TC(int, teamplayers); TC(bool, without_me);
+       entity pl;
+       if(teamplayers && !team_count)
+               return;
+
+       for(pl = players.sort_next; pl; pl = pl.sort_next)
+       {
+               if(teamplayers == 1 && (pl.team != myteam || pl.team == NUM_SPECTATOR)) // only own team players
+                       continue;
+               if(teamplayers == 2 && (pl.team == myteam || pl.team == NUM_SPECTATOR)) // only enemy team players
+                       continue;
+               if(without_me && pl.sv_entnum == player_localnum)
+                       continue;
+               QUICKMENU_ENTRY(entcs_GetName(pl.sv_entnum), sprintf(cmd, entcs_GetName(pl.sv_entnum)))
+       }
+
+       return;
+}
+
+
+// Specifying target_submenu, this function only loads entries inside target_submenu
+// NOTE: alternatively we could have loaded the whole default quickmenu and
+// then called QuickMenu_Page_Load(target_submenu, 0);
+// but this sytem is more reliable since we can always refer to target_submenu
+// with the English title even if a translation is active
+void QuickMenu_Default(string target_submenu)
+{
+       bool target_submenu_found = false;
+       if(target_submenu != "")
+               QuickMenu_Buffer_Size = QUICKMENU_BUFFER_MAXENTRIES; // forbids load of next entries until target_submenu
+
+       QUICKMENU_SMENU(CTX(_("QMCMD^Chat")), "Chat")
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^nice one")), "say %s", ":-) / nice one", CTX(_("QMCMD^:-) / nice one")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^good game")), "say %s", "good game", CTX(_("QMCMD^good game")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^hi / good luck")), "say %s", "hi / good luck and have fun", CTX(_("QMCMD^hi / good luck and have fun")))
+       QUICKMENU_SMENU(CTX(_("QMCMD^Chat")), "Chat")
+
+       if(teamplay)
+       {
+       QUICKMENU_SMENU(CTX(_("QMCMD^Team chat")), "Team chat")
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^quad soon")), "say_team %s", "quad soon", CTX(_("QMCMD^quad soon")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^free item, icon")), "say_team %s; g_waypointsprite_team_here_p", "free item %x^7 (l:%y^7)", CTX(_("QMCMD^free item %x^7 (l:%y^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^took item, icon")), "say_team %s; g_waypointsprite_team_here", "took item (l:%l^7)", CTX(_("QMCMD^took item (l:%l^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^negative")), "say_team %s", "negative", CTX(_("QMCMD^negative")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^positive")), "say_team %s", "positive", CTX(_("QMCMD^positive")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^need help, icon")), "say_team %s; g_waypointsprite_team_helpme; cmd voice needhelp", "need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)", CTX(_("QMCMD^need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^enemy seen, icon")), "say_team %s; g_waypointsprite_team_danger_p; cmd voice incoming", "enemy seen (l:%y^7)", CTX(_("QMCMD^enemy seen (l:%y^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^flag seen, icon")), "say_team %s; g_waypointsprite_team_here_p; cmd voice seenflag", "flag seen (l:%y^7)", CTX(_("QMCMD^flag seen (l:%y^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^defending, icon")), "say_team %s; g_waypointsprite_team_here", "defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)", CTX(_("QMCMD^defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^roaming, icon")), "say_team %s; g_waypointsprite_team_here", "roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)", CTX(_("QMCMD^roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^attacking, icon")), "say_team %s; g_waypointsprite_team_here", "attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)", CTX(_("QMCMD^attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^killed flag, icon")), "say_team %s; g_waypointsprite_team_here_p", "killed flagcarrier (l:%y^7)", CTX(_("QMCMD^killed flagcarrier (l:%y^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^dropped flag, icon")), "say_team %s; g_waypointsprite_team_here_d", "dropped flag (l:%d^7)", CTX(_("QMCMD^dropped flag (l:%d^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^drop gun, icon")), "say_team %s; g_waypointsprite_team_here; wait; dropweapon", "dropped gun %w^7 (l:%l^7)", CTX(_("QMCMD^dropped gun %w^7 (l:%l^7)")))
+               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^drop flag/key, icon")), "say_team %s; g_waypointsprite_team_here; wait; use", "dropped flag/key %w^7 (l:%l^7)", CTX(_("QMCMD^dropped flag/key %w^7 (l:%l^7)")))
+       QUICKMENU_SMENU(CTX(_("QMCMD^Team chat")), "Team chat")
+       }
+
+       QUICKMENU_SMENU_PL(CTX(_("QMCMD^Send private message to")), "Send private message to", "commandmode tell \"%s^7\"", 0, 1)
+
+       QUICKMENU_SMENU(CTX(_("QMCMD^Settings")), "Settings")
+               QUICKMENU_SMENU(CTX(_("QMCMD^View/HUD settings")), "View/HUD settings")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^3rd person view")), "toggle chase_active")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Player models like mine")), "toggle cl_forceplayermodels")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Names above players")), "toggle hud_shownames")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Crosshair per weapon")), "toggle crosshair_per_weapon")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^FPS")), "toggle hud_panel_engineinfo")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Net graph")), "toggle shownetgraph")
+               QUICKMENU_SMENU(CTX(_("QMCMD^View/HUD settings")), "View/HUD settings")
+
+               QUICKMENU_SMENU(CTX(_("QMCMD^Sound settings")), "Sound settings")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Hit sound")), "toggle cl_hitsound")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Chat sound")), "toggle con_chatsound")
+               QUICKMENU_SMENU(CTX(_("QMCMD^Sound settings")), "Sound settings")
+
+               if(spectatee_status > 0)
+               {
+               QUICKMENU_SMENU(CTX(_("QMCMD^Spectator camera")), "Spectator camera")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^1st person")), "chase_active 0; -use")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^3rd person around player")), "chase_active 1; +use")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^3rd person behind")), "chase_active 1; -use")
+               QUICKMENU_SMENU(CTX(_("QMCMD^Spectator camera")), "Spectator camera")
+               }
+
+               if(spectatee_status == -1)
+               {
+               QUICKMENU_SMENU(CTX(_("QMCMD^Observer camera")), "Observer camera")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Increase speed")), "weapnext")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Decrease speed")), "weapprev")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Wall collision off")), "+use")
+                       QUICKMENU_ENTRY(CTX(_("QMCMD^Wall collision on")), "-use")
+               QUICKMENU_SMENU(CTX(_("QMCMD^Observer camera")), "Observer camera")
+               }
+
+               QUICKMENU_ENTRY(CTX(_("QMCMD^Fullscreen")), "toggle vid_fullscreen; vid_restart")
+               if(prvm_language != "en")
+               QUICKMENU_ENTRY(CTX(_("QMCMD^Translate chat messages")), "toggle hud_panel_quickmenu_translatecommands")
+       QUICKMENU_SMENU(CTX(_("QMCMD^Settings")), "Settings")
+
+       QUICKMENU_SMENU(CTX(_("QMCMD^Call a vote")), "Call a vote")
+               QUICKMENU_ENTRY(CTX(_("QMCMD^Restart the map")), "vcall restart")
+               QUICKMENU_ENTRY(CTX(_("QMCMD^End match")), "vcall endmatch")
+               if(STAT(TIMELIMIT) > 0)
+               {
+               QUICKMENU_ENTRY(CTX(_("QMCMD^Reduce match time")), "vcall reducematchtime")
+               QUICKMENU_ENTRY(CTX(_("QMCMD^Extend match time")), "vcall extendmatchtime")
+               }
+               if(teamplay)
+               QUICKMENU_ENTRY(CTX(_("QMCMD^Shuffle teams")), "vcall shuffleteams")
+       QUICKMENU_SMENU(CTX(_("QMCMD^Call a vote")), "Call a vote")
+
+       if(target_submenu != "" && !target_submenu_found)
+       {
+               LOG_WARNINGF("Couldn't find submenu \"%s\"\n", target_submenu);
+               if(prvm_language != "en")
+                       LOG_WARNINGF("^3Warning: submenu must be in English\n", target_submenu);
+               QuickMenu_Buffer_Size = 0;
+       }
+}
+#undef QUICKMENU_SMENU
+#undef QUICKMENU_ENTRY
+#undef QUICKMENU_ENTRY_TC
index 6db88c68b39ee50fce1f8acce9c778465a3223ae..aad86e6bd689ed786280f6c1b8210e96b69ec6a3 100644 (file)
@@ -1,2 +1,6 @@
 #pragma once
 #include "../panel.qh"
+
+bool QuickMenu_InputEvent(float bInputType, float nPrimary, float nSecondary);
+bool QuickMenu_IsOpened();
+void QuickMenu_Mouse();
index 8b6e585288ec54530db29d28101617b4e1483b72..98b266c6d18410a39a466a66b77b452ee10a9ef5 100644 (file)
@@ -4,7 +4,7 @@
 #include "hud/all.qh"
 #include "mapvoting.qh"
 #include "mutators/events.qh"
-#include "quickmenu.qh"
+#include "hud/panel/quickmenu.qh"
 #include "scoreboard.qh"
 #include "shownames.qh"
 #include <common/t_items.qh>
diff --git a/qcsrc/client/mutators/_mod.inc b/qcsrc/client/mutators/_mod.inc
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
index ca0078cdb8c50fdc75d7b3ed196944f516819cac..8817a2c71bfa14506774e73886ad3a00a93b5e43 100644 (file)
@@ -1,37 +1,24 @@
-#include "../lib/_all.inc"
+#include <lib/_all.inc>
 #include "_all.qh"
 
-#include "../common/effects/qc/all.qc"
+#include "_mod.inc"
+#include "commands/_mod.inc"
+#include "hud/_mod.inc"
+#include "mutators/_mod.inc"
+#include "weapons/_mod.inc"
 
-#include "announcer.qc"
-#include "bgmscript.qc"
-#include "csqcmodel_hooks.qc"
-#include "hud/all.qc"
-#include "main.qc"
-#include "mapvoting.qc"
-#include "miscfunctions.qc"
-#include "player_skeleton.qc"
-#include "scoreboard.qc"
-#include "shownames.qc"
-#include "teamradar.qc"
-#include "view.qc"
-#include "wall.qc"
+#include <common/_all.inc>
+#include <common/effects/qc/all.qc>
 
-#include "commands/all.qc"
+#include <lib/csqcmodel/cl_model.qc>
+#include <lib/csqcmodel/cl_player.qc>
+#include <lib/csqcmodel/interpolate.qc>
 
-#include "weapons/projectile.qc" // TODO
-
-#include "../common/_all.inc"
-
-#include "../lib/csqcmodel/cl_model.qc"
-#include "../lib/csqcmodel/cl_player.qc"
-#include "../lib/csqcmodel/interpolate.qc"
-
-#include "../lib/warpzone/anglestransform.qc"
-#include "../lib/warpzone/client.qc"
-#include "../lib/warpzone/common.qc"
-#include "../lib/warpzone/server.qc"
-#include "../lib/warpzone/util_server.qc"
+#include <lib/warpzone/anglestransform.qc>
+#include <lib/warpzone/common.qc>
+#include <lib/warpzone/client.qc>
+#include <lib/warpzone/server.qc>
+#include <lib/warpzone/util_server.qc>
 
 #if BUILD_MOD
 #include "../../mod/client/progs.inc"
diff --git a/qcsrc/client/quickmenu.qc b/qcsrc/client/quickmenu.qc
deleted file mode 100644 (file)
index 6d281aa..0000000
+++ /dev/null
@@ -1,877 +0,0 @@
-#include "quickmenu.qh"
-
-#include <common/ent_cs.qh>
-#include "hud/all.qh"
-#include "mapvoting.qh"
-
-// QUICKMENU_MAXLINES must be <= 10
-const int QUICKMENU_MAXLINES = 10;
-// visible entries are loaded from QuickMenu_Buffer into QuickMenu_Page_* arrays
-string QuickMenu_Page_Command[QUICKMENU_MAXLINES];
-string QuickMenu_Page_Description[QUICKMENU_MAXLINES];
-int QuickMenu_Page_Command_Type[QUICKMENU_MAXLINES];
-int QuickMenu_Page_Entries;
-int QuickMenu_Page;
-int QuickMenu_Page_ActivatedEntry = -1;
-bool QuickMenu_Page_ActivatedEntry_Close;
-float QuickMenu_Page_ActivatedEntry_Time;
-bool QuickMenu_IsLastPage;
-// all the entries are loaded into QuickMenu_Buffer
-// each entry (submenu or command) is composed of 2 entries
-const int QUICKMENU_MAXENTRIES = 256;
-const int QUICKMENU_BUFFER_MAXENTRIES = 2 * QUICKMENU_MAXENTRIES;
-int QuickMenu_Buffer = -1;
-int QuickMenu_Buffer_Size;
-int QuickMenu_Buffer_Index;
-string QuickMenu_CurrentSubMenu;
-float QuickMenu_TimeOut;
-
-// QuickMenu_Buffer are labeled with these tags
-#define QM_TAG_TITLE "T"
-#define QM_TAG_SUBMENU "S"
-#define QM_TAG_COMMAND "C"
-#define QM_TAG_PLCOMMAND "P"
-
-#define QuickMenu_Buffer_Set(tag, string) bufstr_set(QuickMenu_Buffer, QuickMenu_Buffer_Size, strcat(tag, string))
-#define QuickMenu_Buffer_Get() bufstr_get(QuickMenu_Buffer, QuickMenu_Buffer_Index)
-
-// if s1 is not empty s will be displayed as command otherwise as submenu
-void QuickMenu_Page_LoadEntry(int i, string s, string s1)
-{
-    TC(int, i);
-       //printf("^xc80 entry %d: %s, %s\n", i, s, s1);
-       if (QuickMenu_Page_Description[i])
-               strunzone(QuickMenu_Page_Description[i]);
-       QuickMenu_Page_Description[i] = strzone(s);
-       if (QuickMenu_Page_Command[i])
-               strunzone(QuickMenu_Page_Command[i]);
-       QuickMenu_Page_Command[i] = strzone(s1);
-}
-
-void QuickMenu_Page_ClearEntry(int i)
-{
-    TC(int, i);
-       if (QuickMenu_Page_Description[i])
-               strunzone(QuickMenu_Page_Description[i]);
-       QuickMenu_Page_Description[i] = string_null;
-       if (QuickMenu_Page_Command[i])
-               strunzone(QuickMenu_Page_Command[i]);
-       QuickMenu_Page_Command[i] = string_null;
-}
-
-float QuickMenu_Page_Load(string target_submenu, float new_page);
-void QuickMenu_Default(string submenu);
-bool QuickMenu_Open(string mode, string submenu)
-{
-       int fh = -1;
-       string s;
-
-       if(mode == "")
-       {
-               if(autocvar_hud_panel_quickmenu_file == "" || autocvar_hud_panel_quickmenu_file == "0")
-                       mode = "default";
-               else
-                       mode = "file";
-       }
-
-       if(mode == "file")
-       {
-               if(autocvar_hud_panel_quickmenu_file == "" || autocvar_hud_panel_quickmenu_file == "0")
-                       LOG_INFO("No file name is set in hud_panel_quickmenu_file, loading default quickmenu\n");
-               else
-               {
-                       fh = fopen(autocvar_hud_panel_quickmenu_file, FILE_READ);
-                       if(fh < 0)
-                               LOG_INFOF("Couldn't open file \"%s\", loading default quickmenu\n", autocvar_hud_panel_quickmenu_file);
-               }
-               if(fh < 0)
-                       mode = "default";
-       }
-
-       if(mode == "default")
-       {
-               QuickMenu_Buffer = buf_create();
-               if(QuickMenu_Buffer < 0)
-                       return false;
-
-               QuickMenu_Default(submenu);
-       }
-       else if(mode == "file")
-       {
-               QuickMenu_Buffer = buf_create();
-               if(QuickMenu_Buffer < 0)
-               {
-                       fclose(fh);
-                       return false;
-               }
-
-               QuickMenu_Buffer_Size = 0;
-               while((s = fgets(fh)) && QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES)
-               {
-                       // first skip invalid entries, so we don't check them anymore
-                       float argc;
-                       argc = tokenize_console(s);
-                       if(argc == 0 || argv(0) == "")
-                               continue;
-                       if(argc == 1)
-                               QuickMenu_Buffer_Set(QM_TAG_SUBMENU, argv(0));
-                       else if(argc == 2)
-                       {
-                               if(argv(1) == "")
-                                       continue;
-                               QuickMenu_Buffer_Set(QM_TAG_TITLE, argv(0));
-                               ++QuickMenu_Buffer_Size;
-                               QuickMenu_Buffer_Set(QM_TAG_COMMAND, argv(1));
-                       }
-                       else if(argc == 3)
-                       {
-                               // check for special keywords
-                               float teamplayers = 0, without_me = 0;
-                               switch(argv(2))
-                               {
-                                       case "ALLPLAYERS_BUT_ME":               without_me = 1; // fall through
-                                       case "ALLPLAYERS":                              teamplayers = 0; break;
-                                       case "OWNTEAMPLAYERS_BUT_ME":   without_me = 1; // fall through
-                                       case "OWNTEAMPLAYERS":                  teamplayers = 1; break;
-                                       case "ENEMYTEAMPLAYERS":                teamplayers = 2; break;
-                                       default: continue;
-                               }
-
-                               if(QuickMenu_Buffer_Size + 3 < QUICKMENU_BUFFER_MAXENTRIES)
-                               {
-                                       QuickMenu_Buffer_Set(QM_TAG_SUBMENU, argv(0));
-                                       ++QuickMenu_Buffer_Size;
-                                       QuickMenu_Buffer_Set(QM_TAG_TITLE, strcat(ftos(teamplayers), ftos(without_me))); // put PLCOMMAND arguments in the title string
-                                       ++QuickMenu_Buffer_Size;
-                                       QuickMenu_Buffer_Set(QM_TAG_PLCOMMAND, argv(1));
-                                       ++QuickMenu_Buffer_Size;
-                                       QuickMenu_Buffer_Set(QM_TAG_SUBMENU, argv(0));
-                               }
-                       }
-                       ++QuickMenu_Buffer_Size;
-               }
-               fclose(fh);
-       }
-       else
-       {
-               LOG_WARNINGF("Unrecognized mode %s\n", mode);
-               return false;
-       }
-
-       if (QuickMenu_Buffer_Size <= 0)
-       {
-               buf_del(QuickMenu_Buffer);
-               QuickMenu_Buffer = -1;
-               return false;
-       }
-
-       if(mode == "file")
-               QuickMenu_Page_Load(submenu, 0);
-       else
-               QuickMenu_Page_Load("", 0);
-
-       hud_panel_quickmenu = 1;
-       if(autocvar_hud_cursormode)
-               setcursormode(1);
-       hudShiftState = 0;
-
-       QuickMenu_TimeOut = ((autocvar_hud_panel_quickmenu_time > 0) ? time + autocvar_hud_panel_quickmenu_time : 0);
-       return true;
-}
-
-void QuickMenu_Buffer_Close()
-{
-       if (QuickMenu_Buffer >= 0)
-       {
-               buf_del(QuickMenu_Buffer);
-               QuickMenu_Buffer = -1;
-               QuickMenu_Buffer_Size = 0;
-       }
-}
-
-void QuickMenu_Close()
-{
-       if (QuickMenu_CurrentSubMenu)
-               strunzone(QuickMenu_CurrentSubMenu);
-       QuickMenu_CurrentSubMenu = string_null;
-       int i;
-       for (i = 0; i < QUICKMENU_MAXLINES; ++i)
-               QuickMenu_Page_ClearEntry(i);
-       QuickMenu_Page_Entries = 0;
-       hud_panel_quickmenu = 0;
-       mouseClicked = 0;
-       prevMouseClicked = 0;
-       QuickMenu_Buffer_Close();
-
-       if(autocvar_hud_cursormode)
-       if(!mv_active)
-               setcursormode(0);
-}
-
-// It assumes submenu open tag is already detected
-void QuickMenu_skip_submenu(string submenu)
-{
-       string s, z_submenu;
-       z_submenu = strzone(submenu);
-       for(++QuickMenu_Buffer_Index ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
-       {
-               s = QuickMenu_Buffer_Get();
-               if(substring(s, 0, 1) != QM_TAG_SUBMENU)
-                       continue;
-               if(substring(s, 1, -1) == z_submenu) // submenu end
-                       break;
-               QuickMenu_skip_submenu(substring(s, 1, -1));
-       }
-       strunzone(z_submenu);
-}
-
-bool QuickMenu_IsOpened()
-{
-       return (QuickMenu_Page_Entries > 0);
-}
-
-void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me);
-bool HUD_Quickmenu_PlayerListEntries_Create(string cmd, int teamplayers, bool without_me)
-{
-    TC(int, teamplayers); TC(bool, without_me);
-       int i;
-       for(i = 0; i < QUICKMENU_MAXLINES; ++i)
-               QuickMenu_Page_ClearEntry(i);
-       QuickMenu_Buffer_Close();
-
-       QuickMenu_Buffer = buf_create();
-       if(QuickMenu_Buffer < 0)
-               return false;
-
-       HUD_Quickmenu_PlayerListEntries(cmd, teamplayers, without_me);
-
-       if(QuickMenu_Buffer_Size <= 0)
-       {
-               buf_del(QuickMenu_Buffer);
-               QuickMenu_Buffer = -1;
-               return false;
-       }
-       return true;
-}
-
-// new_page 0 means page 0, new_page != 0 means next page
-int QuickMenu_Buffer_Index_Prev;
-bool QuickMenu_Page_Load(string target_submenu, bool new_page)
-{
-    TC(bool, new_page);
-       string s = string_null, cmd = string_null, z_submenu;
-
-       if (new_page == 0)
-               QuickMenu_Page = 0;
-       else
-               ++QuickMenu_Page;
-
-       z_submenu = strzone(target_submenu);
-       if (QuickMenu_CurrentSubMenu)
-               strunzone(QuickMenu_CurrentSubMenu);
-       QuickMenu_CurrentSubMenu = strzone(z_submenu);
-
-       QuickMenu_IsLastPage = true;
-       QuickMenu_Page_Entries = 0;
-
-       QuickMenu_Buffer_Index = 0;
-       if (z_submenu != "")
-       {
-               // skip everything until the submenu open tag is found
-               for( ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
-               {
-                       s = QuickMenu_Buffer_Get();
-                       if(substring(s, 0, 1) == QM_TAG_SUBMENU && substring(s, 1, -1) == z_submenu)
-                       {
-                               // printf("^3 beginning of %s\n", z_submenu);
-                               ++QuickMenu_Buffer_Index;
-                               break; // target_submenu found!
-                       }
-                       // printf("^1 skipping %s\n", s);
-               }
-               if(QuickMenu_Buffer_Index == QuickMenu_Buffer_Size)
-                       LOG_WARNINGF("Couldn't find submenu \"%s\"\n", z_submenu);
-       }
-
-       // only the last page can contain up to QUICKMENU_MAXLINES entries
-       // the other ones contain only (QUICKMENU_MAXLINES - 2) entries
-       // so that the panel can show an empty row and "Continue..."
-       float first_entry = QuickMenu_Page * (QUICKMENU_MAXLINES - 2);
-       int entry_num = 0; // counts entries in target_submenu
-       for( ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
-       {
-               s = QuickMenu_Buffer_Get();
-
-               if(z_submenu != "" && substring(s, 1, -1) == z_submenu)
-               {
-                       // printf("^3 end of %s\n", z_submenu);
-                       break;
-               }
-
-               if(entry_num >= first_entry)
-               {
-                       ++QuickMenu_Page_Entries;
-                       if(QuickMenu_Page_Entries == QUICKMENU_MAXLINES - 2)
-                               QuickMenu_Buffer_Index_Prev = QuickMenu_Buffer_Index;
-                       else if(QuickMenu_Page_Entries == QUICKMENU_MAXLINES)
-                       {
-                               QuickMenu_Page_ClearEntry(QUICKMENU_MAXLINES - 1);
-                               QuickMenu_Buffer_Index = QuickMenu_Buffer_Index_Prev;
-                               QuickMenu_IsLastPage = false;
-                               break;
-                       }
-               }
-
-               // NOTE: entries are loaded starting from 1, not from 0
-               if(substring(s, 0, 1) == QM_TAG_SUBMENU)
-               {
-                       if(entry_num >= first_entry)
-                               QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, substring(s, 1, -1), "");
-                       QuickMenu_skip_submenu(substring(s, 1, -1));
-               }
-               else if(entry_num >= first_entry && substring(s, 0, 1) == QM_TAG_TITLE)
-               {
-                       ++QuickMenu_Buffer_Index;
-                       cmd = QuickMenu_Buffer_Get();
-                       string command_code = substring(cmd, 0, 1);
-                       if(command_code == QM_TAG_COMMAND)
-                               cmd = substring(cmd, 1, -1);
-                       else if(command_code == QM_TAG_PLCOMMAND)
-                       {
-                               // throw away the current quickmenu buffer and load a new one
-                               cmd = substring(cmd, 1, -1);
-                               strunzone(z_submenu);
-                               if(HUD_Quickmenu_PlayerListEntries_Create(cmd, stof(substring(s, 1, 1)), stof(substring(s, 2, 1))))
-                                       return QuickMenu_Page_Load("", 0);
-                               QuickMenu_Close();
-                               return false;
-                       }
-
-                       tokenize_console(cmd);
-                       QuickMenu_Page_Command_Type[QuickMenu_Page_Entries] = (argv(1) && argv(0) == "toggle");
-
-                       QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, substring(s, 1, -1), cmd);
-               }
-
-               ++entry_num;
-       }
-       strunzone(z_submenu);
-       if (QuickMenu_Page_Entries == 0)
-       {
-               QuickMenu_Close();
-               return false;
-       }
-       QuickMenu_TimeOut = ((autocvar_hud_panel_quickmenu_time > 0) ? time + autocvar_hud_panel_quickmenu_time : 0);
-       return true;
-}
-
-bool QuickMenu_ActionForNumber(int num)
-{
-    TC(int, num);
-       if (!QuickMenu_IsLastPage)
-       {
-               if (num < 0 || num >= QUICKMENU_MAXLINES)
-                       return false;
-               if (num == QUICKMENU_MAXLINES - 1)
-                       return false;
-               if (num == 0)
-               {
-                       QuickMenu_Page_Load(QuickMenu_CurrentSubMenu, +1);
-                       return false;
-               }
-       } else if (num <= 0 || num > QuickMenu_Page_Entries)
-               return false;
-
-       if (QuickMenu_Page_Command[num] != "")
-       {
-               localcmd(strcat("\n", QuickMenu_Page_Command[num], "\n"));
-               QuickMenu_TimeOut = ((autocvar_hud_panel_quickmenu_time > 0) ? time + autocvar_hud_panel_quickmenu_time : 0);
-               return true;
-       }
-       if (QuickMenu_Page_Description[num] != "")
-               QuickMenu_Page_Load(QuickMenu_Page_Description[num], 0);
-       return false;
-}
-
-void QuickMenu_Page_ActiveEntry(int entry_num)
-{
-    TC(int, entry_num);
-       QuickMenu_Page_ActivatedEntry = entry_num;
-       QuickMenu_Page_ActivatedEntry_Time = time + 0.1;
-       if(QuickMenu_Page_Command[QuickMenu_Page_ActivatedEntry])
-       {
-               bool f = QuickMenu_ActionForNumber(QuickMenu_Page_ActivatedEntry);
-               // toggle commands don't close the quickmenu
-               if(QuickMenu_Page_Command_Type[QuickMenu_Page_ActivatedEntry] == 1)
-                       QuickMenu_Page_ActivatedEntry_Close = false;
-               else
-                       QuickMenu_Page_ActivatedEntry_Close = (f && !(hudShiftState & S_CTRL));
-       }
-       else
-               QuickMenu_Page_ActivatedEntry_Close = (!(hudShiftState & S_CTRL));
-}
-
-bool QuickMenu_InputEvent(int bInputType, float nPrimary, float nSecondary)
-{
-    TC(int, bInputType);
-       // we only care for keyboard events
-       if(bInputType == 2)
-               return false;
-
-       if(!QuickMenu_IsOpened() || autocvar__hud_configure || mv_active)
-               return false;
-
-       if(bInputType == 3)
-       {
-               mousepos.x = nPrimary;
-               mousepos.y = nSecondary;
-               return true;
-       }
-
-       // allow console bind to work
-       string con_keys;
-       float keys;
-       con_keys = findkeysforcommand("toggleconsole", 0);
-       keys = tokenize(con_keys); // findkeysforcommand returns data for this
-
-       bool hit_con_bind = false;
-       int i;
-       for (i = 0; i < keys; ++i)
-       {
-               if(nPrimary == stof(argv(i)))
-                       hit_con_bind = true;
-       }
-
-       if(bInputType == 0) {
-               if(nPrimary == K_ALT) hudShiftState |= S_ALT;
-               if(nPrimary == K_CTRL) hudShiftState |= S_CTRL;
-               if(nPrimary == K_SHIFT) hudShiftState |= S_SHIFT;
-       }
-       else if(bInputType == 1) {
-               if(nPrimary == K_ALT) hudShiftState -= (hudShiftState & S_ALT);
-               if(nPrimary == K_CTRL) hudShiftState -= (hudShiftState & S_CTRL);
-               if(nPrimary == K_SHIFT) hudShiftState -= (hudShiftState & S_SHIFT);
-       }
-
-       if(nPrimary == K_ESCAPE)
-       {
-               if (bInputType == 1)
-                       return true;
-               QuickMenu_Close();
-       }
-       else if(nPrimary >= '0' && nPrimary <= '9')
-       {
-               if (bInputType == 1)
-                       return true;
-               QuickMenu_Page_ActiveEntry(stof(chr2str(nPrimary)));
-       }
-       if(nPrimary == K_MOUSE1)
-       {
-               if(bInputType == 0) // key pressed
-                       mouseClicked |= S_MOUSE1;
-               else if(bInputType == 1) // key released
-                       mouseClicked -= (mouseClicked & S_MOUSE1);
-       }
-       else if(nPrimary == K_MOUSE2)
-       {
-               if(bInputType == 0) // key pressed
-                       mouseClicked |= S_MOUSE2;
-               else if(bInputType == 1) // key released
-                       mouseClicked -= (mouseClicked & S_MOUSE2);
-       }
-       else if(hit_con_bind)
-               return false;
-
-       return true;
-}
-
-void QuickMenu_Mouse()
-{
-       if(mv_active) return;
-
-       if(!mouseClicked)
-       if(prevMouseClicked & S_MOUSE2)
-       {
-               QuickMenu_Close();
-               return;
-       }
-
-       if(!autocvar_hud_cursormode)
-       {
-               mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
-
-               mousepos.x = bound(0, mousepos.x, vid_conwidth);
-               mousepos.y = bound(0, mousepos.y, vid_conheight);
-       }
-
-       HUD_Panel_UpdateCvars();
-
-       if(panel_bg_padding)
-       {
-               panel_pos += '1 1 0' * panel_bg_padding;
-               panel_size -= '2 2 0' * panel_bg_padding;
-       }
-
-       float first_entry_pos, entries_height;
-       vector fontsize;
-       fontsize = '1 1 0' * (panel_size.y / QUICKMENU_MAXLINES);
-       first_entry_pos = panel_pos.y + ((QUICKMENU_MAXLINES - QuickMenu_Page_Entries) * fontsize.y) / 2;
-       entries_height = panel_size.y - ((QUICKMENU_MAXLINES - QuickMenu_Page_Entries) * fontsize.y);
-
-       if (mousepos.x >= panel_pos.x && mousepos.y >= first_entry_pos && mousepos.x <= panel_pos.x + panel_size.x && mousepos.y <= first_entry_pos + entries_height)
-       {
-               float entry_num;
-               entry_num = floor((mousepos.y - first_entry_pos) / fontsize.y);
-               if (QuickMenu_IsLastPage || entry_num != QUICKMENU_MAXLINES - 2)
-               {
-                       panel_pos.y = first_entry_pos + entry_num * fontsize.y;
-                       vector color;
-                       if(mouseClicked & S_MOUSE1)
-                               color = '0.5 1 0.5';
-                       else if(hudShiftState & S_CTRL)
-                               color = '1 1 0.3';
-                       else
-                               color = '1 1 1';
-                       drawfill(panel_pos, eX * panel_size.x + eY * fontsize.y, color, .2, DRAWFLAG_NORMAL);
-
-                       if(!mouseClicked && (prevMouseClicked & S_MOUSE1))
-                               QuickMenu_Page_ActiveEntry((entry_num < QUICKMENU_MAXLINES - 1) ? entry_num + 1 : 0);
-               }
-       }
-
-       draw_cursor_normal(mousepos, '1 1 1', 0.8);
-
-       prevMouseClicked = mouseClicked;
-}
-
-void HUD_Quickmenu_DrawEntry(vector pos, string desc, string option, vector fontsize)
-{
-       string entry;
-       float offset;
-       float desc_width = panel_size.x;
-       if(option)
-       {
-               string pic = strcat(hud_skin_path, "/", option);
-               if(precache_pic(pic) == "")
-                       pic = strcat("gfx/hud/default/", option);
-               vector option_size = '1 1 0' * fontsize.y * 0.8;
-               desc_width -= option_size.x;
-               drawpic(pos + eX * desc_width + eY * (fontsize.y - option_size.y) / 2, pic, option_size, '1 1 1', panel_fg_alpha, DRAWFLAG_ADDITIVE);
-               desc_width -= fontsize.x / 4;
-       }
-       entry = textShortenToWidth(desc, desc_width, fontsize, stringwidth_colors);
-       if (autocvar_hud_panel_quickmenu_align > 0)
-       {
-               float real_desc_width = stringwidth_colors(entry, fontsize);
-               offset = (desc_width - real_desc_width) * min(autocvar_hud_panel_quickmenu_align, 1);
-
-               if(option)
-               {
-                       // when there's enough room align description regardless the checkbox
-                       float extra_offset = (panel_size.x - desc_width) * min(autocvar_hud_panel_quickmenu_align, 1);
-                       if(offset + real_desc_width + extra_offset < desc_width)
-                               offset += extra_offset;
-                       else
-                               offset = max(0, desc_width - real_desc_width);
-               }
-               drawcolorcodedstring(pos + eX * offset, entry, fontsize, panel_fg_alpha, DRAWFLAG_ADDITIVE);
-       }
-       else
-               drawcolorcodedstring(pos, entry, fontsize, panel_fg_alpha, DRAWFLAG_ADDITIVE);
-}
-
-void HUD_QuickMenu()
-{
-       if(!autocvar__hud_configure)
-       {
-               if (hud_configure_prev && hud_configure_prev != -1)
-                       QuickMenu_Close();
-
-               if(!hud_draw_maximized) return;
-               if(mv_active) return;
-               //if(!autocvar_hud_panel_quickmenu) return;
-               if(!hud_panel_quickmenu) return;
-
-               if(QuickMenu_TimeOut)
-               if(time > QuickMenu_TimeOut)
-               {
-                       QuickMenu_Close();
-                       return;
-               }
-       }
-       else
-       {
-               if(!QuickMenu_IsOpened())
-               {
-                       QuickMenu_Page_Entries = 1;
-                       QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, sprintf(_("Submenu%d"), QuickMenu_Page_Entries), "");
-                       ++QuickMenu_Page_Entries;
-                       QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, sprintf(_("Submenu%d"), QuickMenu_Page_Entries), "");
-                       ++QuickMenu_Page_Entries;
-                       // although real command doesn't matter here, it must not be empty
-                       // otherwise the entry is displayed like a submenu
-                       for (; QuickMenu_Page_Entries < QUICKMENU_MAXLINES - 1; ++QuickMenu_Page_Entries)
-                               QuickMenu_Page_LoadEntry(QuickMenu_Page_Entries, sprintf(_("Command%d"), QuickMenu_Page_Entries), "-");
-                       ++QuickMenu_Page_Entries;
-                       QuickMenu_Page_ClearEntry(QuickMenu_Page_Entries);
-                       QuickMenu_IsLastPage = false;
-               }
-       }
-
-       HUD_Panel_UpdateCvars();
-
-       HUD_Panel_DrawBg(1);
-
-       if(panel_bg_padding)
-       {
-               panel_pos += '1 1 0' * panel_bg_padding;
-               panel_size -= '2 2 0' * panel_bg_padding;
-       }
-
-       int i;
-       vector fontsize;
-       string color;
-       fontsize = '1 1 0' * (panel_size.y / QUICKMENU_MAXLINES);
-
-       if (!QuickMenu_IsLastPage)
-       {
-               color = "^5";
-               HUD_Quickmenu_DrawEntry(panel_pos + eY * (panel_size.y - fontsize.y), sprintf("%d: %s%s", 0, color, _("Continue...")), string_null, fontsize);
-       }
-       else
-               panel_pos.y += ((QUICKMENU_MAXLINES - QuickMenu_Page_Entries) * fontsize.y) / 2;
-
-       for (i = 1; i <= QuickMenu_Page_Entries; ++i) {
-               if (QuickMenu_Page_Description[i] == "")
-                       break;
-               string option = string_null;
-               if (QuickMenu_Page_Command[i] == "")
-                       color = "^4";
-               else
-               {
-                       color = "^3";
-                       if(QuickMenu_Page_Command_Type[i] == 1) // toggle command
-                       {
-                               int end = strstrofs(QuickMenu_Page_Command[i], ";", 0);
-                               if(end < 0)
-                                       tokenize_console(QuickMenu_Page_Command[i]);
-                               else
-                                       tokenize_console(substring(QuickMenu_Page_Command[i], 0, end));
-
-                               //if(argv(1) && argv(0) == "toggle") // already checked
-                               {
-                                       // "enable feature xxx" "toggle xxx" (or "toggle xxx 1 0")
-                                       // "disable feature xxx" "toggle xxx 0 1"
-                                       float ON_value = 1, OFF_value = 0;
-                                       if(argv(2))
-                                               ON_value = stof(argv(2));
-
-                                       if(argv(3))
-                                               OFF_value = stof(argv(3));
-                                       else
-                                               OFF_value = !ON_value;
-
-                                       float value = cvar(argv(1));
-                                       if(value == ON_value)
-                                               option = "checkbox_checked";
-                                       else if(value == OFF_value)
-                                               option = "checkbox_empty";
-                                       else
-                                               option = "checkbox_undefined";
-                               }
-                       }
-               }
-               HUD_Quickmenu_DrawEntry(panel_pos, sprintf("%d: %s%s", i, color, QuickMenu_Page_Description[i]), option, fontsize);
-
-               if(QuickMenu_Page_ActivatedEntry_Time && time < QuickMenu_Page_ActivatedEntry_Time
-                       && QuickMenu_Page_ActivatedEntry == i)
-                       drawfill(panel_pos, eX * panel_size.x + eY * fontsize.y, '0.5 1 0.5', .2, DRAWFLAG_NORMAL);
-
-               panel_pos.y += fontsize.y;
-       }
-
-       if(QuickMenu_Page_ActivatedEntry >= 0 && time >= QuickMenu_Page_ActivatedEntry_Time)
-       {
-               if(!QuickMenu_Page_Command[QuickMenu_Page_ActivatedEntry])
-               {
-                       bool f = QuickMenu_ActionForNumber(QuickMenu_Page_ActivatedEntry);
-                       if(f && QuickMenu_Page_ActivatedEntry_Close)
-                               QuickMenu_Close();
-               }
-               else if(QuickMenu_Page_ActivatedEntry_Close)
-                       QuickMenu_Close();
-               QuickMenu_Page_ActivatedEntry = -1;
-               QuickMenu_Page_ActivatedEntry_Time = 0;
-       }
-}
-
-
-#define QUICKMENU_SMENU(submenu,eng_submenu) { \
-       if(target_submenu == eng_submenu && target_submenu_found) \
-               return; /* target_submenu entries are now loaded, exit */ \
-       if(QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES) \
-               QuickMenu_Buffer_Set(QM_TAG_SUBMENU, submenu); \
-       ++QuickMenu_Buffer_Size; \
-       if(target_submenu == eng_submenu && !target_submenu_found) { \
-               QuickMenu_Buffer_Size = 0; /* enable load of next entries */ \
-               target_submenu_found = true; \
-       } \
-}
-
-#define QUICKMENU_ENTRY(title,command) { \
-       if(QuickMenu_Buffer_Size + 1 < QUICKMENU_BUFFER_MAXENTRIES) \
-       { \
-               QuickMenu_Buffer_Set(QM_TAG_TITLE, title); \
-               ++QuickMenu_Buffer_Size; \
-               QuickMenu_Buffer_Set(QM_TAG_COMMAND, command); \
-       } \
-       ++QuickMenu_Buffer_Size; \
-}
-
-#define QUICKMENU_SMENU_PL(submenu,eng_submenu,command,teamplayers,without_me) { \
-       if(QuickMenu_Buffer_Size + 3 < QUICKMENU_BUFFER_MAXENTRIES) {\
-               QUICKMENU_SMENU(submenu,eng_submenu) \
-               QuickMenu_Buffer_Set(QM_TAG_TITLE, strcat(ftos(teamplayers), ftos(without_me))); \
-               ++QuickMenu_Buffer_Size; \
-               QuickMenu_Buffer_Set(QM_TAG_PLCOMMAND, command); \
-               ++QuickMenu_Buffer_Size; \
-               QUICKMENU_SMENU(submenu,eng_submenu) \
-       } \
-}
-
-
-
-// useful to Translate a string inside the Command
-#define QUICKMENU_ENTRY_TC(title,command,text,translated_text) {\
-       if(prvm_language == "en") \
-               QUICKMENU_ENTRY(title, sprintf(command, text)) \
-       else if(!autocvar_hud_panel_quickmenu_translatecommands || translated_text == text) \
-               QUICKMENU_ENTRY(strcat("(en)", title), sprintf(command, text)) \
-       else \
-               QUICKMENU_ENTRY(strcat("(", prvm_language, ")", title), sprintf(command, translated_text)) \
-}
-
-void HUD_Quickmenu_PlayerListEntries(string cmd, int teamplayers, bool without_me)
-{
-    TC(int, teamplayers); TC(bool, without_me);
-       entity pl;
-       if(teamplayers && !team_count)
-               return;
-
-       for(pl = players.sort_next; pl; pl = pl.sort_next)
-       {
-               if(teamplayers == 1 && (pl.team != myteam || pl.team == NUM_SPECTATOR)) // only own team players
-                       continue;
-               if(teamplayers == 2 && (pl.team == myteam || pl.team == NUM_SPECTATOR)) // only enemy team players
-                       continue;
-               if(without_me && pl.sv_entnum == player_localnum)
-                       continue;
-               QUICKMENU_ENTRY(entcs_GetName(pl.sv_entnum), sprintf(cmd, entcs_GetName(pl.sv_entnum)))
-       }
-
-       return;
-}
-
-
-// Specifying target_submenu, this function only loads entries inside target_submenu
-// NOTE: alternatively we could have loaded the whole default quickmenu and
-// then called QuickMenu_Page_Load(target_submenu, 0);
-// but this sytem is more reliable since we can always refer to target_submenu
-// with the English title even if a translation is active
-void QuickMenu_Default(string target_submenu)
-{
-       bool target_submenu_found = false;
-       if(target_submenu != "")
-               QuickMenu_Buffer_Size = QUICKMENU_BUFFER_MAXENTRIES; // forbids load of next entries until target_submenu
-
-       QUICKMENU_SMENU(CTX(_("QMCMD^Chat")), "Chat")
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^nice one")), "say %s", ":-) / nice one", CTX(_("QMCMD^:-) / nice one")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^good game")), "say %s", "good game", CTX(_("QMCMD^good game")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^hi / good luck")), "say %s", "hi / good luck and have fun", CTX(_("QMCMD^hi / good luck and have fun")))
-       QUICKMENU_SMENU(CTX(_("QMCMD^Chat")), "Chat")
-
-       if(teamplay)
-       {
-       QUICKMENU_SMENU(CTX(_("QMCMD^Team chat")), "Team chat")
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^quad soon")), "say_team %s", "quad soon", CTX(_("QMCMD^quad soon")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^free item, icon")), "say_team %s; g_waypointsprite_team_here_p", "free item %x^7 (l:%y^7)", CTX(_("QMCMD^free item %x^7 (l:%y^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^took item, icon")), "say_team %s; g_waypointsprite_team_here", "took item (l:%l^7)", CTX(_("QMCMD^took item (l:%l^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^negative")), "say_team %s", "negative", CTX(_("QMCMD^negative")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^positive")), "say_team %s", "positive", CTX(_("QMCMD^positive")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^need help, icon")), "say_team %s; g_waypointsprite_team_helpme; cmd voice needhelp", "need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)", CTX(_("QMCMD^need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^enemy seen, icon")), "say_team %s; g_waypointsprite_team_danger_p; cmd voice incoming", "enemy seen (l:%y^7)", CTX(_("QMCMD^enemy seen (l:%y^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^flag seen, icon")), "say_team %s; g_waypointsprite_team_here_p; cmd voice seenflag", "flag seen (l:%y^7)", CTX(_("QMCMD^flag seen (l:%y^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^defending, icon")), "say_team %s; g_waypointsprite_team_here", "defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)", CTX(_("QMCMD^defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^roaming, icon")), "say_team %s; g_waypointsprite_team_here", "roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)", CTX(_("QMCMD^roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^attacking, icon")), "say_team %s; g_waypointsprite_team_here", "attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)", CTX(_("QMCMD^attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^killed flag, icon")), "say_team %s; g_waypointsprite_team_here_p", "killed flagcarrier (l:%y^7)", CTX(_("QMCMD^killed flagcarrier (l:%y^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^dropped flag, icon")), "say_team %s; g_waypointsprite_team_here_d", "dropped flag (l:%d^7)", CTX(_("QMCMD^dropped flag (l:%d^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^drop gun, icon")), "say_team %s; g_waypointsprite_team_here; wait; dropweapon", "dropped gun %w^7 (l:%l^7)", CTX(_("QMCMD^dropped gun %w^7 (l:%l^7)")))
-               QUICKMENU_ENTRY_TC(CTX(_("QMCMD^drop flag/key, icon")), "say_team %s; g_waypointsprite_team_here; wait; use", "dropped flag/key %w^7 (l:%l^7)", CTX(_("QMCMD^dropped flag/key %w^7 (l:%l^7)")))
-       QUICKMENU_SMENU(CTX(_("QMCMD^Team chat")), "Team chat")
-       }
-
-       QUICKMENU_SMENU_PL(CTX(_("QMCMD^Send private message to")), "Send private message to", "commandmode tell \"%s^7\"", 0, 1)
-
-       QUICKMENU_SMENU(CTX(_("QMCMD^Settings")), "Settings")
-               QUICKMENU_SMENU(CTX(_("QMCMD^View/HUD settings")), "View/HUD settings")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^3rd person view")), "toggle chase_active")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Player models like mine")), "toggle cl_forceplayermodels")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Names above players")), "toggle hud_shownames")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Crosshair per weapon")), "toggle crosshair_per_weapon")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^FPS")), "toggle hud_panel_engineinfo")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Net graph")), "toggle shownetgraph")
-               QUICKMENU_SMENU(CTX(_("QMCMD^View/HUD settings")), "View/HUD settings")
-
-               QUICKMENU_SMENU(CTX(_("QMCMD^Sound settings")), "Sound settings")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Hit sound")), "toggle cl_hitsound")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Chat sound")), "toggle con_chatsound")
-               QUICKMENU_SMENU(CTX(_("QMCMD^Sound settings")), "Sound settings")
-
-               if(spectatee_status > 0)
-               {
-               QUICKMENU_SMENU(CTX(_("QMCMD^Spectator camera")), "Spectator camera")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^1st person")), "chase_active 0; -use")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^3rd person around player")), "chase_active 1; +use")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^3rd person behind")), "chase_active 1; -use")
-               QUICKMENU_SMENU(CTX(_("QMCMD^Spectator camera")), "Spectator camera")
-               }
-
-               if(spectatee_status == -1)
-               {
-               QUICKMENU_SMENU(CTX(_("QMCMD^Observer camera")), "Observer camera")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Increase speed")), "weapnext")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Decrease speed")), "weapprev")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Wall collision off")), "+use")
-                       QUICKMENU_ENTRY(CTX(_("QMCMD^Wall collision on")), "-use")
-               QUICKMENU_SMENU(CTX(_("QMCMD^Observer camera")), "Observer camera")
-               }
-
-               QUICKMENU_ENTRY(CTX(_("QMCMD^Fullscreen")), "toggle vid_fullscreen; vid_restart")
-               if(prvm_language != "en")
-               QUICKMENU_ENTRY(CTX(_("QMCMD^Translate chat messages")), "toggle hud_panel_quickmenu_translatecommands")
-       QUICKMENU_SMENU(CTX(_("QMCMD^Settings")), "Settings")
-
-       QUICKMENU_SMENU(CTX(_("QMCMD^Call a vote")), "Call a vote")
-               QUICKMENU_ENTRY(CTX(_("QMCMD^Restart the map")), "vcall restart")
-               QUICKMENU_ENTRY(CTX(_("QMCMD^End match")), "vcall endmatch")
-               if(STAT(TIMELIMIT) > 0)
-               {
-               QUICKMENU_ENTRY(CTX(_("QMCMD^Reduce match time")), "vcall reducematchtime")
-               QUICKMENU_ENTRY(CTX(_("QMCMD^Extend match time")), "vcall extendmatchtime")
-               }
-               if(teamplay)
-               QUICKMENU_ENTRY(CTX(_("QMCMD^Shuffle teams")), "vcall shuffleteams")
-       QUICKMENU_SMENU(CTX(_("QMCMD^Call a vote")), "Call a vote")
-
-       if(target_submenu != "" && !target_submenu_found)
-       {
-               LOG_WARNINGF("Couldn't find submenu \"%s\"\n", target_submenu);
-               if(prvm_language != "en")
-                       LOG_WARNINGF("^3Warning: submenu must be in English\n", target_submenu);
-               QuickMenu_Buffer_Size = 0;
-       }
-}
-#undef QUICKMENU_SMENU
-#undef QUICKMENU_ENTRY
-#undef QUICKMENU_ENTRY_TC
diff --git a/qcsrc/client/quickmenu.qh b/qcsrc/client/quickmenu.qh
deleted file mode 100644 (file)
index 373cd27..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-
-bool QuickMenu_InputEvent(float bInputType, float nPrimary, float nSecondary);
-bool QuickMenu_IsOpened();
-void QuickMenu_Mouse();
index a41c91f773b74dcbbf5b78126898c9f31e236b79..5fc8ff60a05993874e209fbfaa272dc96ce2cbf7 100644 (file)
@@ -1,6 +1,6 @@
 #include "scoreboard.qh"
 
-#include "quickmenu.qh"
+#include "hud/panel/quickmenu.qh"
 #include "hud/all.qh"
 
 #include <common/ent_cs.qh>
index 8d001cb5920979590328368c366d56ab5eb9c434..276c0b18ec7441700c7b7c9115966a1949030236 100644 (file)
@@ -5,7 +5,7 @@
 #include "mapvoting.qh"
 #include "scoreboard.qh"
 #include "shownames.qh"
-#include "quickmenu.qh"
+#include "hud/panel/quickmenu.qh"
 
 #include "mutators/events.qh"
 
diff --git a/qcsrc/client/weapons/_mod.inc b/qcsrc/client/weapons/_mod.inc
new file mode 100644 (file)
index 0000000..005158a
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "projectile.qc"
index 8efa61772cae2b630cd0bc7ac6b13b92b413b22e..b16c24fb47086179068f433c7b93a057f28836c0 100644 (file)
@@ -39,11 +39,11 @@ float autocvar_net_connecttimeout = 30;
 #include "t_items.qc"
 #endif
 
-#include "items/all.qc"
+#include "items/_mod.inc"
     #include "weapons/all.qc"
         #include "monsters/all.qc"
         #include "turrets/all.qc"
         #include "vehicles/all.qc"
 
-#include "mutators/all.qc"
-    #include "gamemodes/all.qc"
+#include "mutators/_mod.inc"
+    #include "gamemodes/_mod.inc"
diff --git a/qcsrc/common/_mod.inc b/qcsrc/common/_mod.inc
new file mode 100644 (file)
index 0000000..0503213
--- /dev/null
@@ -0,0 +1,13 @@
+// generated file; do not modify
+#include "anim.qc"
+#include "animdecide.qc"
+#include "campaign_file.qc"
+#include "campaign_setup.qc"
+#include "ent_cs.qc"
+#include "mapinfo.qc"
+#include "net_notice.qc"
+#include "playerstats.qc"
+#include "state.qc"
+#include "t_items.qc"
+#include "util.qc"
+#include "viewloc.qc"
diff --git a/qcsrc/common/command/_mod.inc b/qcsrc/common/command/_mod.inc
new file mode 100644 (file)
index 0000000..57ff3f7
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include "all.qc"
+#include "generic.qc"
+#include "markup.qc"
+#include "rpn.qc"
diff --git a/qcsrc/common/deathtypes/_mod.inc b/qcsrc/common/deathtypes/_mod.inc
new file mode 100644 (file)
index 0000000..254d13d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "all.qc"
diff --git a/qcsrc/common/effects/_mod.inc b/qcsrc/common/effects/_mod.inc
new file mode 100644 (file)
index 0000000..25e9062
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "all.qc"
+#include "effectinfo.qc"
diff --git a/qcsrc/common/effects/qc/_mod.inc b/qcsrc/common/effects/qc/_mod.inc
new file mode 100644 (file)
index 0000000..fc5a14f
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include "all.qc"
+#include "casings.qc"
+#include "damageeffects.qc"
+#include "gibs.qc"
+#include "globalsound.qc"
+#include "lightningarc.qc"
+#include "modeleffects.qc"
index 6763519ef49b55543bac9a1d150c6054861beccf..ab217110b08a96352ea01185e63be7e38ff08134 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef SVQC
+void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, int casingtype, entity casingowner);
+#endif
+
 #ifdef IMPLEMENTATION
 
 #include <common/util.qh>
diff --git a/qcsrc/common/gamemodes/_mod.inc b/qcsrc/common/gamemodes/_mod.inc
new file mode 100644 (file)
index 0000000..254d13d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "all.qc"
diff --git a/qcsrc/common/gamemodes/gamemode/_mod.inc b/qcsrc/common/gamemodes/gamemode/_mod.inc
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
diff --git a/qcsrc/common/gamemodes/gamemode/nexball/_mod.inc b/qcsrc/common/gamemodes/gamemode/nexball/_mod.inc
new file mode 100644 (file)
index 0000000..3e72142
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "nexball.qc"
+#include "weapon.qc"
diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/_mod.inc b/qcsrc/common/gamemodes/gamemode/onslaught/_mod.inc
new file mode 100644 (file)
index 0000000..d1aac78
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include "cl_controlpoint.qc"
+#include "cl_generator.qc"
+#include "onslaught.qc"
+#include "sv_controlpoint.qc"
+#include "sv_generator.qc"
diff --git a/qcsrc/common/impulses/_mod.inc b/qcsrc/common/impulses/_mod.inc
new file mode 100644 (file)
index 0000000..254d13d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "all.qc"
diff --git a/qcsrc/common/items/_mod.inc b/qcsrc/common/items/_mod.inc
new file mode 100644 (file)
index 0000000..254d13d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "all.qc"
diff --git a/qcsrc/common/items/all.inc b/qcsrc/common/items/all.inc
deleted file mode 100644 (file)
index 48b92be..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/** If you register a new item, make sure to add it to this list */
-#include "item/ammo.qc"
-#include "item/armor.qc"
-#include "item/health.qc"
-#include "item/jetpack.qc"
-#include "item/pickup.qc"
-#include "item/powerup.qc"
index 62dc0fe270be2d48efaf5ab54b3547aa41ed9665..9d7cfa8d32e428aed292e73b8a4d501cbfada5f9 100644 (file)
@@ -2,7 +2,7 @@
 #define ITEMS_ALL_C
 #include "all.qh"
 
-#include "all.inc"
+#include "item/_mod.inc"
 
 void Dump_Items()
 {
index ba8d86bfaab2cf71b037efcb798758c09b0d8bfe..18cc5ae4f3b707dfd11caea3774cc2473d2587f2 100644 (file)
@@ -8,7 +8,6 @@
 REGISTRY(Items, BITS(5))
 #define Items_from(i) _Items_from(i, NULL)
 REGISTER_REGISTRY(Items)
-/** If you register a new item, make sure to add it to all.inc */
 #define REGISTER_ITEM(id, class) REGISTER(Items, ITEM, id, m_id, NEW(class))
 
 REGISTRY_SORT(Items)
index 55f33ecc8ec3b97088ad18416563b798f7bbd9ad..4ab7af4f2317341ebeb4d1f625dfb8659cecb3d8 100644 (file)
@@ -39,7 +39,6 @@ const int IT_UNLIMITED_AMMO                   = IT_UNLIMITED_WEAPON_AMMO | IT_UNLIMITE
 const int IT_PICKUPMASK                        = IT_UNLIMITED_AMMO | IT_JETPACK | IT_FUEL_REGEN; // strength and invincible are handled separately
 
 #define ITEM_HANDLE(signal, ...) __Item_Send_##signal(__VA_ARGS__)
-/** If you register a new item, make sure to add it to all.inc */
 CLASS(GameItem, Object)
     ATTRIB(GameItem, m_id, int, 0)
     ATTRIB(GameItem, m_name, string, string_null)
diff --git a/qcsrc/common/items/item/_mod.inc b/qcsrc/common/items/item/_mod.inc
new file mode 100644 (file)
index 0000000..453cead
--- /dev/null
@@ -0,0 +1,7 @@
+// generated file; do not modify
+#include "ammo.qc"
+#include "armor.qc"
+#include "health.qc"
+#include "jetpack.qc"
+#include "pickup.qc"
+#include "powerup.qc"
diff --git a/qcsrc/common/minigames/_mod.inc b/qcsrc/common/minigames/_mod.inc
new file mode 100644 (file)
index 0000000..47690d3
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include "cl_minigames.qc"
+#include "cl_minigames_hud.qc"
+#include "minigames.qc"
+#include "sv_minigames.qc"
diff --git a/qcsrc/common/minigames/minigame/_mod.inc b/qcsrc/common/minigames/minigame/_mod.inc
new file mode 100644 (file)
index 0000000..f53fc0b
--- /dev/null
@@ -0,0 +1,9 @@
+// generated file; do not modify
+#include "bd.qc"
+#include "c4.qc"
+#include "nmm.qc"
+#include "pong.qc"
+#include "pp.qc"
+#include "ps.qc"
+#include "snake.qc"
+#include "ttt.qc"
diff --git a/qcsrc/common/models/_mod.inc b/qcsrc/common/models/_mod.inc
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
diff --git a/qcsrc/common/monsters/_mod.inc b/qcsrc/common/monsters/_mod.inc
new file mode 100644 (file)
index 0000000..8dff76f
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include "all.qc"
+#include "spawn.qc"
+#include "sv_monsters.qc"
diff --git a/qcsrc/common/monsters/all.inc b/qcsrc/common/monsters/all.inc
deleted file mode 100644 (file)
index 778e2a1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef MENUQC
-#include "../animdecide.qh"
-#include "../anim.qh"
-vector animfixfps(entity e, vector a, vector b);
-#endif
-
-#include "monster/mage.qc"
-#include "monster/shambler.qc"
-#include "monster/spider.qc"
-#include "monster/wyvern.qc"
-#include "monster/zombie.qc"
index 2b15e4085734183ebe31053e327314d6bfc5f8e1..ce0a9023d494e2cf14367532c5305f9ec4d7af37 100644 (file)
@@ -15,7 +15,7 @@ string M_Model(string m_mdl)
 #include "all.qh"
 
 #define IMPLEMENTATION
-#include "all.inc"
+#include "monster/_mod.inc"
 #undef IMPLEMENTATION
 
 #ifdef SVQC
index b771984f212b1b4ef3a680099e19e7059600662e..1e23f3287940218b3c8a882033d3f12b42c88fd2 100644 (file)
@@ -12,12 +12,11 @@ REGISTER_REGISTRY(Monsters)
 REGISTRY_CHECK(Monsters)
 const int MON_FIRST = 1;
 #define MON_LAST (Monsters_COUNT - 1)
-/** If you register a new monster, make sure to add it to all.inc */
 #define REGISTER_MONSTER(id, inst) REGISTER(Monsters, MON, id, monsterid, inst)
 
 REGISTER_MONSTER(Null, NEW(Monster));
 
 
-#include "all.inc"
+#include "monster/_mod.inc"
 
 #endif
index f1a5ee3d46f473a558e67f4ac1ec7beb67789707..9ba1cde12941ac1777aa98c4a2f5868f8aa3a825 100644 (file)
 #include <lib/warpzone/server.qh>
 #endif
 
+#ifndef MENUQC
+#include "../animdecide.qh"
+#include "../anim.qh"
+vector animfixfps(entity e, vector a, vector b);
+#endif
+
 // special spawn flags
 const int MONSTER_RESPAWN_DEATHPOINT = 16; // re-spawn where we died
 const int MONSTER_TYPE_FLY = 32;
@@ -39,7 +45,6 @@ const int MONSTER_SIZE_QUAKE = 8192;
 .vector anim_walk;
 .vector anim_spawn;
 
-/** If you register a new monster, make sure to add it to all.inc */
 CLASS(Monster, Object)
     ATTRIB(Monster, monsterid, int, 0)
     /** attributes */
diff --git a/qcsrc/common/monsters/monster/_mod.inc b/qcsrc/common/monsters/monster/_mod.inc
new file mode 100644 (file)
index 0000000..6b8a307
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include "mage.qc"
+#include "shambler.qc"
+#include "spider.qc"
+#include "wyvern.qc"
+#include "zombie.qc"
diff --git a/qcsrc/common/mutators/_mod.inc b/qcsrc/common/mutators/_mod.inc
new file mode 100644 (file)
index 0000000..254d13d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "all.qc"
diff --git a/qcsrc/common/mutators/mutator/_mod.inc b/qcsrc/common/mutators/mutator/_mod.inc
new file mode 100644 (file)
index 0000000..14e0e3d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "itemstime.qc"
diff --git a/qcsrc/common/mutators/mutator/bloodloss/_mod.inc b/qcsrc/common/mutators/mutator/bloodloss/_mod.inc
new file mode 100644 (file)
index 0000000..791cd03
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "bloodloss.qc"
diff --git a/qcsrc/common/mutators/mutator/breakablehook/_mod.inc b/qcsrc/common/mutators/mutator/breakablehook/_mod.inc
new file mode 100644 (file)
index 0000000..ff8da62
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "breakablehook.qc"
diff --git a/qcsrc/common/mutators/mutator/buffs/_mod.inc b/qcsrc/common/mutators/mutator/buffs/_mod.inc
new file mode 100644 (file)
index 0000000..df0201d
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "all.qc"
+#include "buffs.qc"
diff --git a/qcsrc/common/mutators/mutator/bugrigs/_mod.inc b/qcsrc/common/mutators/mutator/bugrigs/_mod.inc
new file mode 100644 (file)
index 0000000..cd18f33
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "bugrigs.qc"
diff --git a/qcsrc/common/mutators/mutator/campcheck/_mod.inc b/qcsrc/common/mutators/mutator/campcheck/_mod.inc
new file mode 100644 (file)
index 0000000..2f61e45
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "campcheck.qc"
diff --git a/qcsrc/common/mutators/mutator/cloaked/_mod.inc b/qcsrc/common/mutators/mutator/cloaked/_mod.inc
new file mode 100644 (file)
index 0000000..4423f2b
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "cloaked.qc"
diff --git a/qcsrc/common/mutators/mutator/damagetext/_mod.inc b/qcsrc/common/mutators/mutator/damagetext/_mod.inc
new file mode 100644 (file)
index 0000000..ff53767
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "damagetext.qc"
diff --git a/qcsrc/common/mutators/mutator/dodging/_mod.inc b/qcsrc/common/mutators/mutator/dodging/_mod.inc
new file mode 100644 (file)
index 0000000..92244a5
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "dodging.qc"
diff --git a/qcsrc/common/mutators/mutator/doublejump/_mod.inc b/qcsrc/common/mutators/mutator/doublejump/_mod.inc
new file mode 100644 (file)
index 0000000..8c1f531
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "doublejump.qc"
diff --git a/qcsrc/common/mutators/mutator/hook/_mod.inc b/qcsrc/common/mutators/mutator/hook/_mod.inc
new file mode 100644 (file)
index 0000000..9eff27e
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "hook.qc"
diff --git a/qcsrc/common/mutators/mutator/instagib/_mod.inc b/qcsrc/common/mutators/mutator/instagib/_mod.inc
new file mode 100644 (file)
index 0000000..e5e4393
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "instagib.qc"
+#include "items.qc"
diff --git a/qcsrc/common/mutators/mutator/invincibleproj/_mod.inc b/qcsrc/common/mutators/mutator/invincibleproj/_mod.inc
new file mode 100644 (file)
index 0000000..2783d09
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "invincibleproj.qc"
diff --git a/qcsrc/common/mutators/mutator/melee_only/_mod.inc b/qcsrc/common/mutators/mutator/melee_only/_mod.inc
new file mode 100644 (file)
index 0000000..d2132e6
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "melee_only.qc"
diff --git a/qcsrc/common/mutators/mutator/midair/_mod.inc b/qcsrc/common/mutators/mutator/midair/_mod.inc
new file mode 100644 (file)
index 0000000..aae84aa
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "midair.qc"
diff --git a/qcsrc/common/mutators/mutator/multijump/_mod.inc b/qcsrc/common/mutators/mutator/multijump/_mod.inc
new file mode 100644 (file)
index 0000000..a58cf85
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "multijump.qc"
diff --git a/qcsrc/common/mutators/mutator/nades/_mod.inc b/qcsrc/common/mutators/mutator/nades/_mod.inc
new file mode 100644 (file)
index 0000000..9055545
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "nades.qc"
+#include "net.qc"
diff --git a/qcsrc/common/mutators/mutator/new_toys/_mod.inc b/qcsrc/common/mutators/mutator/new_toys/_mod.inc
new file mode 100644 (file)
index 0000000..97665f5
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "new_toys.qc"
diff --git a/qcsrc/common/mutators/mutator/nix/_mod.inc b/qcsrc/common/mutators/mutator/nix/_mod.inc
new file mode 100644 (file)
index 0000000..b98eab4
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "nix.qc"
diff --git a/qcsrc/common/mutators/mutator/overkill/_mod.inc b/qcsrc/common/mutators/mutator/overkill/_mod.inc
new file mode 100644 (file)
index 0000000..19c25a0
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include "hmg.qc"
+#include "overkill.qc"
+#include "rpc.qc"
diff --git a/qcsrc/common/mutators/mutator/physical_items/_mod.inc b/qcsrc/common/mutators/mutator/physical_items/_mod.inc
new file mode 100644 (file)
index 0000000..8174e85
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "physical_items.qc"
diff --git a/qcsrc/common/mutators/mutator/pinata/_mod.inc b/qcsrc/common/mutators/mutator/pinata/_mod.inc
new file mode 100644 (file)
index 0000000..a4017bd
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "pinata.qc"
diff --git a/qcsrc/common/mutators/mutator/random_gravity/_mod.inc b/qcsrc/common/mutators/mutator/random_gravity/_mod.inc
new file mode 100644 (file)
index 0000000..e07c8af
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "random_gravity.qc"
diff --git a/qcsrc/common/mutators/mutator/rocketflying/_mod.inc b/qcsrc/common/mutators/mutator/rocketflying/_mod.inc
new file mode 100644 (file)
index 0000000..92ef3cc
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "rocketflying.qc"
diff --git a/qcsrc/common/mutators/mutator/rocketminsta/_mod.inc b/qcsrc/common/mutators/mutator/rocketminsta/_mod.inc
new file mode 100644 (file)
index 0000000..e50a4ba
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "rocketminsta.qc"
diff --git a/qcsrc/common/mutators/mutator/running_guns/_mod.inc b/qcsrc/common/mutators/mutator/running_guns/_mod.inc
new file mode 100644 (file)
index 0000000..2550d2d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "running_guns.qc"
diff --git a/qcsrc/common/mutators/mutator/sandbox/_mod.inc b/qcsrc/common/mutators/mutator/sandbox/_mod.inc
new file mode 100644 (file)
index 0000000..c1e80d4
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "sandbox.qc"
diff --git a/qcsrc/common/mutators/mutator/spawn_near_teammate/_mod.inc b/qcsrc/common/mutators/mutator/spawn_near_teammate/_mod.inc
new file mode 100644 (file)
index 0000000..612f5a0
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "spawn_near_teammate.qc"
diff --git a/qcsrc/common/mutators/mutator/superspec/_mod.inc b/qcsrc/common/mutators/mutator/superspec/_mod.inc
new file mode 100644 (file)
index 0000000..bb63a18
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "superspec.qc"
diff --git a/qcsrc/common/mutators/mutator/touchexplode/_mod.inc b/qcsrc/common/mutators/mutator/touchexplode/_mod.inc
new file mode 100644 (file)
index 0000000..06bb8d3
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "touchexplode.qc"
diff --git a/qcsrc/common/mutators/mutator/vampire/_mod.inc b/qcsrc/common/mutators/mutator/vampire/_mod.inc
new file mode 100644 (file)
index 0000000..c0164ea
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "vampire.qc"
diff --git a/qcsrc/common/mutators/mutator/vampirehook/_mod.inc b/qcsrc/common/mutators/mutator/vampirehook/_mod.inc
new file mode 100644 (file)
index 0000000..4f2e935
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "vampirehook.qc"
diff --git a/qcsrc/common/mutators/mutator/waypoints/_mod.inc b/qcsrc/common/mutators/mutator/waypoints/_mod.inc
new file mode 100644 (file)
index 0000000..a5ebe76
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "waypointsprites.qc"
diff --git a/qcsrc/common/mutators/mutator/weaponarena_random/_mod.inc b/qcsrc/common/mutators/mutator/weaponarena_random/_mod.inc
new file mode 100644 (file)
index 0000000..c110d3f
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "weaponarena_random.qc"
diff --git a/qcsrc/common/notifications/_mod.inc b/qcsrc/common/notifications/_mod.inc
new file mode 100644 (file)
index 0000000..254d13d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "all.qc"
diff --git a/qcsrc/common/physics/_mod.inc b/qcsrc/common/physics/_mod.inc
new file mode 100644 (file)
index 0000000..fb423ec
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "movelib.qc"
+#include "player.qc"
diff --git a/qcsrc/common/physics/movetypes/_mod.inc b/qcsrc/common/physics/movetypes/_mod.inc
new file mode 100644 (file)
index 0000000..674b829
--- /dev/null
@@ -0,0 +1,7 @@
+// generated file; do not modify
+#include "follow.qc"
+#include "movetypes.qc"
+#include "push.qc"
+#include "step.qc"
+#include "toss.qc"
+#include "walk.qc"
index 339d617459b94f4dfa529d9dbd63866112d831c9..bcc9f7329072d75d2870a88ff4b128bdc28a9ccb 100644 (file)
@@ -155,6 +155,8 @@ STATIC_INIT(PHYS_INPUT_BUTTON_JETPACK)
 
 #define ITEMS_STAT(s)                       ((s).items)
 
+.float teleport_time;
+
 #ifdef CSQC
 
        string autocvar_cl_jumpspeedcap_min;
diff --git a/qcsrc/common/sounds/_mod.inc b/qcsrc/common/sounds/_mod.inc
new file mode 100644 (file)
index 0000000..254d13d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "all.qc"
diff --git a/qcsrc/common/triggers/_mod.inc b/qcsrc/common/triggers/_mod.inc
new file mode 100644 (file)
index 0000000..8c5a22c
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include "include.qc"
+#include "platforms.qc"
+#include "subs.qc"
+#include "teleporters.qc"
+#include "triggers.qc"
diff --git a/qcsrc/common/triggers/func/_mod.inc b/qcsrc/common/triggers/func/_mod.inc
new file mode 100644 (file)
index 0000000..2497d85
--- /dev/null
@@ -0,0 +1,19 @@
+// generated file; do not modify
+#include "bobbing.qc"
+#include "breakable.qc"
+#include "button.qc"
+#include "conveyor.qc"
+#include "door.qc"
+#include "door_rotating.qc"
+#include "door_secret.qc"
+#include "fourier.qc"
+#include "include.qc"
+#include "ladder.qc"
+#include "pendulum.qc"
+#include "plat.qc"
+#include "pointparticles.qc"
+#include "rainsnow.qc"
+#include "rotating.qc"
+#include "stardust.qc"
+#include "train.qc"
+#include "vectormamamam.qc"
diff --git a/qcsrc/common/triggers/misc/_mod.inc b/qcsrc/common/triggers/misc/_mod.inc
new file mode 100644 (file)
index 0000000..5a6a06a
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include "corner.qc"
+#include "follow.qc"
+#include "include.qc"
+#include "laser.qc"
+#include "teleport_dest.qc"
diff --git a/qcsrc/common/triggers/target/_mod.inc b/qcsrc/common/triggers/target/_mod.inc
new file mode 100644 (file)
index 0000000..fdfabf7
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include "changelevel.qc"
+#include "include.qc"
+#include "location.qc"
+#include "music.qc"
+#include "spawn.qc"
+#include "speaker.qc"
+#include "voicescript.qc"
diff --git a/qcsrc/common/triggers/trigger/_mod.inc b/qcsrc/common/triggers/trigger/_mod.inc
new file mode 100644 (file)
index 0000000..03fa001
--- /dev/null
@@ -0,0 +1,25 @@
+// generated file; do not modify
+#include "counter.qc"
+#include "delay.qc"
+#include "disablerelay.qc"
+#include "flipflop.qc"
+#include "gamestart.qc"
+#include "gravity.qc"
+#include "heal.qc"
+#include "hurt.qc"
+#include "impulse.qc"
+#include "include.qc"
+#include "jumppads.qc"
+#include "keylock.qc"
+#include "magicear.qc"
+#include "monoflop.qc"
+#include "multi.qc"
+#include "multivibrator.qc"
+#include "relay.qc"
+#include "relay_activators.qc"
+#include "relay_if.qc"
+#include "relay_teamcheck.qc"
+#include "secret.qc"
+#include "swamp.qc"
+#include "teleport.qc"
+#include "viewloc.qc"
diff --git a/qcsrc/common/turrets/_mod.inc b/qcsrc/common/turrets/_mod.inc
new file mode 100644 (file)
index 0000000..552a805
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include "all.qc"
+#include "checkpoint.qc"
+#include "cl_turrets.qc"
+#include "config.qc"
+#include "sv_turrets.qc"
+#include "targettrigger.qc"
+#include "util.qc"
diff --git a/qcsrc/common/turrets/all.inc b/qcsrc/common/turrets/all.inc
deleted file mode 100644 (file)
index 5c9f1e1..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "turret/ewheel.qc"
-#include "turret/flac.qc"
-#include "turret/fusionreactor.qc"
-#include "turret/hellion.qc"
-#include "turret/hk.qc"
-#include "turret/machinegun.qc"
-#include "turret/mlrs.qc"
-#include "turret/phaser.qc"
-#include "turret/plasma.qc"
-#include "turret/plasma_dual.qc"
-#include "turret/tesla.qc"
-#include "turret/walker.qc"
index 2d40f17d01eb3037eb201451905bde4cf0b6bd7f..469a64c9274b240758ebd40eeeb8d4f19576d767 100644 (file)
@@ -7,7 +7,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_TURRET)
 #endif
 
 #define IMPLEMENTATION
-#include "all.inc"
+#include "turret/_mod.inc"
 #undef IMPLEMENTATION
 
 #ifdef CSQC
index 16bfacf3c8caf64439f68c08ea2936914f1c66c6..a993b9218a22cf77ae2df4f80870d2115b3b9fde 100644 (file)
@@ -74,6 +74,6 @@ const int TUR_FIRST = 1;
 
 REGISTER_TURRET(Null, NEW(Turret));
 
-#include "all.inc"
+#include "turret/_mod.inc"
 
 #endif
diff --git a/qcsrc/common/turrets/turret/_mod.inc b/qcsrc/common/turrets/turret/_mod.inc
new file mode 100644 (file)
index 0000000..3673214
--- /dev/null
@@ -0,0 +1,23 @@
+// generated file; do not modify
+#include "ewheel.qc"
+#include "ewheel_weapon.qc"
+#include "flac.qc"
+#include "flac_weapon.qc"
+#include "fusionreactor.qc"
+#include "hellion.qc"
+#include "hellion_weapon.qc"
+#include "hk.qc"
+#include "hk_weapon.qc"
+#include "machinegun.qc"
+#include "machinegun_weapon.qc"
+#include "mlrs.qc"
+#include "mlrs_weapon.qc"
+#include "phaser.qc"
+#include "phaser_weapon.qc"
+#include "plasma.qc"
+#include "plasma_dual.qc"
+#include "plasma_weapon.qc"
+#include "tesla.qc"
+#include "tesla_weapon.qc"
+#include "walker.qc"
+#include "walker_weapon.qc"
index 2a537d4e98fdc889f94ebb10ad1b2c1873637925..798e141ecd2e5caa4e12765eee020ab8830a0f6c 100644 (file)
@@ -3,7 +3,7 @@
 
 //#define EWHEEL_FANCYPATH
 
-#include "ewheel_weapon.qc"
+#include "ewheel_weapon.qh"
 
 CLASS(EWheel, Turret)
 /* spawnflags */ ATTRIB(EWheel, spawnflags, int, TUR_FLAG_PLAYER | TUR_FLAG_MOVE | TUR_FLAG_ROAM);
@@ -22,8 +22,6 @@ REGISTER_TURRET(EWHEEL, NEW(EWheel));
 
 #ifdef IMPLEMENTATION
 
-#include "ewheel_weapon.qc"
-
 #ifdef SVQC
 
 float autocvar_g_turrets_unit_ewheel_speed_fast;
index 8f25a7c0832ef57d68abbe2df189504ffa61bb6f..50212458f22ef14b41e37dd1230c824a2f1590a1 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_EWHEEL_WEAPON_H
-#define TURRET_EWHEEL_WEAPON_H
-
-CLASS(EWheelAttack, PortoLaunch)
-/* flags     */ ATTRIB(EWheelAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(EWheelAttack, impulse, int, 5);
-/* refname   */ ATTRIB(EWheelAttack, netname, string, "turret_ewheel");
-/* wepname   */ ATTRIB(EWheelAttack, m_name, string, _("eWheel"));
-ENDCLASS(EWheelAttack)
-REGISTER_WEAPON(EWHEEL, NEW(EWheelAttack));
-
-#endif
+#include "ewheel_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/ewheel_weapon.qh b/qcsrc/common/turrets/turret/ewheel_weapon.qh
new file mode 100644 (file)
index 0000000..974a32c
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(EWheelAttack, PortoLaunch)
+/* flags     */ ATTRIB(EWheelAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(EWheelAttack, impulse, int, 5);
+/* refname   */ ATTRIB(EWheelAttack, netname, string, "turret_ewheel");
+/* wepname   */ ATTRIB(EWheelAttack, m_name, string, _("eWheel"));
+ENDCLASS(EWheelAttack)
+REGISTER_WEAPON(EWHEEL, NEW(EWheelAttack));
index faaf89ffc0348ed7816ec11ca6a996c4ad07cfaa..6bd6a3ff1462389ec9eb65649826614722e7470a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_FLAC_H
 #define TURRET_FLAC_H
 
-#include "flac_weapon.qc"
+#include "flac_weapon.qh"
 
 CLASS(Flac, Turret)
 /* spawnflags */ ATTRIB(Flac, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_FASTPROJ | TUR_FLAG_MISSILE);
@@ -20,8 +20,6 @@ REGISTER_TURRET(FLAC, NEW(Flac));
 
 #ifdef IMPLEMENTATION
 
-#include "flac_weapon.qc"
-
 #ifdef SVQC
 
 spawnfunc(turret_flac) { if (!turret_initialize(TUR_FLAC)) remove(self); }
index 85eccb6e15f8ed1d4115729e92de9bf8e6f85793..175fa7617ffdc24812da3130256d2fc7561dadfe 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_FLAC_WEAPON_H
-#define TURRET_FLAC_WEAPON_H
-
-CLASS(FlacAttack, PortoLaunch)
-/* flags     */ ATTRIB(FlacAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(FlacAttack, impulse, int, 5);
-/* refname   */ ATTRIB(FlacAttack, netname, string, "turret_flac");
-/* wepname   */ ATTRIB(FlacAttack, m_name, string, _("FLAC"));
-ENDCLASS(FlacAttack)
-REGISTER_WEAPON(FLAC, NEW(FlacAttack));
-
-#endif
+#include "flac_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/flac_weapon.qh b/qcsrc/common/turrets/turret/flac_weapon.qh
new file mode 100644 (file)
index 0000000..7857f2f
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(FlacAttack, PortoLaunch)
+/* flags     */ ATTRIB(FlacAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(FlacAttack, impulse, int, 5);
+/* refname   */ ATTRIB(FlacAttack, netname, string, "turret_flac");
+/* wepname   */ ATTRIB(FlacAttack, m_name, string, _("FLAC"));
+ENDCLASS(FlacAttack)
+REGISTER_WEAPON(FLAC, NEW(FlacAttack));
index 3eec587b20790403d207ee0df9b3b9f7f3ed635b..ef279f7611fd767cbdcc2e289489b91edf68579b 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_HELLION_H
 #define TURRET_HELLION_H
 
-#include "hellion_weapon.qc"
+#include "hellion_weapon.qh"
 
 CLASS(Hellion, Turret)
 /* spawnflags */ ATTRIB(Hellion, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_FASTPROJ | TUR_FLAG_PLAYER | TUR_FLAG_MISSILE);
@@ -20,8 +20,6 @@ REGISTER_TURRET(HELLION, NEW(Hellion));
 
 #ifdef IMPLEMENTATION
 
-#include "hellion_weapon.qc"
-
 #ifdef SVQC
 
 spawnfunc(turret_hellion) { if (!turret_initialize(TUR_HELLION)) remove(self); }
index 99029cd1ef75c22e2de7df64f49b940f49901a78..7df79c8c7e03d41f1c1fc214047b51b8abac9674 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_HELLION_WEAPON_H
-#define TURRET_HELLION_WEAPON_H
-
-CLASS(HellionAttack, PortoLaunch)
-/* flags     */ ATTRIB(HellionAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(HellionAttack, impulse, int, 9);
-/* refname   */ ATTRIB(HellionAttack, netname, string, "turret_hellion");
-/* wepname   */ ATTRIB(HellionAttack, m_name, string, _("Hellion"));
-ENDCLASS(HellionAttack)
-REGISTER_WEAPON(HELLION, NEW(HellionAttack));
-
-#endif
+#include "hellion_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/hellion_weapon.qh b/qcsrc/common/turrets/turret/hellion_weapon.qh
new file mode 100644 (file)
index 0000000..88ac336
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(HellionAttack, PortoLaunch)
+/* flags     */ ATTRIB(HellionAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(HellionAttack, impulse, int, 9);
+/* refname   */ ATTRIB(HellionAttack, netname, string, "turret_hellion");
+/* wepname   */ ATTRIB(HellionAttack, m_name, string, _("Hellion"));
+ENDCLASS(HellionAttack)
+REGISTER_WEAPON(HELLION, NEW(HellionAttack));
index a1a7e096dd1b0b02a4d37bf4ded097339f23327a..4e7b4513818e1b0e264e080fdf23a44361541bf6 100644 (file)
@@ -3,7 +3,7 @@
 
 //#define TURRET_DEBUG_HK
 
-#include "hk_weapon.qc"
+#include "hk_weapon.qh"
 
 CLASS(HunterKiller, Turret)
 /* spawnflags */ ATTRIB(HunterKiller, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER | TUR_FLAG_RECIEVETARGETS);
@@ -22,8 +22,6 @@ REGISTER_TURRET(HK, NEW(HunterKiller));
 
 #ifdef IMPLEMENTATION
 
-#include "hk_weapon.qc"
-
 #ifdef SVQC
 
 #ifdef TURRET_DEBUG_HK
index 91d138ee0de23c6d2765c1b997fb4652136cd6dc..319a579cf2bac4d537e4d2c497f329f75bd2d409 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_HK_WEAPON_H
-#define TURRET_HK_WEAPON_H
-
-CLASS(HunterKillerAttack, PortoLaunch)
-/* flags     */ ATTRIB(HunterKillerAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(HunterKillerAttack, impulse, int, 9);
-/* refname   */ ATTRIB(HunterKillerAttack, netname, string, "turret_hk");
-/* wepname   */ ATTRIB(HunterKillerAttack, m_name, string, _("Hunter-Killer"));
-ENDCLASS(HunterKillerAttack)
-REGISTER_WEAPON(HK, NEW(HunterKillerAttack));
-
-#endif
+#include "hk_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/hk_weapon.qh b/qcsrc/common/turrets/turret/hk_weapon.qh
new file mode 100644 (file)
index 0000000..87e0c88
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(HunterKillerAttack, PortoLaunch)
+/* flags     */ ATTRIB(HunterKillerAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(HunterKillerAttack, impulse, int, 9);
+/* refname   */ ATTRIB(HunterKillerAttack, netname, string, "turret_hk");
+/* wepname   */ ATTRIB(HunterKillerAttack, m_name, string, _("Hunter-Killer"));
+ENDCLASS(HunterKillerAttack)
+REGISTER_WEAPON(HK, NEW(HunterKillerAttack));
index 61f256d7acbb4eb41568dcb8843a16bda569d390..e919026570af16da0598a4dbb9dbaff79b2473ac 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_MACHINEGUN_H
 #define TURRET_MACHINEGUN_H
 
-#include "machinegun_weapon.qc"
+#include "machinegun_weapon.qh"
 
 CLASS(MachineGunTurret, Turret)
 /* spawnflags */ ATTRIB(MachineGunTurret, spawnflags, int, TUR_FLAG_PLAYER);
@@ -20,8 +20,6 @@ REGISTER_TURRET(MACHINEGUN, NEW(MachineGunTurret));
 
 #ifdef IMPLEMENTATION
 
-#include "machinegun_weapon.qc"
-
 #ifdef SVQC
 
 spawnfunc(turret_machinegun) { if (!turret_initialize(TUR_MACHINEGUN)) remove(self); }
index 29c1c1ae96e2168f80a0619f0968ced3db4bf887..d5814489fb6936a14d1c4b5a6ab90ff1a9504e8a 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_MACHINEGUN_WEAPON_H
-#define TURRET_MACHINEGUN_WEAPON_H
-
-CLASS(MachineGunTurretAttack, PortoLaunch)
-/* flags     */ ATTRIB(MachineGunTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(MachineGunTurretAttack, impulse, int, 9);
-/* refname   */ ATTRIB(MachineGunTurretAttack, netname, string, "turret_machinegun");
-/* wepname   */ ATTRIB(MachineGunTurretAttack, m_name, string, _("Machinegun"));
-ENDCLASS(MachineGunTurretAttack)
-REGISTER_WEAPON(TUR_MACHINEGUN, NEW(MachineGunTurretAttack));
-
-#endif
+#include "machinegun_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/machinegun_weapon.qh b/qcsrc/common/turrets/turret/machinegun_weapon.qh
new file mode 100644 (file)
index 0000000..30163bc
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(MachineGunTurretAttack, PortoLaunch)
+/* flags     */ ATTRIB(MachineGunTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(MachineGunTurretAttack, impulse, int, 9);
+/* refname   */ ATTRIB(MachineGunTurretAttack, netname, string, "turret_machinegun");
+/* wepname   */ ATTRIB(MachineGunTurretAttack, m_name, string, _("Machinegun"));
+ENDCLASS(MachineGunTurretAttack)
+REGISTER_WEAPON(TUR_MACHINEGUN, NEW(MachineGunTurretAttack));
index c5f6865cc90c0357de7dee9228fd61391a7fdce4..43710b6c02f91e6b82ee5eb220b8a41874484d6a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_MLRS_H
 #define TURRET_MLRS_H
 
-#include "mlrs_weapon.qc"
+#include "mlrs_weapon.qh"
 
 CLASS(MLRSTurret, Turret)
 /* spawnflags */ ATTRIB(MLRSTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER);
@@ -20,8 +20,6 @@ REGISTER_TURRET(MLRS, NEW(MLRSTurret));
 
 #ifdef IMPLEMENTATION
 
-#include "mlrs_weapon.qc"
-
 #ifdef SVQC
 
 spawnfunc(turret_mlrs) { if (!turret_initialize(TUR_MLRS)) remove(self); }
index 592657d857fe77fe82deddd391679f33463ff41e..2f8dd65e9f48fae08d4c6e53a704cc95bb4365dd 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_MLRS_WEAPON_H
-#define TURRET_MLRS_WEAPON_H
-
-CLASS(MLRSTurretAttack, PortoLaunch)
-/* flags     */ ATTRIB(MLRSTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(MLRSTurretAttack, impulse, int, 9);
-/* refname   */ ATTRIB(MLRSTurretAttack, netname, string, "turret_mlrs");
-/* wepname   */ ATTRIB(MLRSTurretAttack, m_name, string, _("MLRS"));
-ENDCLASS(MLRSTurretAttack)
-REGISTER_WEAPON(TUR_MLRS, NEW(MLRSTurretAttack));
-
-#endif
+#include "mlrs_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/mlrs_weapon.qh b/qcsrc/common/turrets/turret/mlrs_weapon.qh
new file mode 100644 (file)
index 0000000..c583842
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(MLRSTurretAttack, PortoLaunch)
+/* flags     */ ATTRIB(MLRSTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(MLRSTurretAttack, impulse, int, 9);
+/* refname   */ ATTRIB(MLRSTurretAttack, netname, string, "turret_mlrs");
+/* wepname   */ ATTRIB(MLRSTurretAttack, m_name, string, _("MLRS"));
+ENDCLASS(MLRSTurretAttack)
+REGISTER_WEAPON(TUR_MLRS, NEW(MLRSTurretAttack));
index 5c973c65aef92dc531329a1cd426a03b677df22f..e4c0c119a434af41591fd94a3527a06a35af226a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_PHASER_H
 #define TURRET_PHASER_H
 
-#include "phaser_weapon.qc"
+#include "phaser_weapon.qh"
 
 CLASS(PhaserTurret, Turret)
 /* spawnflags */ ATTRIB(PhaserTurret, spawnflags, int, TUR_FLAG_SNIPER | TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER);
@@ -20,12 +20,12 @@ REGISTER_TURRET(PHASER, NEW(PhaserTurret));
 
 #ifdef IMPLEMENTATION
 
-#include "phaser_weapon.qc"
-
 #ifdef SVQC
 
 spawnfunc(turret_phaser) { if (!turret_initialize(TUR_PHASER)) remove(self); }
 
+.int fireflag;
+
 METHOD(PhaserTurret, tr_think, void(PhaserTurret thistur, entity it))
 {
     SELFPARAM();
index a82f949adefe04441a8e44dbde0afddf654bc213..440bdf6a7299a6271363f3968b03a55d258d0db5 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_PHASER_WEAPON_H
-#define TURRET_PHASER_WEAPON_H
-
-CLASS(PhaserTurretAttack, PortoLaunch)
-/* flags     */ ATTRIB(PhaserTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(PhaserTurretAttack, impulse, int, 9);
-/* refname   */ ATTRIB(PhaserTurretAttack, netname, string, "turret_phaser");
-/* wepname   */ ATTRIB(PhaserTurretAttack, m_name, string, _("Phaser"));
-ENDCLASS(PhaserTurretAttack)
-REGISTER_WEAPON(PHASER, NEW(PhaserTurretAttack));
-
-#endif
+#include "phaser_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/phaser_weapon.qh b/qcsrc/common/turrets/turret/phaser_weapon.qh
new file mode 100644 (file)
index 0000000..326a90e
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(PhaserTurretAttack, PortoLaunch)
+/* flags     */ ATTRIB(PhaserTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(PhaserTurretAttack, impulse, int, 9);
+/* refname   */ ATTRIB(PhaserTurretAttack, netname, string, "turret_phaser");
+/* wepname   */ ATTRIB(PhaserTurretAttack, m_name, string, _("Phaser"));
+ENDCLASS(PhaserTurretAttack)
+REGISTER_WEAPON(PHASER, NEW(PhaserTurretAttack));
index 4982bff56c33ddac1de6541bbdf79b8d5738058b..5b2fd0f35fc363602e0abb9d20e2437385b94401 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_PLASMA_H
 #define TURRET_PLASMA_H
 
-#include "plasma_weapon.qc"
+#include "plasma_weapon.qh"
 
 CLASS(PlasmaTurret, Turret)
 /* spawnflags */ ATTRIB(PlasmaTurret, spawnflags, int, TUR_FLAG_SPLASH | TUR_FLAG_MEDPROJ | TUR_FLAG_PLAYER);
@@ -20,8 +20,6 @@ REGISTER_TURRET(PLASMA, NEW(PlasmaTurret));
 
 #ifdef IMPLEMENTATION
 
-#include "plasma_weapon.qc"
-
 #ifdef SVQC
 
 spawnfunc(turret_plasma) { if (!turret_initialize(TUR_PLASMA)) remove(self); }
index 1518a3008e6d78813838c31013a2032e9b1977fb..55226bd864d47f87d92c9caa3fa819bb6b5a7cc9 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef TURRET_PLASMA_DUAL_H
 #define TURRET_PLASMA_DUAL_H
 
+#include "plasma_weapon.qh"
+
 CLASS(PlasmaDualAttack, PlasmaAttack)
 /* refname   */ ATTRIB(PlasmaDualAttack, netname, string, "turret_plasma_dual");
 /* wepname   */ ATTRIB(PlasmaDualAttack, m_name, string, _("Dual plasma"));
index eef648448731f5c474a0010afbfa3a85b7355c0c..0d61df550c45e9161900af00547f3bd1981b307a 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_PLASMA_WEAPON_H
-#define TURRET_PLASMA_WEAPON_H
-
-CLASS(PlasmaAttack, PortoLaunch)
-/* flags     */ ATTRIB(PlasmaAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(PlasmaAttack, impulse, int, 5);
-/* refname   */ ATTRIB(PlasmaAttack, netname, string, "turret_plasma");
-/* wepname   */ ATTRIB(PlasmaAttack, m_name, string, _("Plasma"));
-ENDCLASS(PlasmaAttack)
-REGISTER_WEAPON(PLASMA, NEW(PlasmaAttack));
-
-#endif
+#include "plasma_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/plasma_weapon.qh b/qcsrc/common/turrets/turret/plasma_weapon.qh
new file mode 100644 (file)
index 0000000..5c73384
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(PlasmaAttack, PortoLaunch)
+/* flags     */ ATTRIB(PlasmaAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(PlasmaAttack, impulse, int, 5);
+/* refname   */ ATTRIB(PlasmaAttack, netname, string, "turret_plasma");
+/* wepname   */ ATTRIB(PlasmaAttack, m_name, string, _("Plasma"));
+ENDCLASS(PlasmaAttack)
+REGISTER_WEAPON(PLASMA, NEW(PlasmaAttack));
index de45078a1ef90f4e4d21ba0ccbd65d7b306ff3f0..510331c637400fe19586cee4767fff7cffaabd81 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TURRET_TESLA_H
 #define TURRET_TESLA_H
 
-#include "tesla_weapon.qc"
+#include "tesla_weapon.qh"
 
 CLASS(TeslaCoil, Turret)
 /* spawnflags */ ATTRIB(TeslaCoil, spawnflags, int, TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER | TUR_FLAG_MISSILE);
@@ -20,8 +20,6 @@ REGISTER_TURRET(TESLA, NEW(TeslaCoil));
 
 #ifdef IMPLEMENTATION
 
-#include "tesla_weapon.qc"
-
 #ifdef SVQC
 
 spawnfunc(turret_tesla) { if (!turret_initialize(TUR_TESLA)) remove(self); }
index 1c0ed527240c348d13b96d8745d13aa9c7f682e1..a283a738f2c79c93737698d02d86ff849c7e52c6 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_TESLA_WEAPON_H
-#define TURRET_TESLA_WEAPON_H
-
-CLASS(TeslaCoilTurretAttack, PortoLaunch)
-/* flags     */ ATTRIB(TeslaCoilTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(TeslaCoilTurretAttack, impulse, int, 9);
-/* refname   */ ATTRIB(TeslaCoilTurretAttack, netname, string, "turret_tesla");
-/* wepname   */ ATTRIB(TeslaCoilTurretAttack, m_name, string, _("Tesla Coil"));
-ENDCLASS(TeslaCoilTurretAttack)
-REGISTER_WEAPON(TESLA, NEW(TeslaCoilTurretAttack));
-
-#endif
+#include "tesla_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/tesla_weapon.qh b/qcsrc/common/turrets/turret/tesla_weapon.qh
new file mode 100644 (file)
index 0000000..7e3879b
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(TeslaCoilTurretAttack, PortoLaunch)
+/* flags     */ ATTRIB(TeslaCoilTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(TeslaCoilTurretAttack, impulse, int, 9);
+/* refname   */ ATTRIB(TeslaCoilTurretAttack, netname, string, "turret_tesla");
+/* wepname   */ ATTRIB(TeslaCoilTurretAttack, m_name, string, _("Tesla Coil"));
+ENDCLASS(TeslaCoilTurretAttack)
+REGISTER_WEAPON(TESLA, NEW(TeslaCoilTurretAttack));
index 9582f2d1f4176c4af84bd35d0a6fc58280561b54..ca665d08d91de207aa45dde4bdf8bcc94008c220 100644 (file)
@@ -3,7 +3,7 @@
 
 //#define WALKER_FANCYPATHING
 
-#include "walker_weapon.qc"
+#include "walker_weapon.qh"
 
 CLASS(WalkerTurret, Turret)
 /* spawnflags */ ATTRIB(WalkerTurret, spawnflags, int, TUR_FLAG_PLAYER | TUR_FLAG_MOVE);
@@ -22,8 +22,6 @@ REGISTER_TURRET(WALKER, NEW(WalkerTurret));
 
 #ifdef IMPLEMENTATION
 
-#include "walker_weapon.qc"
-
 #ifdef SVQC
 
 float autocvar_g_turrets_unit_walker_melee_damage;
index c1214758d27cdae0135b6234898023bf803d3bd2..170b2dd30e9f9cde593d3c3a88752f6a2c2c7aaf 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef TURRET_WALKER_WEAPON_H
-#define TURRET_WALKER_WEAPON_H
-
-CLASS(WalkerTurretAttack, PortoLaunch)
-/* flags     */ ATTRIB(WalkerTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(WalkerTurretAttack, impulse, int, 5);
-/* refname   */ ATTRIB(WalkerTurretAttack, netname, string, "turret_walker");
-/* wepname   */ ATTRIB(WalkerTurretAttack, m_name, string, _("Walker"));
-ENDCLASS(WalkerTurretAttack)
-REGISTER_WEAPON(WALKER, NEW(WalkerTurretAttack));
-
-#endif
+#include "walker_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
diff --git a/qcsrc/common/turrets/turret/walker_weapon.qh b/qcsrc/common/turrets/turret/walker_weapon.qh
new file mode 100644 (file)
index 0000000..4e20785
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+CLASS(WalkerTurretAttack, PortoLaunch)
+/* flags     */ ATTRIB(WalkerTurretAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(WalkerTurretAttack, impulse, int, 5);
+/* refname   */ ATTRIB(WalkerTurretAttack, netname, string, "turret_walker");
+/* wepname   */ ATTRIB(WalkerTurretAttack, m_name, string, _("Walker"));
+ENDCLASS(WalkerTurretAttack)
+REGISTER_WEAPON(WALKER, NEW(WalkerTurretAttack));
diff --git a/qcsrc/common/vehicles/_mod.inc b/qcsrc/common/vehicles/_mod.inc
new file mode 100644 (file)
index 0000000..e80489b
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include "all.qc"
+#include "cl_vehicles.qc"
+#include "sv_vehicles.qc"
diff --git a/qcsrc/common/vehicles/all.inc b/qcsrc/common/vehicles/all.inc
deleted file mode 100644 (file)
index e4c73a4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "vehicle/spiderbot.qc"
-#include "vehicle/raptor.qc"
-#include "vehicle/racer.qc"
-#ifndef VEHICLES_NO_UNSTABLE
-       #include "vehicle/bumblebee.qc"
-#endif
index 44178f92f8178486eee45abbe90c2fff72345544..251df22839e750646abef244455aa63d7e846df5 100644 (file)
@@ -12,7 +12,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_AUXILIARYXHAIR)
 #endif
 
 #define IMPLEMENTATION
-#include "all.inc"
+#include "vehicle/_mod.inc"
 #undef IMPLEMENTATION
 
 #endif
index f4e837f784694d841ca78b60c8a43d1c6d22990b..b58389d4abb7955feb7c3c80934583fadd4f6f1b 100644 (file)
@@ -11,7 +11,6 @@ REGISTRY_CHECK(Vehicles)
 const int VEH_FIRST = 1;
 #define VEH_LAST (Vehicles_COUNT - 1)
 
-/** If you register a new vehicle, make sure to add it to all.inc */
 #define REGISTER_VEHICLE(id, inst) REGISTER(Vehicles, VEH, id, vehicleid, inst)
 
 #if defined(SVQC)
@@ -22,6 +21,6 @@ const int VEH_FIRST = 1;
 
 REGISTER_VEHICLE(Null, NEW(Vehicle));
 
-#include "all.inc"
+#include "vehicle/_mod.inc"
 
 #endif
diff --git a/qcsrc/common/vehicles/vehicle/_mod.inc b/qcsrc/common/vehicles/vehicle/_mod.inc
new file mode 100644 (file)
index 0000000..fbead47
--- /dev/null
@@ -0,0 +1,9 @@
+// generated file; do not modify
+#include "bumblebee.qc"
+#include "bumblebee_weapons.qc"
+#include "racer.qc"
+#include "racer_weapon.qc"
+#include "raptor.qc"
+#include "raptor_weapons.qc"
+#include "spiderbot.qc"
+#include "spiderbot_weapons.qc"
index 115a83ba4add5f1e322f6f77e47a60131f1b4231..fd6b19bf30aed777f43aa1844d485e50e8a3e0cf 100644 (file)
@@ -2,7 +2,7 @@
 #define VEHICLE_BUMBLEBEE
 #include "bumblebee.qh"
 
-#include "bumblebee_weapons.qc"
+#include "bumblebee_weapons.qh"
 
 CLASS(Bumblebee, Vehicle)
 /* spawnflags */ ATTRIB(Bumblebee, spawnflags, int, VHF_DMGSHAKE);
@@ -31,8 +31,6 @@ const float BRG_SETUP = 2;
 const float BRG_START = 4;
 const float BRG_END = 8;
 
-#include "bumblebee_weapons.qc"
-
 #ifdef SVQC
 float autocvar_g_vehicle_bumblebee_respawntime = 60;
 
index b043038921460bb2768aca34238932a49352e566..37dfaef1d9c8599ba644f9fbe9093f5db9680c06 100644 (file)
@@ -6,4 +6,8 @@
 void CSQC_BUMBLE_GUN_HUD();
 #endif
 
+#ifdef SVQC
+float raptor_altitude(float amax);
+#endif
+
 #endif
index f6ae848586ce8d5b58d340212d4697285222b307..00b796dda059a9bd7905b88c5f39d364de8ac2c8 100644 (file)
@@ -1,9 +1,4 @@
-#ifndef VEHICLE_BUMBLEBEE_WEAPONS_H
-#define VEHICLE_BUMBLEBEE_WEAPONS_H
-
-#include <common/weapons/all.qh>
-
-#endif
+#include "bumblebee_weapons.qh"
 
 #ifdef IMPLEMENTATION
 
@@ -11,16 +6,6 @@ REGISTER_NET_LINKED(ENT_CLIENT_BUMBLE_RAYGUN)
 
 #ifdef SVQC
 
-float autocvar_g_vehicle_bumblebee_cannon_cost = 2;
-float autocvar_g_vehicle_bumblebee_cannon_damage = 60;
-float autocvar_g_vehicle_bumblebee_cannon_radius = 225;
-float autocvar_g_vehicle_bumblebee_cannon_refire = 0.2;
-float autocvar_g_vehicle_bumblebee_cannon_speed = 20000;
-float autocvar_g_vehicle_bumblebee_cannon_spread = 0.02;
-float autocvar_g_vehicle_bumblebee_cannon_force = -35;
-
-bool bumble_raygun_send(entity this, entity to, int sf);
-
 void bumblebee_fire_cannon(entity this, entity _gun, string _tagname, entity _owner)
 {
     vector v = gettaginfo(_gun, gettagindex(_gun, _tagname));
diff --git a/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qh b/qcsrc/common/vehicles/vehicle/bumblebee_weapons.qh
new file mode 100644 (file)
index 0000000..73fed55
--- /dev/null
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <common/weapons/all.qh>
+
+float autocvar_g_vehicle_bumblebee_cannon_cost = 2;
+float autocvar_g_vehicle_bumblebee_cannon_damage = 60;
+float autocvar_g_vehicle_bumblebee_cannon_radius = 225;
+float autocvar_g_vehicle_bumblebee_cannon_refire = 0.2;
+float autocvar_g_vehicle_bumblebee_cannon_speed = 20000;
+float autocvar_g_vehicle_bumblebee_cannon_spread = 0.02;
+float autocvar_g_vehicle_bumblebee_cannon_force = -35;
+
+#ifdef SVQC
+void bumblebee_fire_cannon(entity this, entity _gun, string _tagname, entity _owner);
+bool bumble_raygun_send(entity this, entity to, int sf);
+#endif
index 7ec82cc67265ab6cc6bbc2e56b8c88912d5fe46e..7f47c6b0873e0aed0d2080f48650526b5cec164e 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef VEHICLE_RACER
 #define VEHICLE_RACER
 
-#include "racer_weapon.qc"
+#include "racer_weapon.qh"
 
 CLASS(Racer, Vehicle)
 /* spawnflags */ ATTRIB(Racer, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL);
@@ -26,8 +26,6 @@ REGISTER_VEHICLE(RACER, NEW(Racer));
 
 #ifdef IMPLEMENTATION
 
-#include "racer_weapon.qc"
-
 #ifdef SVQC
 #include <common/triggers/trigger/impulse.qh>
 
index 9d8a830530cb0d26b77865744b35c6a4eb563c7b..ee86a622974ef0bff1fc37826730ff1978a69565 100644 (file)
@@ -1,46 +1,9 @@
-#ifndef VEHICLE_RACER_WEAPON_H
-#define VEHICLE_RACER_WEAPON_H
-
-#include <common/weapons/all.qh>
-
-CLASS(RacerAttack, PortoLaunch)
-/* flags     */ ATTRIB(RacerAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(RacerAttack, impulse, int, 3);
-/* refname   */ ATTRIB(RacerAttack, netname, string, "racercannon");
-/* wepname   */ ATTRIB(RacerAttack, m_name, string, _("Racer cannon"));
-ENDCLASS(RacerAttack)
-REGISTER_WEAPON(RACER, NEW(RacerAttack));
-
-// TODO: move into implementation
-#ifdef SVQC
-void racer_fire_rocket(entity player, vector org, vector dir, entity trg);
-#endif
-
-#endif
+#include "racer_weapon.qh"
 
 #ifdef IMPLEMENTATION
 
 #ifdef SVQC
 
-float autocvar_g_vehicle_racer_cannon_cost = 2;
-float autocvar_g_vehicle_racer_cannon_damage = 15;
-float autocvar_g_vehicle_racer_cannon_radius = 100;
-float autocvar_g_vehicle_racer_cannon_refire = 0.05;
-float autocvar_g_vehicle_racer_cannon_speed = 15000;
-float autocvar_g_vehicle_racer_cannon_spread = 0.0125;
-float autocvar_g_vehicle_racer_cannon_force = 50;
-
-float autocvar_g_vehicle_racer_rocket_accel = 1600;
-float autocvar_g_vehicle_racer_rocket_damage = 100;
-float autocvar_g_vehicle_racer_rocket_radius = 125;
-float autocvar_g_vehicle_racer_rocket_force = 350;
-float autocvar_g_vehicle_racer_rocket_speed = 900;
-float autocvar_g_vehicle_racer_rocket_turnrate = 0.2;
-float autocvar_g_vehicle_racer_rocket_refire = 3;
-
-float autocvar_g_vehicle_racer_rocket_climbspeed = 1600;
-float autocvar_g_vehicle_racer_rocket_locked_maxangle = 1.8;
-
 void racer_fire_rocket(entity player, vector org, vector dir, entity trg);
 METHOD(RacerAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
 {
diff --git a/qcsrc/common/vehicles/vehicle/racer_weapon.qh b/qcsrc/common/vehicles/vehicle/racer_weapon.qh
new file mode 100644 (file)
index 0000000..fc9e352
--- /dev/null
@@ -0,0 +1,35 @@
+#pragma once
+
+#include <common/weapons/all.qh>
+
+CLASS(RacerAttack, PortoLaunch)
+/* flags     */ ATTRIB(RacerAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(RacerAttack, impulse, int, 3);
+/* refname   */ ATTRIB(RacerAttack, netname, string, "racercannon");
+/* wepname   */ ATTRIB(RacerAttack, m_name, string, _("Racer cannon"));
+ENDCLASS(RacerAttack)
+REGISTER_WEAPON(RACER, NEW(RacerAttack));
+
+// TODO: move into implementation
+#ifdef SVQC
+void racer_fire_rocket(entity player, vector org, vector dir, entity trg);
+#endif
+
+float autocvar_g_vehicle_racer_cannon_cost = 2;
+float autocvar_g_vehicle_racer_cannon_damage = 15;
+float autocvar_g_vehicle_racer_cannon_radius = 100;
+float autocvar_g_vehicle_racer_cannon_refire = 0.05;
+float autocvar_g_vehicle_racer_cannon_speed = 15000;
+float autocvar_g_vehicle_racer_cannon_spread = 0.0125;
+float autocvar_g_vehicle_racer_cannon_force = 50;
+
+float autocvar_g_vehicle_racer_rocket_accel = 1600;
+float autocvar_g_vehicle_racer_rocket_damage = 100;
+float autocvar_g_vehicle_racer_rocket_radius = 125;
+float autocvar_g_vehicle_racer_rocket_force = 350;
+float autocvar_g_vehicle_racer_rocket_speed = 900;
+float autocvar_g_vehicle_racer_rocket_turnrate = 0.2;
+float autocvar_g_vehicle_racer_rocket_refire = 3;
+
+float autocvar_g_vehicle_racer_rocket_climbspeed = 1600;
+float autocvar_g_vehicle_racer_rocket_locked_maxangle = 1.8;
index beb0e74c8b9382082078e668f14f9dd11ff04317..c13ec3eafa818485cb3de68df5e5af306d578a35 100644 (file)
@@ -2,7 +2,7 @@
 #define VEHICLE_RAPTOR
 #include "raptor.qh"
 
-#include "raptor_weapons.qc"
+#include "raptor_weapons.qh"
 
 CLASS(Raptor, Vehicle)
 /* spawnflags */ ATTRIB(Raptor, spawnflags, int, VHF_DMGSHAKE | VHF_DMGROLL);
@@ -27,8 +27,6 @@ REGISTER_VEHICLE(RAPTOR, NEW(Raptor));
 
 #ifdef IMPLEMENTATION
 
-#include "raptor_weapons.qc"
-
 #ifdef SVQC
 
 bool autocvar_g_vehicle_raptor = true;
index eda7d026fed3a2f004b333bc7c8238f8338349ce..c51fa154f7925155680db346c788409e6e02c9b0 100644 (file)
@@ -1,56 +1,9 @@
-#ifndef VEHICLE_RAPTOR_WEAPONS_H
-#define VEHICLE_RAPTOR_WEAPONS_H
-
-#include <common/weapons/all.qh>
-
-CLASS(RaptorCannon, PortoLaunch)
-/* flags     */ ATTRIB(RaptorCannon, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(RaptorCannon, impulse, int, 3);
-/* refname   */ ATTRIB(RaptorCannon, netname, string, "raptorcannon");
-/* wepname   */ ATTRIB(RaptorCannon, m_name, string, _("Raptor cannon"));
-ENDCLASS(RaptorCannon)
-REGISTER_WEAPON(RAPTOR, NEW(RaptorCannon));
-
-CLASS(RaptorBomb, PortoLaunch)
-/* flags     */ ATTRIB(RaptorBomb, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(RaptorBomb, impulse, int, 3);
-/* refname   */ ATTRIB(RaptorBomb, netname, string, "raptorbomb");
-/* wepname   */ ATTRIB(RaptorBomb, m_name, string, _("Raptor bomb"));
-ENDCLASS(RaptorBomb)
-REGISTER_WEAPON(RAPTOR_BOMB, NEW(RaptorBomb));
-
-CLASS(RaptorFlare, PortoLaunch)
-/* flags     */ ATTRIB(RaptorFlare, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
-/* impulse   */ ATTRIB(RaptorFlare, impulse, int, 3);
-/* refname   */ ATTRIB(RaptorFlare, netname, string, "raptorflare");
-/* wepname   */ ATTRIB(RaptorFlare, m_name, string, _("Raptor flare"));
-ENDCLASS(RaptorFlare)
-REGISTER_WEAPON(RAPTOR_FLARE, NEW(RaptorFlare));
-
-#endif
+#include "raptor_weapons.qh"
 
 #ifdef IMPLEMENTATION
 
 #ifdef SVQC
 
-float autocvar_g_vehicle_raptor_cannon_cost = 1;
-float autocvar_g_vehicle_raptor_cannon_damage = 10;
-float autocvar_g_vehicle_raptor_cannon_radius = 60;
-float autocvar_g_vehicle_raptor_cannon_refire = 0.03;
-float autocvar_g_vehicle_raptor_cannon_speed = 24000;
-float autocvar_g_vehicle_raptor_cannon_spread = 0.01;
-float autocvar_g_vehicle_raptor_cannon_force = 25;
-
-float autocvar_g_vehicle_raptor_bomblets = 8;
-float autocvar_g_vehicle_raptor_bomblet_alt = 750;
-float autocvar_g_vehicle_raptor_bomblet_time = 0.5;
-float autocvar_g_vehicle_raptor_bomblet_damage = 55;
-float autocvar_g_vehicle_raptor_bomblet_spread = 0.4;
-float autocvar_g_vehicle_raptor_bomblet_edgedamage = 25;
-float autocvar_g_vehicle_raptor_bomblet_radius = 350;
-float autocvar_g_vehicle_raptor_bomblet_force = 150;
-float autocvar_g_vehicle_raptor_bomblet_explode_delay = 0.4;
-
 METHOD(RaptorCannon, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) {
     bool isPlayer = IS_PLAYER(actor);
     entity player = isPlayer ? actor : actor.owner;
@@ -85,7 +38,6 @@ METHOD(RaptorCannon, wr_checkammo1, bool(RacerAttack thiswep)) {
     return isPlayer || veh.vehicle_energy >= autocvar_g_vehicle_raptor_cannon_cost;
 }
 
-float autocvar_g_vehicle_raptor_bombs_refire = 5;
 
 void raptor_bombdrop();
 METHOD(RaptorBomb, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) {
@@ -100,11 +52,6 @@ METHOD(RaptorBomb, wr_think, void(entity thiswep, entity actor, .entity weaponen
     }
 }
 
-float autocvar_g_vehicle_raptor_flare_refire = 5;
-float autocvar_g_vehicle_raptor_flare_lifetime = 10;
-float autocvar_g_vehicle_raptor_flare_chase = 0.9;
-float autocvar_g_vehicle_raptor_flare_range = 2000;
-
 void raptor_flare_think();
 void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 void raptor_flare_touch();
diff --git a/qcsrc/common/vehicles/vehicle/raptor_weapons.qh b/qcsrc/common/vehicles/vehicle/raptor_weapons.qh
new file mode 100644 (file)
index 0000000..0b3af41
--- /dev/null
@@ -0,0 +1,53 @@
+#pragma once
+
+#include <common/weapons/all.qh>
+
+CLASS(RaptorCannon, PortoLaunch)
+/* flags     */ ATTRIB(RaptorCannon, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(RaptorCannon, impulse, int, 3);
+/* refname   */ ATTRIB(RaptorCannon, netname, string, "raptorcannon");
+/* wepname   */ ATTRIB(RaptorCannon, m_name, string, _("Raptor cannon"));
+ENDCLASS(RaptorCannon)
+REGISTER_WEAPON(RAPTOR, NEW(RaptorCannon));
+
+CLASS(RaptorBomb, PortoLaunch)
+/* flags     */ ATTRIB(RaptorBomb, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(RaptorBomb, impulse, int, 3);
+/* refname   */ ATTRIB(RaptorBomb, netname, string, "raptorbomb");
+/* wepname   */ ATTRIB(RaptorBomb, m_name, string, _("Raptor bomb"));
+ENDCLASS(RaptorBomb)
+REGISTER_WEAPON(RAPTOR_BOMB, NEW(RaptorBomb));
+
+CLASS(RaptorFlare, PortoLaunch)
+/* flags     */ ATTRIB(RaptorFlare, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
+/* impulse   */ ATTRIB(RaptorFlare, impulse, int, 3);
+/* refname   */ ATTRIB(RaptorFlare, netname, string, "raptorflare");
+/* wepname   */ ATTRIB(RaptorFlare, m_name, string, _("Raptor flare"));
+ENDCLASS(RaptorFlare)
+REGISTER_WEAPON(RAPTOR_FLARE, NEW(RaptorFlare));
+
+
+float autocvar_g_vehicle_raptor_cannon_cost = 1;
+float autocvar_g_vehicle_raptor_cannon_damage = 10;
+float autocvar_g_vehicle_raptor_cannon_radius = 60;
+float autocvar_g_vehicle_raptor_cannon_refire = 0.03;
+float autocvar_g_vehicle_raptor_cannon_speed = 24000;
+float autocvar_g_vehicle_raptor_cannon_spread = 0.01;
+float autocvar_g_vehicle_raptor_cannon_force = 25;
+
+float autocvar_g_vehicle_raptor_bomblets = 8;
+float autocvar_g_vehicle_raptor_bomblet_alt = 750;
+float autocvar_g_vehicle_raptor_bomblet_time = 0.5;
+float autocvar_g_vehicle_raptor_bomblet_damage = 55;
+float autocvar_g_vehicle_raptor_bomblet_spread = 0.4;
+float autocvar_g_vehicle_raptor_bomblet_edgedamage = 25;
+float autocvar_g_vehicle_raptor_bomblet_radius = 350;
+float autocvar_g_vehicle_raptor_bomblet_force = 150;
+float autocvar_g_vehicle_raptor_bomblet_explode_delay = 0.4;
+
+float autocvar_g_vehicle_raptor_bombs_refire = 5;
+
+float autocvar_g_vehicle_raptor_flare_refire = 5;
+float autocvar_g_vehicle_raptor_flare_lifetime = 10;
+float autocvar_g_vehicle_raptor_flare_chase = 0.9;
+float autocvar_g_vehicle_raptor_flare_range = 2000;
index fa2f6f9ccafd1837b4406332a271999bf5f49ff4..a74c32513f6ce9b442ff1df40e4d15ac72caf3db 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef VEHICLE_SPIDERBOT
 #define VEHICLE_SPIDERBOT
 
-#include "spiderbot_weapons.qc"
+#include "spiderbot_weapons.qh"
 
 CLASS(Spiderbot, Vehicle)
 /* spawnflags */ ATTRIB(Spiderbot, spawnflags, int, VHF_DMGSHAKE);
@@ -33,8 +33,6 @@ const int SBRM_GUIDE = 2;
 const int SBRM_ARTILLERY = 3;
 const int SBRM_LAST = 3;
 
-#include "spiderbot_weapons.qc"
-
 #ifdef SVQC
 bool autocvar_g_vehicle_spiderbot = true;
 
index 38817b15b758339d29f034bf014bed71475591ca..63f366e039d348bcc8e0a541050c1e9d1e5e4c03 100644 (file)
@@ -1,39 +1,9 @@
-#ifndef VEHICLE_SPIDERBOT_WEAPONS_H
-#define VEHICLE_SPIDERBOT_WEAPONS_H
-
-#include <common/weapons/all.qh>
-
-#endif
+#include "spiderbot_weapons.qh"
 
 #ifdef IMPLEMENTATION
 
 #ifdef SVQC
 
-// 400 (x2) DPS
-float autocvar_g_vehicle_spiderbot_minigun_damage = 24;
-float autocvar_g_vehicle_spiderbot_minigun_refire = 0.06;
-float autocvar_g_vehicle_spiderbot_minigun_spread = 0.015;
-int autocvar_g_vehicle_spiderbot_minigun_ammo_cost = 1;
-int autocvar_g_vehicle_spiderbot_minigun_ammo_max = 100;
-int autocvar_g_vehicle_spiderbot_minigun_ammo_regen = 40;
-float autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause = 1;
-float autocvar_g_vehicle_spiderbot_minigun_force = 9;
-float autocvar_g_vehicle_spiderbot_minigun_solidpenetration = 32;
-
-float autocvar_g_vehicle_spiderbot_rocket_damage = 50;
-float autocvar_g_vehicle_spiderbot_rocket_force = 150;
-float autocvar_g_vehicle_spiderbot_rocket_radius = 250;
-float autocvar_g_vehicle_spiderbot_rocket_speed = 3500;
-float autocvar_g_vehicle_spiderbot_rocket_spread = 0.05;
-float autocvar_g_vehicle_spiderbot_rocket_refire = 0.1;
-// volley
-float autocvar_g_vehicle_spiderbot_rocket_refire2 = 0.025;
-float autocvar_g_vehicle_spiderbot_rocket_reload = 4;
-float autocvar_g_vehicle_spiderbot_rocket_health = 100;
-float autocvar_g_vehicle_spiderbot_rocket_noise = 0.2;
-float autocvar_g_vehicle_spiderbot_rocket_turnrate = 0.25;
-float autocvar_g_vehicle_spiderbot_rocket_lifetime = 20;
-
 void spiderbot_rocket_artillery()
 {SELFPARAM();
     self.nextthink = time;
diff --git a/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qh b/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qh
new file mode 100644 (file)
index 0000000..f670b6f
--- /dev/null
@@ -0,0 +1,32 @@
+#pragma once
+
+#include <common/weapons/all.qh>
+
+#ifdef SVQC
+void spiderbot_rocket_do();
+#endif
+
+// 400 (x2) DPS
+float autocvar_g_vehicle_spiderbot_minigun_damage = 24;
+float autocvar_g_vehicle_spiderbot_minigun_refire = 0.06;
+float autocvar_g_vehicle_spiderbot_minigun_spread = 0.015;
+int autocvar_g_vehicle_spiderbot_minigun_ammo_cost = 1;
+int autocvar_g_vehicle_spiderbot_minigun_ammo_max = 100;
+int autocvar_g_vehicle_spiderbot_minigun_ammo_regen = 40;
+float autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause = 1;
+float autocvar_g_vehicle_spiderbot_minigun_force = 9;
+float autocvar_g_vehicle_spiderbot_minigun_solidpenetration = 32;
+
+float autocvar_g_vehicle_spiderbot_rocket_damage = 50;
+float autocvar_g_vehicle_spiderbot_rocket_force = 150;
+float autocvar_g_vehicle_spiderbot_rocket_radius = 250;
+float autocvar_g_vehicle_spiderbot_rocket_speed = 3500;
+float autocvar_g_vehicle_spiderbot_rocket_spread = 0.05;
+float autocvar_g_vehicle_spiderbot_rocket_refire = 0.1;
+// volley
+float autocvar_g_vehicle_spiderbot_rocket_refire2 = 0.025;
+float autocvar_g_vehicle_spiderbot_rocket_reload = 4;
+float autocvar_g_vehicle_spiderbot_rocket_health = 100;
+float autocvar_g_vehicle_spiderbot_rocket_noise = 0.2;
+float autocvar_g_vehicle_spiderbot_rocket_turnrate = 0.25;
+float autocvar_g_vehicle_spiderbot_rocket_lifetime = 20;
diff --git a/qcsrc/common/weapons/_mod.inc b/qcsrc/common/weapons/_mod.inc
new file mode 100644 (file)
index 0000000..d2c6fb8
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include "all.qc"
+#include "calculations.qc"
+#include "config.qc"
index bd5172bdace8100137285939c321c58a02306017..ef115b220d5e699df07c440c59bb2fc528fc8587 100644 (file)
@@ -3,6 +3,10 @@
 #include <common/items/item/pickup.qh>
 #include <common/stats.qh>
 
+#ifdef SVQC
+#include <common/effects/qc/all.qh>
+#endif
+
 const int MAX_WEAPONSLOTS = 2;
 .entity weaponentities[MAX_WEAPONSLOTS];
 
diff --git a/qcsrc/common/weapons/weapon/_mod.inc b/qcsrc/common/weapons/weapon/_mod.inc
new file mode 100644 (file)
index 0000000..7852f1e
--- /dev/null
@@ -0,0 +1,21 @@
+// generated file; do not modify
+#include "arc.qc"
+#include "blaster.qc"
+#include "crylink.qc"
+#include "devastator.qc"
+#include "electro.qc"
+#include "fireball.qc"
+#include "hagar.qc"
+#include "hlac.qc"
+#include "hook.qc"
+#include "machinegun.qc"
+#include "minelayer.qc"
+#include "mortar.qc"
+#include "porto.qc"
+#include "rifle.qc"
+#include "seeker.qc"
+#include "shockwave.qc"
+#include "shotgun.qc"
+#include "tuba.qc"
+#include "vaporizer.qc"
+#include "vortex.qc"
diff --git a/qcsrc/lib/_mod.inc b/qcsrc/lib/_mod.inc
new file mode 100644 (file)
index 0000000..fd811e7
--- /dev/null
@@ -0,0 +1,7 @@
+// generated file; do not modify
+#include "angle.qc"
+#include "p2mathlib.qc"
+#include "random.qc"
+#include "sortlist.qc"
+#include "test.qc"
+#include "urllib.qc"
diff --git a/qcsrc/lib/csqcmodel/_mod.inc b/qcsrc/lib/csqcmodel/_mod.inc
new file mode 100644 (file)
index 0000000..1d4c6ec
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include "cl_model.qc"
+#include "cl_player.qc"
+#include "interpolate.qc"
+#include "sv_model.qc"
index e4f8d289ebf4d5587310179bdd49977d9aeb8620..b2b1419abe5efa6cb77fdaed91f6e0bc0e8f06f9 100644 (file)
@@ -6,6 +6,7 @@
 
 #ifdef MENUQC
        #define NULL (0, null_entity)
+       #define world NULL
 #else
        #define NULL (0, world)
 #endif
diff --git a/qcsrc/lib/warpzone/_mod.inc b/qcsrc/lib/warpzone/_mod.inc
new file mode 100644 (file)
index 0000000..ef257d6
--- /dev/null
@@ -0,0 +1,7 @@
+// generated file; do not modify
+#include "anglestransform.qc"
+#include "client.qc"
+#include "common.qc"
+#include "mathlib.qc"
+#include "server.qc"
+#include "util_server.qc"
diff --git a/qcsrc/menu/_mod.inc b/qcsrc/menu/_mod.inc
new file mode 100644 (file)
index 0000000..589808e
--- /dev/null
@@ -0,0 +1,4 @@
+// generated file; do not modify
+#include "draw.qc"
+#include "item.qc"
+#include "menu.qc"
diff --git a/qcsrc/menu/anim/_mod.inc b/qcsrc/menu/anim/_mod.inc
new file mode 100644 (file)
index 0000000..c8048a1
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include "animation.qc"
+#include "animhost.qc"
+#include "easing.qc"
+#include "keyframe.qc"
index 3aa3e43057447ea63b43a8bb996d5881b36369f4..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -1,137 +1 @@
-#include "anim/animation.qc"
-#include "anim/animhost.qc"
-#include "anim/easing.qc"
-#include "anim/keyframe.qc"
 
-#include "item.qc"
-#include "item/borderimage.qc"
-#include "item/button.qc"
-#include "item/checkbox.qc"
-#include "item/container.qc"
-#include "item/dialog.qc"
-#include "item/image.qc"
-#include "item/inputbox.qc"
-#include "item/inputcontainer.qc"
-#include "item/label.qc"
-#include "item/listbox.qc"
-#include "item/modalcontroller.qc"
-#include "item/nexposee.qc"
-#include "item/radiobutton.qc"
-#include "item/slider.qc"
-#include "item/tab.qc"
-#include "item/textslider.qc"
-
-#include "xonotic/bigbutton.qc"
-#include "xonotic/bigcommandbutton.qc"
-#include "xonotic/button.qc"
-#include "xonotic/campaign.qc"
-#include "xonotic/charmap.qc"
-#include "xonotic/checkbox.qc"
-#include "xonotic/checkbox_slider_invalid.qc"
-#include "xonotic/checkbox_string.qc"
-#include "xonotic/colorbutton.qc"
-#include "xonotic/colorpicker.qc"
-#include "xonotic/colorpicker_string.qc"
-#include "xonotic/commandbutton.qc"
-#include "xonotic/credits.qc"
-#include "xonotic/crosshairpicker.qc"
-#include "xonotic/crosshairpreview.qc"
-#include "xonotic/cvarlist.qc"
-#include "xonotic/datasource.qc"
-#include "xonotic/demolist.qc"
-#include "xonotic/dialog.qc"
-#include "xonotic/dialog_credits.qc"
-#include "xonotic/dialog_firstrun.qc"
-#include "xonotic/dialog_hudpanel_ammo.qc"
-#include "xonotic/dialog_hudpanel_centerprint.qc"
-#include "xonotic/dialog_hudpanel_chat.qc"
-#include "xonotic/dialog_hudpanel_engineinfo.qc"
-#include "xonotic/dialog_hudpanel_healtharmor.qc"
-#include "xonotic/dialog_hudpanel_infomessages.qc"
-#include "xonotic/dialog_hudpanel_itemstime.qc"
-#include "xonotic/dialog_hudpanel_modicons.qc"
-#include "xonotic/dialog_hudpanel_notification.qc"
-#include "xonotic/dialog_hudpanel_physics.qc"
-#include "xonotic/dialog_hudpanel_powerups.qc"
-#include "xonotic/dialog_hudpanel_pressedkeys.qc"
-#include "xonotic/dialog_hudpanel_quickmenu.qc"
-#include "xonotic/dialog_hudpanel_racetimer.qc"
-#include "xonotic/dialog_hudpanel_radar.qc"
-#include "xonotic/dialog_hudpanel_score.qc"
-#include "xonotic/dialog_hudpanel_timer.qc"
-#include "xonotic/dialog_hudpanel_vote.qc"
-#include "xonotic/dialog_hudpanel_weapons.qc"
-#include "xonotic/dialog_hudsetup_exit.qc"
-#include "xonotic/dialog_monstertools.qc"
-#include "xonotic/dialog_multiplayer.qc"
-#include "xonotic/dialog_multiplayer_create.qc"
-#include "xonotic/dialog_multiplayer_create_mapinfo.qc"
-#include "xonotic/dialog_multiplayer_create_mutators.qc"
-#include "xonotic/dialog_multiplayer_join.qc"
-#include "xonotic/dialog_multiplayer_join_serverinfo.qc"
-#include "xonotic/dialog_multiplayer_media.qc"
-#include "xonotic/dialog_multiplayer_media_demo.qc"
-#include "xonotic/dialog_multiplayer_media_demo_startconfirm.qc"
-#include "xonotic/dialog_multiplayer_media_demo_timeconfirm.qc"
-#include "xonotic/dialog_multiplayer_media_musicplayer.qc"
-#include "xonotic/dialog_multiplayer_media_screenshot.qc"
-#include "xonotic/dialog_multiplayer_media_screenshot_viewer.qc"
-#include "xonotic/dialog_multiplayer_profile.qc"
-#include "xonotic/dialog_quit.qc"
-#include "xonotic/dialog_sandboxtools.qc"
-#include "xonotic/dialog_settings.qc"
-#include "xonotic/dialog_settings_audio.qc"
-#include "xonotic/dialog_settings_effects.qc"
-#include "xonotic/dialog_settings_game.qc"
-#include "xonotic/dialog_settings_game_crosshair.qc"
-#include "xonotic/dialog_settings_game_hudconfirm.qc"
-#include "xonotic/dialog_settings_game_hud.qc"
-#include "xonotic/dialog_settings_game_messages.qc"
-#include "xonotic/dialog_settings_game_model.qc"
-#include "xonotic/dialog_settings_game_view.qc"
-#include "xonotic/dialog_settings_game_weapons.qc"
-#include "xonotic/dialog_settings_input.qc"
-#include "xonotic/dialog_settings_input_userbind.qc"
-#include "xonotic/dialog_settings_misc.qc"
-#include "xonotic/dialog_settings_misc_cvars.qc"
-#include "xonotic/dialog_settings_misc_reset.qc"
-#include "xonotic/dialog_settings_user.qc"
-#include "xonotic/dialog_settings_user_languagewarning.qc"
-#include "xonotic/dialog_settings_video.qc"
-#include "xonotic/dialog_singleplayer.qc"
-#include "xonotic/dialog_singleplayer_winner.qc"
-#include "xonotic/dialog_teamselect.qc"
-#include "xonotic/gametypelist.qc"
-#include "xonotic/hudskinlist.qc"
-#include "xonotic/image.qc"
-#include "xonotic/inputbox.qc"
-#include "xonotic/keybinder.qc"
-#include "xonotic/languagelist.qc"
-#include "xonotic/listbox.qc"
-#include "xonotic/mainwindow.qc"
-#include "xonotic/maplist.qc"
-#include "xonotic/nexposee.qc"
-#include "xonotic/picker.qc"
-#include "xonotic/playerlist.qc"
-#include "xonotic/playermodel.qc"
-#include "xonotic/playlist.qc"
-#include "xonotic/radiobutton.qc"
-#include "xonotic/rootdialog.qc"
-#include "xonotic/screenshotimage.qc"
-#include "xonotic/screenshotlist.qc"
-#include "xonotic/serverlist.qc"
-#include "xonotic/skinlist.qc"
-#include "xonotic/slider.qc"
-#include "xonotic/slider_decibels.qc"
-#include "xonotic/slider_particles.qc"
-#include "xonotic/slider_picmip.qc"
-#include "xonotic/slider_resolution.qc"
-#include "xonotic/slider_sbfadetime.qc"
-#include "xonotic/soundlist.qc"
-#include "xonotic/statslist.qc"
-#include "xonotic/tabcontroller.qc"
-#include "xonotic/tab.qc"
-#include "xonotic/textlabel.qc"
-#include "xonotic/textslider.qc"
-#include "xonotic/weaponarenacheckbox.qc"
-#include "xonotic/weaponslist.qc"
diff --git a/qcsrc/menu/command/_mod.inc b/qcsrc/menu/command/_mod.inc
new file mode 100644 (file)
index 0000000..061d60a
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "all.qc"
+#include "menu_cmd.qc"
diff --git a/qcsrc/menu/command/all.qc b/qcsrc/menu/command/all.qc
new file mode 100644 (file)
index 0000000..283cca0
--- /dev/null
@@ -0,0 +1 @@
+#include <common/command/all.qc>
index edac51ce7256311fa1bb19f97aef239f53635dd0..1d31e95a9c7d5c513ea9f2766da4c574a1d7eca3 100644 (file)
@@ -89,6 +89,8 @@
                return 0;  // unhandled
        }
 
+    void m_play_focus_sound();
+
        METHOD(Item, focusEnter, void(Item this))
        {
                if (this.allowFocusSound) m_play_focus_sound();
diff --git a/qcsrc/menu/item/_mod.inc b/qcsrc/menu/item/_mod.inc
new file mode 100644 (file)
index 0000000..a470788
--- /dev/null
@@ -0,0 +1,17 @@
+// generated file; do not modify
+#include "borderimage.qc"
+#include "button.qc"
+#include "checkbox.qc"
+#include "container.qc"
+#include "dialog.qc"
+#include "image.qc"
+#include "inputbox.qc"
+#include "inputcontainer.qc"
+#include "label.qc"
+#include "listbox.qc"
+#include "modalcontroller.qc"
+#include "nexposee.qc"
+#include "radiobutton.qc"
+#include "slider.qc"
+#include "tab.qc"
+#include "textslider.qc"
diff --git a/qcsrc/menu/mutators/_mod.inc b/qcsrc/menu/mutators/_mod.inc
new file mode 100644 (file)
index 0000000..98fb481
--- /dev/null
@@ -0,0 +1 @@
+// generated file; do not modify
index b032f6e906f0405777ec2f7e9ca1991603ba40c8..57a34c36c7d9c0776876957a32968222b36e8f45 100644 (file)
@@ -1,16 +1,11 @@
-#include "../lib/_all.inc"
-
-#define world NULL
-
-#include "classes.inc"
-
-#include "draw.qc"
-#include "menu.qc"
-
-#include <common/command/all.qc>
-#include "command/menu_cmd.qc"
-
-#include "xonotic/util.qc"
+#include <lib/_all.inc>
+
+#include "_mod.inc"
+#include "anim/_mod.inc"
+#include "command/_mod.inc"
+#include "item/_mod.inc"
+#include "mutators/_mod.inc"
+#include "xonotic/_mod.inc"
 
 #include <common/_all.inc>
 
diff --git a/qcsrc/menu/xonotic/_mod.inc b/qcsrc/menu/xonotic/_mod.inc
new file mode 100644 (file)
index 0000000..4702bbf
--- /dev/null
@@ -0,0 +1,116 @@
+// generated file; do not modify
+#include "bigbutton.qc"
+#include "bigcommandbutton.qc"
+#include "button.qc"
+#include "campaign.qc"
+#include "charmap.qc"
+#include "checkbox.qc"
+#include "checkbox_slider_invalid.qc"
+#include "checkbox_string.qc"
+#include "colorbutton.qc"
+#include "colorpicker.qc"
+#include "colorpicker_string.qc"
+#include "commandbutton.qc"
+#include "credits.qc"
+#include "crosshairpicker.qc"
+#include "crosshairpreview.qc"
+#include "cvarlist.qc"
+#include "datasource.qc"
+#include "demolist.qc"
+#include "dialog.qc"
+#include "dialog_credits.qc"
+#include "dialog_firstrun.qc"
+#include "dialog_hudpanel_ammo.qc"
+#include "dialog_hudpanel_centerprint.qc"
+#include "dialog_hudpanel_chat.qc"
+#include "dialog_hudpanel_engineinfo.qc"
+#include "dialog_hudpanel_healtharmor.qc"
+#include "dialog_hudpanel_infomessages.qc"
+#include "dialog_hudpanel_itemstime.qc"
+#include "dialog_hudpanel_modicons.qc"
+#include "dialog_hudpanel_notification.qc"
+#include "dialog_hudpanel_physics.qc"
+#include "dialog_hudpanel_powerups.qc"
+#include "dialog_hudpanel_pressedkeys.qc"
+#include "dialog_hudpanel_quickmenu.qc"
+#include "dialog_hudpanel_racetimer.qc"
+#include "dialog_hudpanel_radar.qc"
+#include "dialog_hudpanel_score.qc"
+#include "dialog_hudpanel_timer.qc"
+#include "dialog_hudpanel_vote.qc"
+#include "dialog_hudpanel_weapons.qc"
+#include "dialog_hudsetup_exit.qc"
+#include "dialog_monstertools.qc"
+#include "dialog_multiplayer.qc"
+#include "dialog_multiplayer_create.qc"
+#include "dialog_multiplayer_create_mapinfo.qc"
+#include "dialog_multiplayer_create_mutators.qc"
+#include "dialog_multiplayer_join.qc"
+#include "dialog_multiplayer_join_serverinfo.qc"
+#include "dialog_multiplayer_media.qc"
+#include "dialog_multiplayer_media_demo.qc"
+#include "dialog_multiplayer_media_demo_startconfirm.qc"
+#include "dialog_multiplayer_media_demo_timeconfirm.qc"
+#include "dialog_multiplayer_media_musicplayer.qc"
+#include "dialog_multiplayer_media_screenshot.qc"
+#include "dialog_multiplayer_media_screenshot_viewer.qc"
+#include "dialog_multiplayer_profile.qc"
+#include "dialog_quit.qc"
+#include "dialog_sandboxtools.qc"
+#include "dialog_settings.qc"
+#include "dialog_settings_audio.qc"
+#include "dialog_settings_effects.qc"
+#include "dialog_settings_game.qc"
+#include "dialog_settings_game_crosshair.qc"
+#include "dialog_settings_game_hud.qc"
+#include "dialog_settings_game_hudconfirm.qc"
+#include "dialog_settings_game_messages.qc"
+#include "dialog_settings_game_model.qc"
+#include "dialog_settings_game_view.qc"
+#include "dialog_settings_game_weapons.qc"
+#include "dialog_settings_input.qc"
+#include "dialog_settings_input_userbind.qc"
+#include "dialog_settings_misc.qc"
+#include "dialog_settings_misc_cvars.qc"
+#include "dialog_settings_misc_reset.qc"
+#include "dialog_settings_user.qc"
+#include "dialog_settings_user_languagewarning.qc"
+#include "dialog_settings_video.qc"
+#include "dialog_singleplayer.qc"
+#include "dialog_singleplayer_winner.qc"
+#include "dialog_teamselect.qc"
+#include "gametypelist.qc"
+#include "hudskinlist.qc"
+#include "image.qc"
+#include "inputbox.qc"
+#include "keybinder.qc"
+#include "languagelist.qc"
+#include "listbox.qc"
+#include "mainwindow.qc"
+#include "maplist.qc"
+#include "nexposee.qc"
+#include "picker.qc"
+#include "playerlist.qc"
+#include "playermodel.qc"
+#include "playlist.qc"
+#include "radiobutton.qc"
+#include "rootdialog.qc"
+#include "screenshotimage.qc"
+#include "screenshotlist.qc"
+#include "serverlist.qc"
+#include "skinlist.qc"
+#include "slider.qc"
+#include "slider_decibels.qc"
+#include "slider_particles.qc"
+#include "slider_picmip.qc"
+#include "slider_resolution.qc"
+#include "slider_sbfadetime.qc"
+#include "soundlist.qc"
+#include "statslist.qc"
+#include "tab.qc"
+#include "tabcontroller.qc"
+#include "textlabel.qc"
+#include "textslider.qc"
+#include "util.qc"
+#include "weaponarenacheckbox.qc"
+#include "weaponslist.qc"
diff --git a/qcsrc/server/_mod.inc b/qcsrc/server/_mod.inc
new file mode 100644 (file)
index 0000000..d502c48
--- /dev/null
@@ -0,0 +1,32 @@
+// generated file; do not modify
+#include "anticheat.qc"
+#include "antilag.qc"
+#include "campaign.qc"
+#include "cheats.qc"
+#include "cl_client.qc"
+#include "cl_impulse.qc"
+#include "cl_player.qc"
+#include "g_damage.qc"
+#include "g_hook.qc"
+#include "g_lights.qc"
+#include "g_models.qc"
+#include "g_subs.qc"
+#include "g_world.qc"
+#include "ipban.qc"
+#include "item_key.qc"
+#include "mapvoting.qc"
+#include "miscfunctions.qc"
+#include "playerdemo.qc"
+#include "portals.qc"
+#include "race.qc"
+#include "round_handler.qc"
+#include "scores.qc"
+#include "scores_rules.qc"
+#include "spawnpoints.qc"
+#include "steerlib.qc"
+#include "sv_main.qc"
+#include "teamplay.qc"
+#include "tests.qc"
+#include "t_halflife.qc"
+#include "t_quake.qc"
+#include "t_quake3.qc"
diff --git a/qcsrc/server/bot/_all.inc b/qcsrc/server/bot/_all.inc
deleted file mode 100644 (file)
index 2965baa..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "aim.qc"
-#include "bot.qc"
-#include "navigation.qc"
-#include "scripting.qc"
-#include "waypoints.qc"
-
-#include "havocbot/_all.inc"
diff --git a/qcsrc/server/bot/_mod.inc b/qcsrc/server/bot/_mod.inc
new file mode 100644 (file)
index 0000000..02ef867
--- /dev/null
@@ -0,0 +1,6 @@
+// generated file; do not modify
+#include "aim.qc"
+#include "bot.qc"
+#include "navigation.qc"
+#include "scripting.qc"
+#include "waypoints.qc"
diff --git a/qcsrc/server/bot/havocbot/_all.inc b/qcsrc/server/bot/havocbot/_all.inc
deleted file mode 100644 (file)
index 2dd8c74..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "havocbot.qc"
-#include "roles.qc"
diff --git a/qcsrc/server/bot/havocbot/_mod.inc b/qcsrc/server/bot/havocbot/_mod.inc
new file mode 100644 (file)
index 0000000..fa2d660
--- /dev/null
@@ -0,0 +1,3 @@
+// generated file; do not modify
+#include "havocbot.qc"
+#include "roles.qc"
diff --git a/qcsrc/server/command/_mod.inc b/qcsrc/server/command/_mod.inc
new file mode 100644 (file)
index 0000000..1f2b37a
--- /dev/null
@@ -0,0 +1,9 @@
+// generated file; do not modify
+#include "all.qc"
+#include "banning.qc"
+#include "cmd.qc"
+#include "common.qc"
+#include "getreplies.qc"
+#include "radarmap.qc"
+#include "sv_cmd.qc"
+#include "vote.qc"
index c6d30cb7fde24c4b59ca640edd3ca39feb8c8f7e..bc15eeb689560fbaa07b91647cbd6cbe15ff1bdd 100644 (file)
@@ -1,11 +1,2 @@
 #include "all.qh"
 #include <common/command/all.qc>
-
-#include "sv_cmd.qc"
-
-#include "banning.qc"
-#include "cmd.qc"
-#include "common.qc"
-#include "getreplies.qc"
-#include "radarmap.qc"
-#include "vote.qc"
diff --git a/qcsrc/server/mutators/_mod.inc b/qcsrc/server/mutators/_mod.inc
new file mode 100644 (file)
index 0000000..254d13d
--- /dev/null
@@ -0,0 +1,2 @@
+// generated file; do not modify
+#include "all.qc"
diff --git a/qcsrc/server/mutators/mutator/_mod.inc b/qcsrc/server/mutators/mutator/_mod.inc
new file mode 100644 (file)
index 0000000..c56c2db
--- /dev/null
@@ -0,0 +1,14 @@
+// generated file; do not modify
+#include "gamemode_assault.qc"
+#include "gamemode_ca.qc"
+#include "gamemode_ctf.qc"
+#include "gamemode_cts.qc"
+#include "gamemode_deathmatch.qc"
+#include "gamemode_domination.qc"
+#include "gamemode_freezetag.qc"
+#include "gamemode_invasion.qc"
+#include "gamemode_keepaway.qc"
+#include "gamemode_keyhunt.qc"
+#include "gamemode_lms.qc"
+#include "gamemode_race.qc"
+#include "gamemode_tdm.qc"
diff --git a/qcsrc/server/pathlib/_mod.inc b/qcsrc/server/pathlib/_mod.inc
new file mode 100644 (file)
index 0000000..c737f24
--- /dev/null
@@ -0,0 +1,8 @@
+// generated file; do not modify
+#include "costs.qc"
+#include "debug.qc"
+#include "expandnode.qc"
+#include "main.qc"
+#include "movenode.qc"
+#include "path_waypoint.qc"
+#include "utility.qc"
index a26f56f8e4e42605f0a599d40635e788f7542ec1..2c7eb92536fe73e2255453d417caecc539642982 100644 (file)
@@ -1,67 +1,27 @@
-#include "../lib/_all.inc"
-#include "_all.qh"
-
-#include "../common/effects/qc/all.qc"
-
-#include "anticheat.qc"
-#include "antilag.qc"
-#include "campaign.qc"
-#include "cheats.qc"
-#include "cl_client.qc"
-#include "cl_impulse.qc"
-#include "cl_player.qc"
-#include "g_damage.qc"
-#include "g_hook.qc"
-// #include "g_lights.qc" // TODO: was never used
-#include "g_models.qc"
-#include "g_subs.qc"
-#include "g_world.qc"
-#include "ipban.qc"
-#include "item_key.qc"
-#include "mapvoting.qc"
-#include "miscfunctions.qc"
-#include "playerdemo.qc"
-#include "portals.qc"
-#include "race.qc"
-#include "round_handler.qc"
-#include "scores.qc"
-#include "scores_rules.qc"
-#include "spawnpoints.qc"
-#include "steerlib.qc"
-#include "sv_main.qc"
-#include "teamplay.qc"
-#include "t_halflife.qc"
-#include "t_quake3.qc"
-#include "t_quake.qc"
-
-#include "tests.qc"
-
-#include "bot/_all.inc"
+#ifndef DEBUGPATHING
+       #define DEBUGPATHING 0
+#endif
 
-#include "command/all.qc"
+#include <lib/_all.inc>
+#include "_all.qh"
 
+#include "_mod.inc"
+#include "bot/_mod.inc"
+#include "bot/havocbot/_mod.inc"
+#include "command/_mod.inc"
+#include "mutators/_mod.inc"
 #include "pathlib/_all.inc"
+#include "weapons/_mod.inc"
 
-#include "weapons/accuracy.qc"
-#include "weapons/common.qc"
-#include "weapons/csqcprojectile.qc" // TODO
-#include "weapons/hitplot.qc"
-#include "weapons/selection.qc"
-#include "weapons/spawning.qc"
-#include "weapons/throwing.qc"
-#include "weapons/tracing.qc"
-#include "weapons/weaponstats.qc"
-#include "weapons/weaponsystem.qc"
-
-#include "../common/_all.inc"
-#include "mutators/all.qc"
+#include <common/_all.inc>
+#include <common/effects/qc/all.qc>
 
-#include "../lib/csqcmodel/sv_model.qc"
+#include <lib/csqcmodel/sv_model.qc>
 
-#include "../lib/warpzone/anglestransform.qc"
-#include "../lib/warpzone/common.qc"
-#include "../lib/warpzone/server.qc"
-#include "../lib/warpzone/util_server.qc"
+#include <lib/warpzone/anglestransform.qc>
+#include <lib/warpzone/common.qc>
+#include <lib/warpzone/server.qc>
+#include <lib/warpzone/util_server.qc>
 
 #if BUILD_MOD
 #include "../../mod/server/progs.inc"
diff --git a/qcsrc/server/weapons/_mod.inc b/qcsrc/server/weapons/_mod.inc
new file mode 100644 (file)
index 0000000..cb24b27
--- /dev/null
@@ -0,0 +1,11 @@
+// generated file; do not modify
+#include "accuracy.qc"
+#include "common.qc"
+#include "csqcprojectile.qc"
+#include "hitplot.qc"
+#include "selection.qc"
+#include "spawning.qc"
+#include "throwing.qc"
+#include "tracing.qc"
+#include "weaponstats.qc"
+#include "weaponsystem.qc"
diff --git a/qcsrc/tools/genmod.sh b/qcsrc/tools/genmod.sh
new file mode 100755 (executable)
index 0000000..269c631
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+set -eu
+cd "$(dirname "$0")"
+cd ..
+
+MOD=_mod.inc
+
+function genmod() {
+    echo '// generated file; do not modify' > ${MOD}
+    for f in $(ls | sort -k 1,1 -t .); do
+        if [[ "$f" == *.qc ]]; then echo "#include \"$f\"" >> ${MOD}; fi
+    done
+    # echo >> ${MOD}
+    for f in *; do if [ -d "$f" ]; then
+        (cd -- "$f" && genmod)
+        # echo "#include \"$f/MOD\"" >> ${MOD}
+    fi; done
+}
+
+(cd lib; genmod)
+(cd common; genmod)
+(cd client; genmod)
+(cd server; genmod)
+(cd menu; genmod)