-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "../common/stats.qh"
- #include "../common/util.qh"
- #include "autocvars.qh"
- #include "../common/notifications.qh"
- #include "main.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "announcer.qh"
+
+#include "autocvars.qh"
+#include "main.qh"
+#include "../common/notifications.qh"
+#include "../common/stats.qh"
+#include "../common/util.qh"
+#include "../dpdefs/csprogsdefs.qh"
bool announcer_1min;
bool announcer_5min;
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
- #include "../common/util.qh"
- #include "autocvars.qh"
- #include "bgmscript.qh"
- #include "main.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "bgmscript.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "../common/util.qh"
+#include "../dpdefs/csprogsdefs.qh"
#define CONSTANT_SPEED_DECAY
-#if defined(CSQC)
- #include "autocvars.qh"
- #include "../common/util.qh"
- #include "defs.qh"
- #include "main.qh"
- #include "movetypes.qh"
- #include "prandom.qh"
- #include "rubble.qh"
-
- .float cnt;
- .float alpha;
- .int state;
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "casings.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "rubble.qh"
+#include "../common/util.qh"
+
+.float cnt;
+.float alpha;
+.int state;
entityclass(Casing)
class(Casing) .bool silent;
#include "cl_cmd.qh"
-#include "../../common/mapinfo.qh"
-#include "../../common/command/generic.qh"
-#include "../../common/command/shared_defs.qh"
#include "../autocvars.qh"
#include "../defs.qh"
#include "../hud.qh"
#include "../mapvoting.qh"
#include "../miscfunctions.qh"
#include "../scoreboard.qh"
+#include "../../common/command/generic.qh"
+#include "../../common/command/shared_defs.qh"
+#include "../../common/mapinfo.qh"
void DrawDebugModel()
{
-#if defined(CSQC)
- #include "defs.qh"
- #include "gibs.qh"
- #include "miscfunctions.qh"
- #include "player_skeleton.qh"
- #include "sortlist.qh"
- #include "main.qh"
-
- #include "../client/autocvars.qh"
- #include "../client/weapons/projectile.qh"
-
- #include "../common/animdecide.qh"
- #include "../common/csqcmodel_settings.qh"
- #include "../common/teams.qh"
-
- #include "../csqcmodellib/cl_model.qh"
- #include "../csqcmodellib/cl_player.qh"
- #include "../csqcmodellib/interpolate.qh"
-
- #include "../warpzonelib/mathlib.qh"
-
- .float death_time;
- .int modelflags;
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
-
+#include "csqcmodel_hooks.qh"
+
+#include "defs.qh"
+#include "gibs.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
+#include "player_skeleton.qh"
+#include "sortlist.qh"
+#include "../client/autocvars.qh"
+#include "../client/weapons/projectile.qh"
+#include "../common/animdecide.qh"
+#include "../common/csqcmodel_settings.qh"
+#include "../common/teams.qh"
+#include "../csqcmodellib/cl_model.qh"
+#include "../csqcmodellib/cl_player.qh"
+#include "../csqcmodellib/interpolate.qh"
+#include "../warpzonelib/mathlib.qh"
+
+.float death_time;
+.int modelflags;
void CSQCModel_Hook_PreDraw(bool isplayer);
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "../common/constants.qh"
- #include "../common/util.qh"
- #include "../common/deathtypes.qh"
- #include "../common/weapons/weapons.qh"
- #include "vehicles/vehicles.qh"
- #include "autocvars.qh"
- #include "defs.qh"
- #include "damage.qh"
- #include "gibs.qh"
- #include "movetypes.qh"
- #include "prandom.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "damage.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "gibs.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "vehicles/vehicles.qh"
+#include "../common/constants.qh"
+#include "../common/deathtypes.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
+#include "../dpdefs/csprogsdefs.qh"
.entity tag_entity;
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "autocvars.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "effects.qh"
+
+#include "autocvars.qh"
+#include "../dpdefs/csprogsdefs.qh"
/*
.vector fx_start;
#include "miscfunctions.qh"
#include "noise.qh"
#include "../common/teams.qh"
+#include "../csqcmodellib/interpolate.qh"
#include "../warpzonelib/common.qh"
#include "../warpzonelib/mathlib.qh"
-#include "../csqcmodellib/interpolate.qh"
entityclass(Hook)
class(Hook) .float HookType; // ENT_CLIENT_*
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
- #include "miscfunctions.qh"
- #include "../dpdefs/keycodes.qh"
- #include "../common/constants.qh"
- #include "autocvars.qh"
- #include "hud.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "hud_config.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "miscfunctions.qh"
+#include "../common/constants.qh"
+#include "../dpdefs/csprogsdefs.qh"
+#include "../dpdefs/keycodes.qh"
#define HUD_Write(s) fputs(fh, s)
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "../common/buffs.qh"
- #include "../csqcmodellib/interpolate.qh"
- #include "hook.qh"
- #include "main.qh"
- #include "../csqcmodellib/cl_model.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "laser.qh"
+
+#include "hook.qh"
+#include "main.qh"
+#include "../common/buffs.qh"
+#include "../csqcmodellib/cl_model.qh"
+#include "../csqcmodellib/interpolate.qh"
+#include "../dpdefs/csprogsdefs.qh"
// a laser goes from origin in direction angles
#include "defs.qh"
#include "effects.qh"
#include "gibs.qh"
+#include "hook.qh"
#include "hud.qh"
#include "hud_config.qh"
-#include "hook.qh"
#include "laser.qh"
#include "mapvoting.qh"
+#include "miscfunctions.qh"
#include "modeleffects.qh"
#include "particles.qh"
+#include "prandom.qh"
#include "scoreboard.qh"
#include "shownames.qh"
#include "sortlist.qh"
#include "target_music.qh"
#include "tturrets.qh"
#include "tuba.qh"
+#include "vehicles/vehicles.qh"
#include "wall.qh"
#include "waypointsprites.qh"
-#include "miscfunctions.qh"
-#include "prandom.qh"
-
-#include "vehicles/vehicles.qh"
-
#include "weapons/projectile.qh"
-
-#include "../server/vehicles/bumblebee.qh"
-#include "../server/t_items.qh"
-
#include "../common/buffs.qh"
#include "../common/deathtypes.qh"
#include "../common/mapinfo.qh"
-#include "../common/notifications.qh"
+#include "../common/monsters/monsters.qh"
+#include "../common/nades.qh"
#include "../common/net_notice.qh"
+#include "../common/notifications.qh"
#include "../common/stats.qh"
#include "../common/teams.qh"
-
#include "../common/weapons/weapons.qh"
-#include "../common/monsters/monsters.qh"
-#include "../common/nades.qh"
-
#include "../csqcmodellib/cl_model.qh"
#include "../csqcmodellib/interpolate.qh"
-
+#include "../server/t_items.qh"
+#include "../server/vehicles/bumblebee.qh"
#include "../warpzonelib/client.qh"
// --------------------------------------------------------------------------
#include "mapvoting.qh"
-#include "hud.qh"
-#include "../dpdefs/keycodes.qh"
+
#include "autocvars.qh"
#include "defs.qh"
+#include "hud.qh"
#include "main.qh"
-#include "../common/mapinfo.qh"
#include "miscfunctions.qh"
#include "scoreboard.qh"
-
+#include "../common/mapinfo.qh"
#include "../common/util.qh"
+#include "../dpdefs/keycodes.qh"
string MapVote_FormatMapItem(int id, string map, float _count, float maxwidth, vector fontsize)
{
#include "miscfunctions.qh"
-#include "../common/teams.qh"
-#include "../common/urllib.qh"
-#include "../common/util.qh"
-#include "../common/command/generic.qh"
-#include "../csqcmodellib/cl_model.qh"
-#include "../warpzonelib/mathlib.qh"
#include "autocvars.qh"
#include "defs.qh"
#include "hud.qh"
#include "main.qh"
#include "sortlist.qh"
+#include "../common/command/generic.qh"
+#include "../common/teams.qh"
+#include "../common/urllib.qh"
+#include "../common/util.qh"
+#include "../csqcmodellib/cl_model.qh"
+#include "../warpzonelib/mathlib.qh"
void AuditLists()
{
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
- #include "../common/stats.qh"
- #include "../common/util.qh"
- #include "movetypes.qh"
- #include "../csqcmodellib/common.qh"
- #include "../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "movetypes.qh"
+
+#include "defs.qh"
+#include "../common/stats.qh"
+#include "../common/util.qh"
+#include "../csqcmodellib/common.qh"
+#include "../dpdefs/csprogsdefs.qh"
+#include "../server/t_items.qh"
const int MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = 4;
+#include "noise.qh"
+
#if defined(CSQC)
#include "../dpdefs/csprogsdefs.qh"
- #include "noise.qh"
#elif defined(MENUQC)
#elif defined(SVQC)
#endif
#include "particles.qh"
-#include "../common/util.qh"
#include "autocvars.qh"
#include "bgmscript.qh"
#include "main.qh"
#include "../common/stats.qh"
+#include "../common/util.qh"
#include "../warpzonelib/common.qh"
void Draw_PointParticles()
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "../warpzonelib/mathlib.qh"
- #include "prandom.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "prandom.qh"
+
+#include "../dpdefs/csprogsdefs.qh"
+#include "../warpzonelib/mathlib.qh"
// prandom - PREDICTABLE random number generator (not seeded yet)
effects.qc
gibs.qc
hook.qc
-hud_config.qc
hud.qc
+hud_config.qc
laser.qc
main.qc
mapvoting.qc
-#if defined(CSQC)
- #include "rubble.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "rubble.qh"
// LordHavoc: rewrote this file, it was really bad code
#include "scoreboard.qh"
#include "autocvars.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
#include "miscfunctions.qh"
+#include "sortlist.qh"
#include "../common/constants.qh"
#include "../common/counting.qh"
#include "../common/mapinfo.qh"
#include "../common/stats.qh"
#include "../common/teams.qh"
#include "../common/util.qh"
-#include "defs.qh"
-#include "hud.qh"
-#include "main.qh"
-#include "sortlist.qh"
float scoreboard_alpha_bg;
float scoreboard_alpha_fg;
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
- #include "../common/constants.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include "../common/mapinfo.qh"
- #include "autocvars.qh"
- #include "main.qh"
- #include "../csqcmodellib/cl_model.qh"
- #include "shownames.qh"
- #include "hud.qh"
- #include "miscfunctions.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "shownames.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
+#include "../common/constants.qh"
+#include "../common/mapinfo.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+#include "../csqcmodellib/cl_model.qh"
+#include "../dpdefs/csprogsdefs.qh"
// self.isactive = player is in range and coordinates/status (health and armor) are up to date
#include "autocvars.qh"
#include "defs.qh"
#include "main.qh"
-#include "../common/util.qh"
#include "../common/constants.qh"
+#include "../common/util.qh"
#include "../warpzonelib/common.qh"
.string noise;
-#if defined(CSQC)
- #include "autocvars.qh"
- #include "defs.qh"
- #include "hud.qh"
- #include "main.qh"
- #include "miscfunctions.qh"
- #include "teamradar.qh"
- #include "../common/util.qh"
- #include "../csqcmodellib/interpolate.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "teamradar.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
+#include "../common/util.qh"
+#include "../csqcmodellib/interpolate.qh"
float vlen2d(vector v)
{
#include "autocvars.qh"
#include "defs.qh"
-#include "main.qh"
#include "hud.qh"
+#include "main.qh"
#include "miscfunctions.qh"
-#include "waypointsprites.qh"
#include "movetypes.qh"
#include "prandom.qh"
#include "teamradar.qh"
-
+#include "waypointsprites.qh"
#include "../common/teams.qh"
#include "../server/movelib.qh"
#include "../warpzonelib/anglestransform.qh"
-#include "../../dpdefs/csprogsdefs.qh"
-#include "../../common/constants.qh"
-#include "../../common/stats.qh"
-#include "../../common/util.qh"
-#include "../../common/buffs.qh"
-#include "../../csqcmodellib/cl_model.qh"
-#include "../../server/t_items.qh"
+#include "vehicles.qh"
+
+#include "../autocvars.qh"
#include "../defs.qh"
+#include "../main.qh"
#include "../miscfunctions.qh"
#include "../movetypes.qh"
-#include "../scoreboard.qh"
-#include "../autocvars.qh"
#include "../movetypes.qh"
#include "../prandom.qh"
-#include "../main.qh"
-#include "vehicles.qh"
+#include "../scoreboard.qh"
+#include "../../common/buffs.qh"
+#include "../../common/constants.qh"
+#include "../../common/stats.qh"
+#include "../../common/util.qh"
+#include "../../csqcmodellib/cl_model.qh"
+#include "../../dpdefs/csprogsdefs.qh"
+#include "../../server/t_items.qh"
.float cnt;
-#if defined(CSQC)
- #include "../dpdefs/csprogsdefs.qh"
- #include "defs.qh"
- #include "../common/constants.qh"
- #include "../common/stats.qh"
- #include "../warpzonelib/mathlib.qh"
- #include "../warpzonelib/common.qh"
- #include "../warpzonelib/client.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include "../common/nades.qh"
- #include "../common/weapons/weapons.qh"
- #include "../common/mapinfo.qh"
- #include "autocvars.qh"
- #include "announcer.qh"
- #include "hud.qh"
- #include "hud_config.qh"
- #include "hook.qh"
- #include "mapvoting.qh"
- #include "miscfunctions.qh"
- #include "scoreboard.qh"
- #include "shownames.qh"
- #include "target_music.qh"
- #include "noise.qh"
- #include "main.qh"
- #include "waypointsprites.qh"
- #include "vehicles/vehicles.qh"
- #include "../csqcmodellib/cl_player.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "announcer.qh"
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hook.qh"
+#include "hud.qh"
+#include "hud_config.qh"
+#include "main.qh"
+#include "mapvoting.qh"
+#include "miscfunctions.qh"
+#include "noise.qh"
+#include "scoreboard.qh"
+#include "shownames.qh"
+#include "target_music.qh"
+#include "vehicles/vehicles.qh"
+#include "waypointsprites.qh"
+#include "../common/constants.qh"
+#include "../common/mapinfo.qh"
+#include "../common/nades.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+#include "../common/weapons/weapons.qh"
+#include "../csqcmodellib/cl_player.qh"
+#include "../dpdefs/csprogsdefs.qh"
+#include "../warpzonelib/client.qh"
+#include "../warpzonelib/common.qh"
+#include "../warpzonelib/mathlib.qh"
entity porto;
vector polyline[16];
+#include "projectile.qh"
+
+#include "../autocvars.qh"
+#include "../defs.qh"
+#include "../main.qh"
+#include "../movetypes.qh"
#include "../../common/constants.qh"
#include "../../common/nades.qh"
#include "../../common/util.qh"
#include "../../csqcmodellib/interpolate.qh"
#include "../../warpzonelib/anglestransform.qh"
-#include "../autocvars.qh"
-#include "../defs.qh"
-#include "../main.qh"
-#include "../movetypes.qh"
-#include "projectile.qh"
.float alpha;
.float scale;
cd "$(dirname "$0")"
cd ..
-export QCC=../../../gmqcc/gmqcc
+declare QCC=../../../gmqcc/gmqcc
function check() {
declare -l base="$1"
declare -la predefs=("${!2}")
- find "$base" -type f -name '*.qc' -print0 | while IFS= read -r -d '' file; do
+ find "$base" -type f -name '*.qc' -print0 | sort -z | while IFS= read -r -d '' file; do
echo "$file"
- ${QCC} -std=gmqcc -fftepp ${predefs[@]} "$file" >/dev/null
+ ${QCC} -std=gmqcc -fftepp -fftepp-predefs -futf8 -O3 "${predefs[@]}" "$file" >/dev/null
done
}
-# TODO: `sort -V` all the includes
-
clientdefs=("-DCSQC" "common/util-pre.qh" "dpdefs/csprogsdefs.qh")
check client clientdefs[@]