From ba0988ca930f50286f8cf3b6c114ebc6584964af Mon Sep 17 00:00:00 2001 From: TimePath Date: Thu, 29 Jan 2015 11:12:02 +1100 Subject: [PATCH] #include this Initial move to #include TODO: remove unused includes --- qcsrc/Makefile | 6 +- qcsrc/client/Defs.qc | 9 + qcsrc/client/Main.qc | 26 + qcsrc/client/View.qc | 23 + qcsrc/client/announcer.qc | 11 + qcsrc/client/autocvars.qh | 38 ++ qcsrc/client/bgmscript.qc | 11 + qcsrc/client/bgmscript.qh | 49 ++ qcsrc/client/casings.qc | 15 + qcsrc/client/command/cl_cmd.qc | 14 + qcsrc/client/command/cl_cmd.qh | 35 + qcsrc/client/csqcmodel_hooks.qc | 22 + qcsrc/client/damage.qc | 16 + qcsrc/client/damage.qh | 43 +- qcsrc/client/effects.qc | 7 + qcsrc/client/gibs.qc | 16 + qcsrc/client/hook.qc | 17 + qcsrc/client/hud.qc | 25 + qcsrc/client/hud.qh | 44 ++ qcsrc/client/hud_config.qc | 12 + qcsrc/client/laser.qc | 11 + qcsrc/client/main.qh | 53 ++ qcsrc/client/mapvoting.qc | 14 + qcsrc/client/miscfunctions.qc | 18 + qcsrc/client/modeleffects.qc | 9 + qcsrc/client/movetypes.qc | 13 + qcsrc/client/movetypes.qh | 47 ++ qcsrc/client/noise.qc | 7 + qcsrc/client/noise.qh | 50 ++ qcsrc/client/particles.qc | 15 + qcsrc/client/player_skeleton.qc | 9 + qcsrc/client/player_skeleton.qh | 60 ++ qcsrc/client/prandom.qc | 8 + qcsrc/client/prandom.qh | 48 ++ qcsrc/client/rubble.qc | 6 + qcsrc/client/scoreboard.qc | 20 + qcsrc/client/scoreboard.qh | 45 ++ qcsrc/client/shownames.qc | 16 + qcsrc/client/shownames.qh | 62 ++ qcsrc/client/sortlist.qc | 6 + qcsrc/client/sys-post.qh | 12 + qcsrc/client/sys-pre.qh | 11 +- qcsrc/client/target_music.qc | 13 + qcsrc/client/teamradar.qc | 14 + qcsrc/client/teamradar.qh | 43 ++ qcsrc/client/tturrets.qc | 20 + qcsrc/client/tturrets.qh | 51 ++ qcsrc/client/tuba.qc | 12 + qcsrc/client/vehicles/vehicles.qc | 18 + qcsrc/client/vehicles/vehicles.qh | 55 +- qcsrc/client/wall.qc | 12 + qcsrc/client/waypointsprites.qc | 20 + qcsrc/client/waypointsprites.qh | 46 ++ qcsrc/client/weapons/projectile.qc | 19 + qcsrc/client/weapons/projectile.qh | 59 ++ qcsrc/common/animdecide.qc | 12 + qcsrc/common/animdecide.qh | 59 ++ qcsrc/common/buffs.qc | 11 + qcsrc/common/buffs.qh | 40 ++ qcsrc/common/campaign_common.qh | 73 +++ qcsrc/common/campaign_file.qc | 9 + qcsrc/common/campaign_setup.qc | 8 + qcsrc/common/command/generic.qc | 28 + qcsrc/common/command/generic.qh | 71 ++ qcsrc/common/command/markup.qc | 11 + qcsrc/common/command/markup.qh | 65 ++ qcsrc/common/command/rpn.qc | 19 + qcsrc/common/command/rpn.qh | 68 ++ qcsrc/common/command/shared_defs.qh | 77 ++- qcsrc/common/constants.qh | 37 ++ qcsrc/common/counting.qh | 60 ++ qcsrc/common/csqcmodel_settings.qh | 114 ++++ qcsrc/common/deathtypes.qh | 85 +++ qcsrc/common/mapinfo.qc | 18 + qcsrc/common/mapinfo.qh | 93 +++ qcsrc/common/monsters/monsters.qc | 22 + qcsrc/common/monsters/monsters.qh | 84 +++ qcsrc/common/monsters/spawn.qc | 11 + qcsrc/common/monsters/spawn.qh | 35 + qcsrc/common/monsters/sv_monsters.qc | 27 + qcsrc/common/monsters/sv_monsters.qh | 35 + qcsrc/common/nades.qc | 16 + qcsrc/common/nades.qh | 38 ++ qcsrc/common/net_notice.qc | 13 + qcsrc/common/net_notice.qh | 32 + qcsrc/common/notifications.qc | 25 + qcsrc/common/notifications.qh | 83 +++ qcsrc/common/playerstats.qc | 16 + qcsrc/common/playerstats.qh | 95 +++ qcsrc/common/stats.qh | 29 +- qcsrc/common/teams.qh | 45 ++ qcsrc/common/test.qc | 9 + qcsrc/common/test.qh | 50 ++ qcsrc/common/urllib.qc | 15 + qcsrc/common/urllib.qh | 73 +++ qcsrc/common/util-pre.qh | 9 + qcsrc/common/util.qc | 24 + qcsrc/common/util.qh | 45 +- qcsrc/common/weapons/config.qc | 10 + qcsrc/common/weapons/config.qh | 45 +- qcsrc/common/weapons/weapons.qc | 51 ++ qcsrc/common/weapons/weapons.qh | 72 +++ qcsrc/csqcmodellib/cl_model.qc | 13 + qcsrc/csqcmodellib/cl_model.qh | 56 ++ qcsrc/csqcmodellib/cl_player.qc | 14 + qcsrc/csqcmodellib/cl_player.qh | 57 ++ qcsrc/csqcmodellib/common.qh | 115 ++++ qcsrc/csqcmodellib/interpolate.qc | 10 + qcsrc/csqcmodellib/interpolate.qh | 41 ++ qcsrc/csqcmodellib/sv_model.qc | 14 + qcsrc/csqcmodellib/sv_model.qh | 69 ++ qcsrc/dpdefs/csprogsdefs.qc | 3 + qcsrc/dpdefs/dpextensions.qc | 3 + qcsrc/dpdefs/keycodes.qc | 10 +- qcsrc/dpdefs/menudefs.qc | 9 + qcsrc/dpdefs/progsdefs.qc | 4 + qcsrc/menu/command/menu_cmd.qc | 10 + qcsrc/menu/command/menu_cmd.qh | 32 + qcsrc/menu/config.qh | 15 +- qcsrc/menu/draw.qc | 5 + qcsrc/menu/draw.qh | 34 + qcsrc/menu/menu.qc | 5 + qcsrc/menu/menu.qh | 33 + qcsrc/menu/oo/base.qh | 18 + qcsrc/menu/oo/implementation.qh | 38 ++ qcsrc/menu/oo/interface.qh | 37 ++ qcsrc/menu/skin.qh | 35 + qcsrc/menu/sys-post.qh | 13 + qcsrc/menu/sys-pre.qh | 10 + qcsrc/menu/xonotic/util.qc | 5 + qcsrc/menu/xonotic/util.qh | 35 + qcsrc/server/anticheat.qc | 13 + qcsrc/server/anticheat.qh | 71 ++ qcsrc/server/antilag.qc | 9 + qcsrc/server/antilag.qh | 81 +++ qcsrc/server/autocvars.qh | 51 +- qcsrc/server/bot/bot.qc | 24 + qcsrc/server/campaign.qc | 14 + qcsrc/server/campaign.qh | 57 ++ qcsrc/server/cheats.qc | 20 + qcsrc/server/cheats.qh | 72 +++ qcsrc/server/cl_client.qc | 40 ++ qcsrc/server/cl_impulse.qc | 17 + qcsrc/server/cl_physics.qc | 27 + qcsrc/server/cl_player.qc | 26 + qcsrc/server/command/banning.qc | 11 + qcsrc/server/command/banning.qh | 62 ++ qcsrc/server/command/cmd.qc | 29 + qcsrc/server/command/cmd.qh | 66 ++ qcsrc/server/command/common.qc | 17 + qcsrc/server/command/common.qh | 63 +- qcsrc/server/command/getreplies.qc | 16 + qcsrc/server/command/getreplies.qh | 20 + qcsrc/server/command/radarmap.qc | 11 + qcsrc/server/command/radarmap.qh | 63 ++ qcsrc/server/command/sv_cmd.qc | 24 + qcsrc/server/command/sv_cmd.qh | 69 +- qcsrc/server/command/vote.qc | 23 + qcsrc/server/command/vote.qh | 29 +- qcsrc/server/constants.qh | 51 ++ qcsrc/server/csqceffects.qc | 7 + qcsrc/server/defs.qh | 52 ++ qcsrc/server/ent_cs.qc | 11 + qcsrc/server/func_breakable.qc | 16 + qcsrc/server/g_casings.qc | 10 + qcsrc/server/g_damage.qc | 30 + qcsrc/server/g_hook.qc | 19 + qcsrc/server/g_hook.qh | 23 + qcsrc/server/g_models.qc | 12 + qcsrc/server/g_subs.qc | 14 + qcsrc/server/g_tetris.qc | 8 + qcsrc/server/g_triggers.qc | 19 + qcsrc/server/g_violence.qc | 12 + qcsrc/server/g_world.qc | 36 ++ qcsrc/server/ipban.qc | 14 + qcsrc/server/ipban.qh | 79 +++ qcsrc/server/item_key.qc | 13 + qcsrc/server/item_key.qh | 85 ++- qcsrc/server/mapvoting.qc | 20 +- qcsrc/server/mapvoting.qh | 78 +++ qcsrc/server/miscfunctions.qc | 604 +----------------- qcsrc/server/miscfunctions.qh | 596 +++++++++++++++++ qcsrc/server/movelib.qc | 10 + qcsrc/server/mutators/mutators.qc | 9 + qcsrc/server/mutators/mutators_include.qc | 85 +++ qcsrc/server/mutators/mutators_include.qh | 55 ++ qcsrc/server/pathlib/pathlib.qh | 87 +++ qcsrc/server/playerdemo.qc | 9 + qcsrc/server/playerdemo.qh | 82 +++ qcsrc/server/portals.qc | 21 + qcsrc/server/portals.qh | 74 +++ qcsrc/server/race.qc | 22 + qcsrc/server/race.qh | 80 +++ qcsrc/server/round_handler.qc | 10 + qcsrc/server/round_handler.qh | 83 +++ qcsrc/server/scores.qc | 17 + qcsrc/server/scores.qh | 76 +++ qcsrc/server/scores_rules.qc | 11 +- qcsrc/server/secret.qc | 9 +- qcsrc/server/secret.qh | 86 ++- qcsrc/server/spawnpoints.qc | 17 + qcsrc/server/spawnpoints.qh | 77 +++ qcsrc/server/steerlib.qc | 7 + qcsrc/server/sv_main.qc | 25 + qcsrc/server/sys-post.qh | 13 + qcsrc/server/sys-pre.qh | 10 +- qcsrc/server/t_halflife.qc | 8 + qcsrc/server/t_items.qc | 30 + qcsrc/server/t_items.qh | 101 +++ qcsrc/server/t_jumppads.qc | 16 + qcsrc/server/t_plats.qc | 20 + qcsrc/server/t_quake.qc | 6 + qcsrc/server/t_quake3.qc | 12 + qcsrc/server/t_swamp.qc | 10 + qcsrc/server/t_teleporters.qc | 21 + qcsrc/server/target_music.qc | 10 + qcsrc/server/target_spawn.qc | 10 + qcsrc/server/teamplay.qc | 20 + qcsrc/server/tturrets/include/turrets.qh | 87 +++ .../server/tturrets/include/turrets_early.qh | 101 ++- qcsrc/server/vehicles/bumblebee.qc | 13 + qcsrc/server/vehicles/vehicles.qh | 88 +++ qcsrc/server/vehicles/vehicles_def.qh | 57 ++ qcsrc/server/waypointsprites.qc | 17 + qcsrc/server/weapons/accuracy.qc | 15 + qcsrc/server/weapons/accuracy.qh | 39 ++ qcsrc/server/weapons/common.qc | 14 + qcsrc/server/weapons/common.qh | 39 ++ qcsrc/server/weapons/csqcprojectile.qc | 13 + qcsrc/server/weapons/csqcprojectile.qh | 41 ++ qcsrc/server/weapons/hitplot.qc | 12 + qcsrc/server/weapons/hitplot.qh | 42 ++ qcsrc/server/weapons/selection.qc | 15 + qcsrc/server/weapons/selection.qh | 43 ++ qcsrc/server/weapons/spawning.qc | 16 + qcsrc/server/weapons/spawning.qh | 44 ++ qcsrc/server/weapons/throwing.qc | 18 + qcsrc/server/weapons/throwing.qh | 45 ++ qcsrc/server/weapons/tracing.qc | 15 + qcsrc/server/weapons/tracing.qh | 46 ++ qcsrc/server/weapons/weaponstats.qc | 12 + qcsrc/server/weapons/weaponstats.qh | 47 ++ qcsrc/server/weapons/weaponsystem.qc | 22 + qcsrc/server/weapons/weaponsystem.qh | 48 ++ qcsrc/warpzonelib/anglestransform.qc | 10 + qcsrc/warpzonelib/anglestransform.qh | 22 + qcsrc/warpzonelib/client.qc | 10 + qcsrc/warpzonelib/client.qh | 20 + qcsrc/warpzonelib/common.qc | 13 + qcsrc/warpzonelib/common.qh | 26 + qcsrc/warpzonelib/mathlib.qc | 10 + qcsrc/warpzonelib/mathlib.qh | 30 + qcsrc/warpzonelib/server.qc | 14 + qcsrc/warpzonelib/server.qh | 18 + qcsrc/warpzonelib/util_server.qc | 10 + qcsrc/warpzonelib/util_server.qh | 17 + 256 files changed, 8693 insertions(+), 600 deletions(-) create mode 100644 qcsrc/server/miscfunctions.qh diff --git a/qcsrc/Makefile b/qcsrc/Makefile index 01d0528f5..abbd25ffd 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -37,7 +37,7 @@ $(QCCVERSIONFILE): FILES_CSPROGS = $(shell find client common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm) ../csprogs.dat: $(FILES_CSPROGS) $(QCCVERSIONFILE) @echo make[1]: Entering directory \`$(PWD)/client\' - cd client && $(QCC) $(QCCFLAGS) + cd client && $(QCC) $(QCCFLAGS) -DCSQC server/precache-for-csqc.inc: $(FILES_CSPROGS) sh collect-precache.sh @@ -45,12 +45,12 @@ server/precache-for-csqc.inc: $(FILES_CSPROGS) FILES_PROGS = $(shell find server common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm) ../progs.dat: $(FILES_PROGS) $(QCCVERSIONFILE) server/precache-for-csqc.inc @echo make[1]: Entering directory \`$(PWD)/server\' - cd server && $(QCC) $(QCCFLAGS) + cd server && $(QCC) $(QCCFLAGS) -DSVQC FILES_MENU = $(shell find menu common warpzonelib -type f -not -name fteqcc.log -not -name qc.asm) ../menu.dat: $(FILES_MENU) $(QCCVERSIONFILE) @echo make[1]: Entering directory \`$(PWD)/menu\' - cd menu && $(QCC) $(QCCFLAGS) + cd menu && $(QCC) $(QCCFLAGS) -DMENUQC .PHONY: testcase testcase: diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index baf25e1cd..2a6602405 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -1,3 +1,11 @@ +#ifndef DEFS_H +#define DEFS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + //NOTE: THIS IS AN INTERFACE FILE. DO NOT EDIT. //MODIFYING THIS FILE CAN RESULT IN CRC ERRORS. //YOU HAVE BEEN WARNED. @@ -274,3 +282,4 @@ float uid2name_dialog; #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1) float g_balance_porto_secondary; +#endif \ No newline at end of file diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index e9591e51d..4cbb1f818 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -1,3 +1,29 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../common/stats.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 "command/cl_cmd.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../csqcmodellib/interpolate.qh" + #include "hud.qh" + #include "waypointsprites.qh" + #include "prandom.qh" + #include "tturrets.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" + #include "shownames.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + // -------------------------------------------------------------------------- // BEGIN REQUIRED CSQC FUNCTIONS //include "main.qh" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index a2d728d0e..505b4f192 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -1,3 +1,26 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #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 "hud.qh" + #include "scoreboard.qh" + #include "noise.qh" + #include "main.qh" + #include "../csqcmodellib/cl_player.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + entity porto; vector polyline[16]; void Porto_Draw() diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 9f74dacfa..6c2462c3c 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #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 + bool announcer_1min; bool announcer_5min; void Announcer_Countdown() diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index c4a4fab80..bd1fc64e7 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -1,3 +1,40 @@ +#ifndef CLIENT_AUTOCVARS_H +#define CLIENT_AUTOCVARS_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + bool autocvar__con_chat_maximized; bool autocvar__hud_configure; string autocvar__hud_panelorder; @@ -466,3 +503,4 @@ vector autocvar_crosshair_rpc_color = '0.2 1.0 0.2'; float autocvar_crosshair_rpc_alpha = 1; float autocvar_crosshair_rpc_size = 1; int autocvar_cl_nade_timer; +#endif \ No newline at end of file diff --git a/qcsrc/client/bgmscript.qc b/qcsrc/client/bgmscript.qc index 716696f79..348319ac0 100644 --- a/qcsrc/client/bgmscript.qc +++ b/qcsrc/client/bgmscript.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/util.qh" + #include "autocvars.qh" + #include "bgmscript.qh" + #include "main.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + #define CONSTANT_SPEED_DECAY float bgmscriptbuf; diff --git a/qcsrc/client/bgmscript.qh b/qcsrc/client/bgmscript.qh index 713cf5798..51e11eba4 100644 --- a/qcsrc/client/bgmscript.qh +++ b/qcsrc/client/bgmscript.qh @@ -1,3 +1,51 @@ +#ifndef BGMSCRIPT_H +#define BGMSCRIPT_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "waypointsprites.qh" + #include "movetypes.qh" + #include "prandom.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .string bgmscript; .float bgmscriptattack; .float bgmscriptdecay; @@ -8,3 +56,4 @@ void BGMScript_InitEntity(entity e); float BGMScript(entity e); +#endif \ No newline at end of file diff --git a/qcsrc/client/casings.qc b/qcsrc/client/casings.qc index d97e99557..020781470 100644 --- a/qcsrc/client/casings.qc +++ b/qcsrc/client/casings.qc @@ -1,3 +1,18 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "movetypes.qh" + #include "prandom.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + .bool silent; void Casing_Delete() diff --git a/qcsrc/client/command/cl_cmd.qc b/qcsrc/client/command/cl_cmd.qc index edf265625..09a899e9d 100644 --- a/qcsrc/client/command/cl_cmd.qc +++ b/qcsrc/client/command/cl_cmd.qc @@ -3,6 +3,20 @@ // Last updated: December 28th, 2011 // ============================================== +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../Defs.qc" + #include "../../common/util.qh" + #include "../../common/mapinfo.qh" + #include "../../common/command/shared_defs.qh" + #include "cl_cmd.qh" + #include "../autocvars.qh" + #include "../hud.qh" + #include "../main.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + void DrawDebugModel() { if(time - floor(time) > 0.5) diff --git a/qcsrc/client/command/cl_cmd.qh b/qcsrc/client/command/cl_cmd.qh index 85ab8a40a..4f48fed7f 100644 --- a/qcsrc/client/command/cl_cmd.qh +++ b/qcsrc/client/command/cl_cmd.qh @@ -1,10 +1,45 @@ +#ifndef CL_CMD_H +#define CL_CMD_H // ============================================== // CSQC client commands code, written by Samual // Last updated: December 17th, 2011 // ============================================== +#if defined(CSQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../sys-post.qh" + #include "../Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../../common/playerstats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/weapons/weapons.qh" + #include "../../common/mapinfo.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/urllib.qh" + #include "../../common/animdecide.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + void Cmd_HUD_SetFields(int); void Cmd_HUD_Help(); // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void LocalCommand_macro_write_aliases(int fh); +#endif \ No newline at end of file diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 8ca019457..149b06ff3 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -1,3 +1,25 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/animdecide.qh" + #include "autocvars.qh" + #include "../csqcmodellib/interpolate.qh" + #include "main.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/cl_model.qh" + #include "../csqcmodellib/cl_player.qh" + #include "weapons/projectile.qh" + #include "player_skeleton.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + void CSQCModel_Hook_PreDraw(bool isplayer); .bool isplayermodel; diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index 544c365a9..54ec0615a 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/weapons/weapons.qh" + #include "autocvars.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "movetypes.qh" + #include "prandom.qh" + #include "vehicles/vehicles.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + void DamageEffect_Think() { // if particle distribution is enabled, slow ticrate by total number of damages diff --git a/qcsrc/client/damage.qh b/qcsrc/client/damage.qh index 23982f132..17184f2af 100644 --- a/qcsrc/client/damage.qh +++ b/qcsrc/client/damage.qh @@ -1 +1,42 @@ -.float total_damages; // number of effects which currently are attached to a player \ No newline at end of file +#ifndef DAMAGE_H +#define DAMAGE_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + +.float total_damages; // number of effects which currently are attached to a player +#endif \ No newline at end of file diff --git a/qcsrc/client/effects.qc b/qcsrc/client/effects.qc index 56c83e063..86038c17a 100644 --- a/qcsrc/client/effects.qc +++ b/qcsrc/client/effects.qc @@ -1,3 +1,10 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "autocvars.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + /* .vector fx_start; .vector fx_end; diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index 5d8543a78..dcf4bfed4 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/buffs.qh" + #include "autocvars.qh" + #include "movetypes.qh" + #include "prandom.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" + #include "../server/t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .bool silent; void Gib_Delete() diff --git a/qcsrc/client/hook.qc b/qcsrc/client/hook.qc index b7c023b4d..2f2918b4c 100644 --- a/qcsrc/client/hook.qc +++ b/qcsrc/client/hook.qc @@ -1,3 +1,20 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../warpzonelib/common.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "../csqcmodellib/interpolate.qh" + #include "noise.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + .float HookType; // ENT_CLIENT_* .vector origin; .vector velocity; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 9c733efbd..080e00436 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1,3 +1,28 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "autocvars.qh" + #include "../common/deathtypes.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "main.qh" + #include "../csqcmodellib/cl_player.qh" + #include "../server/t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + /* ================== Misc HUD functions diff --git a/qcsrc/client/hud.qh b/qcsrc/client/hud.qh index 85a1966ba..563e33f63 100644 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@ -1,3 +1,46 @@ +#ifndef HUD_H +#define HUD_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + const int HUD_PANEL_MAX = 24; entity hud_panel[HUD_PANEL_MAX]; const int HUD_PANEL_FIRST = 0; @@ -356,3 +399,4 @@ void HUD_Notify_Push(string icon, string attacker, string victim); var void HUD_ModIcons_GameType(vector pos, vector size); void HUD_ModIcons_SetFunc(); +#endif \ No newline at end of file diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index e7f79fb2d..e07ee4843 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "autocvars.qh" + #include "hud.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + #define HUD_Write(s) fputs(fh, s) // q: quoted, n: not quoted #define HUD_Write_Cvar_n(cvar) HUD_Write(strcat("seta ", cvar, " ", cvar_string(cvar), "\n")) diff --git a/qcsrc/client/laser.qc b/qcsrc/client/laser.qc index d6a3d7d9c..304ada9d3 100644 --- a/qcsrc/client/laser.qc +++ b/qcsrc/client/laser.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../common/buffs.qh" + #include "../csqcmodellib/interpolate.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + // a laser goes from origin in direction angles // it has color 'colormod' // and stops when something is in the way diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 18efb2baa..405298fea 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -1,3 +1,55 @@ +#ifndef MAIN_H +#define MAIN_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "waypointsprites.qh" + #include "movetypes.qh" + #include "prandom.qh" + #include "bgmscript.qh" + #include "noise.qh" + #include "tturrets.qh" + #include "../server/tturrets/include/turrets_early.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + // -------------------------------------------------------------------------- // MENU Functionality @@ -146,3 +198,4 @@ entity entcs_receiver[255]; // 255 is the engine limit on maxclients float hud; float view_quality; int framecount; +#endif \ No newline at end of file diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 5bffcdee1..d2ce7cb6e 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -1,3 +1,17 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/mapinfo.qh" + #include "autocvars.qh" + #include "main.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + int mv_num_maps; float mv_active; diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 25741ce00..ec539ee7d 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -1,3 +1,21 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/command/generic.qh" + #include "../common/urllib.qh" + #include "autocvars.qh" + #include "hud.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + entity players; entity teams; float team_count; // real teams diff --git a/qcsrc/client/modeleffects.qc b/qcsrc/client/modeleffects.qc index 0f873b7e7..8034ab89b 100644 --- a/qcsrc/client/modeleffects.qc +++ b/qcsrc/client/modeleffects.qc @@ -1,3 +1,12 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + .float frame1time; .float lifetime, fadetime; .float teleport_time; diff --git a/qcsrc/client/movetypes.qc b/qcsrc/client/movetypes.qc index a1e9a65f7..abece4ca8 100644 --- a/qcsrc/client/movetypes.qc +++ b/qcsrc/client/movetypes.qc @@ -1,3 +1,16 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #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 + + const int MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE = 4; #define GRAVITY_UNAFFECTED_BY_TICRATE (getstati(STAT_MOVEFLAGS) & MOVEFLAG_GRAVITYUNAFFECTEDBYTICRATE) diff --git a/qcsrc/client/movetypes.qh b/qcsrc/client/movetypes.qh index db2266dfa..717c70a87 100644 --- a/qcsrc/client/movetypes.qh +++ b/qcsrc/client/movetypes.qh @@ -1,3 +1,49 @@ +#ifndef MOVETYPES_H +#define MOVETYPES_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "waypointsprites.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .float move_movetype; .float move_time; .vector move_origin; @@ -38,3 +84,4 @@ const int MOVETYPE_FLY_WORLDONLY = 33; const int FL_ITEM = 256; const int FL_ONGROUND = 512; +#endif \ No newline at end of file diff --git a/qcsrc/client/noise.qc b/qcsrc/client/noise.qc index ef9b85552..da56f6cd8 100644 --- a/qcsrc/client/noise.qc +++ b/qcsrc/client/noise.qc @@ -1,3 +1,10 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "noise.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .float noise_baccum; .float noise_paccum; .float noise_paccum2; diff --git a/qcsrc/client/noise.qh b/qcsrc/client/noise.qh index 30ce4d0ee..d90e2c10d 100644 --- a/qcsrc/client/noise.qh +++ b/qcsrc/client/noise.qh @@ -1,5 +1,55 @@ +#ifndef NOISE_H +#define NOISE_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "waypointsprites.qh" + #include "movetypes.qh" + #include "prandom.qh" + #include "bgmscript.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + // noises "usually" start in the range -1..1 float Noise_Brown(entity e, float dt); float Noise_Pink(entity e, float dt); float Noise_White(entity e, float dt); float Noise_Burst(entity e, float dt, float p); // +1 or -1 +#endif \ No newline at end of file diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index a8dd10c69..062c96870 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -1,3 +1,18 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/common.qh" + #include "../common/util.qh" + #include "../common/weapons/weapons.qh" + #include "autocvars.qh" + #include "bgmscript.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .int dphitcontentsmask; .int cnt; // effect number diff --git a/qcsrc/client/player_skeleton.qc b/qcsrc/client/player_skeleton.qc index 01cbfc605..82800ef8c 100644 --- a/qcsrc/client/player_skeleton.qc +++ b/qcsrc/client/player_skeleton.qc @@ -1,3 +1,12 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../common/util.qh" + #include "../csqcmodellib/interpolate.qh" + #include "player_skeleton.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .float skeleton_info_modelindex; .float skeleton_info_skin; const int BONETYPE_LOWER = 0; diff --git a/qcsrc/client/player_skeleton.qh b/qcsrc/client/player_skeleton.qh index fdf5b3dfc..63ef01871 100644 --- a/qcsrc/client/player_skeleton.qh +++ b/qcsrc/client/player_skeleton.qh @@ -1,3 +1,62 @@ +#ifndef PLAYER_SKELETON +#define PLAYER_SKELETON + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "waypointsprites.qh" + #include "movetypes.qh" + #include "prandom.qh" + #include "bgmscript.qh" + #include "noise.qh" + #include "tturrets.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "main.qh" + #include "vehicles/vehicles.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/cl_model.qh" + #include "../csqcmodellib/cl_player.qh" + #include "weapons/projectile.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + void free_skeleton_from_frames(entity e); void skeleton_from_frames(entity e, float is_dead); void skeleton_loadinfo(entity e); @@ -7,3 +66,4 @@ void skeleton_loadinfo(entity e); .float bone_aim[MAX_AIM_BONES]; .float bone_aimweight[MAX_AIM_BONES]; .float fixbone; +#endif \ No newline at end of file diff --git a/qcsrc/client/prandom.qc b/qcsrc/client/prandom.qc index 9bca7b097..ad3cd7dc9 100644 --- a/qcsrc/client/prandom.qc +++ b/qcsrc/client/prandom.qc @@ -1,3 +1,11 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../warpzonelib/mathlib.qh" + #include "prandom.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + // prandom - PREDICTABLE random number generator (not seeded yet) #ifdef USE_PRANDOM diff --git a/qcsrc/client/prandom.qh b/qcsrc/client/prandom.qh index 7d5df6f82..609f085a1 100644 --- a/qcsrc/client/prandom.qh +++ b/qcsrc/client/prandom.qh @@ -1,3 +1,50 @@ +#ifndef PRANDOM_H +#define PRANDOM_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "waypointsprites.qh" + #include "movetypes.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + // prandom - PREDICTABLE random number generator #define USE_PRANDOM @@ -18,3 +65,4 @@ void prandom_debug(); #define psrandom(x) #define prandom_debug() #endif +#endif \ No newline at end of file diff --git a/qcsrc/client/rubble.qc b/qcsrc/client/rubble.qc index 7bf9e57ea..7f7c16269 100644 --- a/qcsrc/client/rubble.qc +++ b/qcsrc/client/rubble.qc @@ -1,3 +1,9 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .float creationtime; // LordHavoc: rewrote this file, it was really bad code diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 5f4cbc1b8..f1106f0df 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -1,3 +1,23 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/buffs.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "command/cl_cmd.qh" + #include "autocvars.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "main.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + float scoreboard_alpha_bg; float scoreboard_alpha_fg; float scoreboard_highlight; diff --git a/qcsrc/client/scoreboard.qh b/qcsrc/client/scoreboard.qh index 3e5de00f2..4e3c76684 100644 --- a/qcsrc/client/scoreboard.qh +++ b/qcsrc/client/scoreboard.qh @@ -1,3 +1,48 @@ +#ifndef SCOREBOARD_H +#define SCOREBOARD_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + float HUD_WouldDrawScoreboard(void); float scoreboard_active; float scoreboard_fade_alpha; +#endif \ No newline at end of file diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 5f40b2688..05fe0bbd1 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #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" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + + // self.isactive = player is in range and coordinates/status (health and armor) are up to date // self.origin = player origin TODO: should maybe move this so it's the origin of the shownames tag already in SSQC for culling? // self.healthvalue diff --git a/qcsrc/client/shownames.qh b/qcsrc/client/shownames.qh index adbfa5712..53632b777 100644 --- a/qcsrc/client/shownames.qh +++ b/qcsrc/client/shownames.qh @@ -1,5 +1,67 @@ +#ifndef SHOWNAMES_H +#define SHOWNAMES_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "waypointsprites.qh" + #include "movetypes.qh" + #include "prandom.qh" + #include "bgmscript.qh" + #include "noise.qh" + #include "tturrets.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "main.qh" + #include "vehicles/vehicles.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/cl_model.qh" + #include "../csqcmodellib/cl_player.qh" + #include "weapons/projectile.qh" + #include "player_skeleton.qh" + #include "../server/t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .float healthvalue; .float armorvalue; .float sameteam; .float fadedelay; .float pointtime; +#endif \ No newline at end of file diff --git a/qcsrc/client/sortlist.qc b/qcsrc/client/sortlist.qc index 8537dd336..85601aa58 100644 --- a/qcsrc/client/sortlist.qc +++ b/qcsrc/client/sortlist.qc @@ -1,3 +1,9 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + //.float(entity,entity) sort_cmp; .entity sort_next, sort_prev; diff --git a/qcsrc/client/sys-post.qh b/qcsrc/client/sys-post.qh index ec4e31ac3..cf8ffef06 100644 --- a/qcsrc/client/sys-post.qh +++ b/qcsrc/client/sys-post.qh @@ -1,3 +1,15 @@ +#ifndef SYS_POST_H +#define SYS_POST_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + #pragma noref 0 #undef ATTEN_NORM +#endif \ No newline at end of file diff --git a/qcsrc/client/sys-pre.qh b/qcsrc/client/sys-pre.qh index 3b4fc14b5..f6202b51c 100644 --- a/qcsrc/client/sys-pre.qh +++ b/qcsrc/client/sys-pre.qh @@ -1,5 +1,14 @@ -#define CSQC +#ifndef SYS_PRE_H +#define SYS_PRE_H + +#if defined(CSQC) + #include "../common/util-pre.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif #define ATTEN_NORM builtin_ATTEN_NORM #pragma noref 1 + +#endif \ No newline at end of file diff --git a/qcsrc/client/target_music.qc b/qcsrc/client/target_music.qc index 731c432af..87a48136e 100644 --- a/qcsrc/client/target_music.qc +++ b/qcsrc/client/target_music.qc @@ -1,3 +1,16 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../warpzonelib/common.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + float music_disabled; entity music_default; entity music_target; diff --git a/qcsrc/client/teamradar.qc b/qcsrc/client/teamradar.qc index 3e361ffeb..de56efa7e 100644 --- a/qcsrc/client/teamradar.qc +++ b/qcsrc/client/teamradar.qc @@ -1,3 +1,17 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/util.qh" + #include "autocvars.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + float teamradar_angle; // player yaw angle vector teamradar_origin3d_in_texcoord; // player origin vector teamradar_origin2d; // 2D origin diff --git a/qcsrc/client/teamradar.qh b/qcsrc/client/teamradar.qh index 2ab26a343..4b58fb975 100644 --- a/qcsrc/client/teamradar.qh +++ b/qcsrc/client/teamradar.qh @@ -1,3 +1,45 @@ +#ifndef TEAMRADAR_H +#define TEAMRADAR_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + const int MAX_TEAMRADAR_TIMES = 32; // to make entities have dots on the team radar @@ -5,3 +47,4 @@ const int MAX_TEAMRADAR_TIMES = 32; .float teamradar_times[MAX_TEAMRADAR_TIMES]; .int teamradar_time_index; .vector teamradar_color; +#endif \ No newline at end of file diff --git a/qcsrc/client/tturrets.qc b/qcsrc/client/tturrets.qc index ec2ddebb7..c46d80dce 100644 --- a/qcsrc/client/tturrets.qc +++ b/qcsrc/client/tturrets.qc @@ -1,3 +1,23 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/teams.qh" + #include "../common/buffs.qh" + #include "autocvars.qh" + #include "teamradar.qh" + #include "movetypes.qh" + #include "tturrets.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "main.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/cl_model.qh" + #include "../server/t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + string tid2info_base; string tid2info_head; string tid2info_name; diff --git a/qcsrc/client/tturrets.qh b/qcsrc/client/tturrets.qh index cf74f48ad..da4df80e8 100644 --- a/qcsrc/client/tturrets.qh +++ b/qcsrc/client/tturrets.qh @@ -1,3 +1,54 @@ +#ifndef TTURRETS_H +#define TTURRETS_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" + #include "waypointsprites.qh" + #include "movetypes.qh" + #include "prandom.qh" + #include "bgmscript.qh" + #include "noise.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + void ent_turret(); void turrets_precache(); .entity tur_head; +#endif \ No newline at end of file diff --git a/qcsrc/client/tuba.qc b/qcsrc/client/tuba.qc index 8d2ba7fa6..aeb4ebeb0 100644 --- a/qcsrc/client/tuba.qc +++ b/qcsrc/client/tuba.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../common/constants.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + const float TUBA_MIN = -18; const float TUBA_MAX = 27; const float TUBA_INSTRUMENTS = 3; diff --git a/qcsrc/client/vehicles/vehicles.qc b/qcsrc/client/vehicles/vehicles.qc index a986fa728..e029e74ce 100644 --- a/qcsrc/client/vehicles/vehicles.qc +++ b/qcsrc/client/vehicles/vehicles.qc @@ -1,3 +1,21 @@ +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../Defs.qc" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/util.qh" + #include "../../common/buffs.qh" + #include "../autocvars.qh" + #include "../movetypes.qh" + #include "../prandom.qh" + #include "../main.qh" + #include "vehicles.qh" + #include "../../csqcmodellib/cl_model.qh" + #include "../../server/t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + const string hud_bg = "gfx/vehicles/frame.tga"; const string hud_sh = "gfx/vehicles/vh-shield.tga"; diff --git a/qcsrc/client/vehicles/vehicles.qh b/qcsrc/client/vehicles/vehicles.qh index 66b2af1bf..72ff23309 100644 --- a/qcsrc/client/vehicles/vehicles.qh +++ b/qcsrc/client/vehicles/vehicles.qh @@ -1,4 +1,57 @@ +#ifndef VEHICLES_H +#define VEHICLES_H + +#if defined(CSQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../sys-post.qh" + #include "../Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../../common/playerstats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/weapons/weapons.qh" + #include "../../common/mapinfo.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/urllib.qh" + #include "../../common/animdecide.qh" + #include "../command/cl_cmd.qh" + #include "../../common/monsters/monsters.qh" + #include "../autocvars.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../damage.qh" + #include "../../csqcmodellib/interpolate.qh" + #include "../teamradar.qh" + #include "../hud.qh" + #include "../scoreboard.qh" + #include "../waypointsprites.qh" + #include "../movetypes.qh" + #include "../prandom.qh" + #include "../bgmscript.qh" + #include "../noise.qh" + #include "../tturrets.qh" + #include "../../server/tturrets/include/turrets_early.qh" + #include "../main.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + void RaptorCBShellfragDraw(); void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang); void Vehicles_Precache(); - +#endif \ No newline at end of file diff --git a/qcsrc/client/wall.qc b/qcsrc/client/wall.qc index 314e8cce3..5bf5f04e7 100644 --- a/qcsrc/client/wall.qc +++ b/qcsrc/client/wall.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../common/util.qh" + #include "autocvars.qh" + #include "../csqcmodellib/interpolate.qh" + #include "bgmscript.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .float lip; .float bgmscriptangular; .int lodmodelindex0, lodmodelindex1, lodmodelindex2; diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc index de6970b38..bce02b963 100644 --- a/qcsrc/client/waypointsprites.qc +++ b/qcsrc/client/waypointsprites.qc @@ -1,3 +1,23 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "Defs.qc" + #include "../common/constants.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/buffs.qh" + #include "../common/weapons/weapons.qh" + #include "autocvars.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "waypointsprites.qh" + #include "main.qh" + #include "../csqcmodellib/cl_model.qh" + #include "../server/t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + float waypointsprite_initialized; float waypointsprite_fadedistance; float waypointsprite_normdistance; diff --git a/qcsrc/client/waypointsprites.qh b/qcsrc/client/waypointsprites.qh index 948950833..32baea3a6 100644 --- a/qcsrc/client/waypointsprites.qh +++ b/qcsrc/client/waypointsprites.qh @@ -1,3 +1,49 @@ +#ifndef WAYPOINTSPRITES_H +#define WAYPOINTSPRITES_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "sys-post.qh" + #include "Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "teamradar.qh" + #include "hud.qh" + #include "scoreboard.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + // they are drawn using a .draw function void Ent_WaypointSprite(); void Ent_RemoveWaypointSprite(); +#endif \ No newline at end of file diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index a6302bb28..ba8846277 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -1,3 +1,22 @@ +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../Defs.qc" + #include "../../common/constants.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../autocvars.qh" + #include "../../csqcmodellib/interpolate.qh" + #include "../movetypes.qh" + #include "../main.qh" + #include "../../csqcmodellib/cl_model.qh" + #include "projectile.qh" + #include "../../server/t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .vector iorigin1, iorigin2; .float spawntime; .vector trail_oldorigin; diff --git a/qcsrc/client/weapons/projectile.qh b/qcsrc/client/weapons/projectile.qh index bd3e8f63b..0fc233d52 100644 --- a/qcsrc/client/weapons/projectile.qh +++ b/qcsrc/client/weapons/projectile.qh @@ -1,3 +1,62 @@ +#ifndef PROJECTILE_H +#define PROJECTILE_H + +#if defined(CSQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../sys-post.qh" + #include "../Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../../common/playerstats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/weapons/weapons.qh" + #include "../../common/mapinfo.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/urllib.qh" + #include "../../common/animdecide.qh" + #include "../command/cl_cmd.qh" + #include "../../common/monsters/monsters.qh" + #include "../autocvars.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../damage.qh" + #include "../../csqcmodellib/interpolate.qh" + #include "../teamradar.qh" + #include "../hud.qh" + #include "../scoreboard.qh" + #include "../waypointsprites.qh" + #include "../movetypes.qh" + #include "../prandom.qh" + #include "../bgmscript.qh" + #include "../noise.qh" + #include "../tturrets.qh" + #include "../../server/tturrets/include/turrets_early.qh" + #include "../main.qh" + #include "../vehicles/vehicles.qh" + #include "../../common/csqcmodel_settings.qh" + #include "../../csqcmodellib/common.qh" + #include "../../csqcmodellib/cl_model.qh" + #include "../../csqcmodellib/cl_player.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + .int traileffect; void Projectile_ResetTrail(vector to); void Projectile_DrawTrail(vector to); +#endif \ No newline at end of file diff --git a/qcsrc/common/animdecide.qc b/qcsrc/common/animdecide.qc index 8bd689c18..ba114f31e 100644 --- a/qcsrc/common/animdecide.qc +++ b/qcsrc/common/animdecide.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "animdecide.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "util.qh" + #include "animdecide.qh" + #include "../server/defs.qh" +#endif + // player animation data for this model // each vector is as follows: // _x = startframe diff --git a/qcsrc/common/animdecide.qh b/qcsrc/common/animdecide.qh index 58e069392..3f6815fe1 100644 --- a/qcsrc/common/animdecide.qh +++ b/qcsrc/common/animdecide.qh @@ -1,3 +1,61 @@ +#ifndef ANIMDECIDE_H +#define ANIMDECIDE_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "weapons/weapons.qh" + #include "mapinfo.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "urllib.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "urllib.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "net_notice.qh" +#endif + // must be called at least once to initialize, or when modelindex is changed void animdecide_load_if_needed(entity e); @@ -45,3 +103,4 @@ const int ANIMACTION_PAIN2 = 3; // pain const int ANIMACTION_SHOOT = 4; // shoot const int ANIMACTION_TAUNT = 5; // taunt const int ANIMACTION_MELEE = 6; // melee +#endif \ No newline at end of file diff --git a/qcsrc/common/buffs.qc b/qcsrc/common/buffs.qc index 2f8e0fc23..ed592aa61 100644 --- a/qcsrc/common/buffs.qc +++ b/qcsrc/common/buffs.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "buffs.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "buffs.qh" +#endif + vector Buff_Color(float buff_id) { entity e; diff --git a/qcsrc/common/buffs.qh b/qcsrc/common/buffs.qh index d2ba5f01b..b22c2fad6 100644 --- a/qcsrc/common/buffs.qh +++ b/qcsrc/common/buffs.qh @@ -1,3 +1,42 @@ +#ifndef BUFFS_H +#define BUFFS_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" +#endif + entity Buff_Type_first; entity Buff_Type_last; .entity enemy; // internal next pointer @@ -91,3 +130,4 @@ float Buff_Type_FromName(string buff_name); float Buff_Type_FromSprite(string buff_sprite); float Buff_Skin(float buff_id); string Buff_Sprite(float buff_id); +#endif \ No newline at end of file diff --git a/qcsrc/common/campaign_common.qh b/qcsrc/common/campaign_common.qh index f6e240a6f..7f72d3527 100644 --- a/qcsrc/common/campaign_common.qh +++ b/qcsrc/common/campaign_common.qh @@ -1,3 +1,75 @@ +#ifndef CAMPAIGN_COMMON_H +#define CAMPAIGN_COMMON_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" + #include "test.qh" + #include "../menu/oo/base.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "constants.qh" + #include "mapinfo.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "urllib.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "net_notice.qh" + #include "animdecide.qh" + #include "monsters/monsters.qh" + #include "monsters/sv_monsters.qh" + #include "monsters/spawn.qh" + #include "weapons/config.qh" + #include "weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/csqcprojectile.qh" + #include "../server/weapons/hitplot.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/spawning.qh" + #include "../server/weapons/throwing.qh" + #include "../server/weapons/tracing.qh" + #include "../server/weapons/weaponstats.qh" + #include "../server/weapons/weaponsystem.qh" + #include "../server/t_items.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "notifications.qh" + #include "deathtypes.qh" + #include "../server/mutators/mutators_include.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../server/vehicles/vehicles_def.qh" + #include "../server/campaign.qh" +#endif + #ifndef CAMPAIGN_MAX_ENTRIES #define CAMPAIGN_MAX_ENTRIES 64 #endif @@ -28,3 +100,4 @@ void CampaignFile_Unload(); // Sets up the campaign for the n-th array item (meaning: campaign_offset+nth // level) using localcmd() void CampaignSetup(float n); +#endif \ No newline at end of file diff --git a/qcsrc/common/campaign_file.qc b/qcsrc/common/campaign_file.qc index d9864f4da..7031b92c9 100644 --- a/qcsrc/common/campaign_file.qc +++ b/qcsrc/common/campaign_file.qc @@ -1,3 +1,12 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "util.qh" + #include "campaign_common.qh" +#endif + // CampaignFileLoad(offset, n) // - Loads campaign level data (up to n entries starting at offset) // into the globals diff --git a/qcsrc/common/campaign_setup.qc b/qcsrc/common/campaign_setup.qc index 525b2856d..fed2763d0 100644 --- a/qcsrc/common/campaign_setup.qc +++ b/qcsrc/common/campaign_setup.qc @@ -1,3 +1,11 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "campaign_common.qh" + #include "mapinfo.qh" +#endif + void CampaignSetup(float n) { localcmd("set g_campaign 1\n"); diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index 0eeb7f7b4..37f6ebd78 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -1,3 +1,31 @@ +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../constants.qh" + #include "../util.qh" + #include "../mapinfo.qh" + #include "generic.qh" + #include "shared_defs.qh" + #include "../../client/command/cl_cmd.qh" + #include "../notifications.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../constants.qh" + #include "../util.qh" + #include "../test.qh" + #include "generic.qh" + #include "shared_defs.qh" + #include "../weapons/config.qh" + #include "../notifications.qh" + #include "../mapinfo.qh" + #include "../../server/command/common.qh" + #include "../../server/command/banning.qh" + #include "../../server/command/cmd.qh" + #include "../../server/command/sv_cmd.qh" +#endif + // ========================================================= // Generic program common command code, written by Samual // Last updated: February 19th, 2012 diff --git a/qcsrc/common/command/generic.qh b/qcsrc/common/command/generic.qh index b3a63e918..3eb32430a 100644 --- a/qcsrc/common/command/generic.qh +++ b/qcsrc/common/command/generic.qh @@ -1,3 +1,73 @@ +#ifndef GENERIC_H +#define GENERIC_H + +#if defined(CSQC) + #include "../util-pre.qh" + #include "../../client/sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../../client/sys-post.qh" + #include "../../client/Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../constants.qh" + #include "../stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../weapons/weapons.qh" + #include "../mapinfo.qh" + #include "markup.qh" + #include "rpn.qh" +#elif defined(MENUQC) + #include "../util-pre.qh" + #include "../../menu/sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../menu/sys-post.qh" + #include "../../menu/config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../util.qh" + #include "../test.qh" + #include "../../menu/oo/base.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../constants.qh" + #include "../mapinfo.qh" + #include "../campaign_common.qh" + #include "../weapons/weapons.qh" + #include "../counting.qh" + #include "markup.qh" + #include "rpn.qh" +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "markup.qh" + #include "rpn.qh" +#endif // ========================================================= // Declarations for common command code, written by Samual // Last updated: December 28th, 2011 @@ -20,3 +90,4 @@ void Curl_URI_Get_Callback(int id, float status, string data); int curl_uri_get_pos; float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL + 1]; string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL + 1]; +#endif \ No newline at end of file diff --git a/qcsrc/common/command/markup.qc b/qcsrc/common/command/markup.qc index 1c80018ba..52b53b8f1 100644 --- a/qcsrc/common/command/markup.qc +++ b/qcsrc/common/command/markup.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../util.qh" + #include "markup.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/dpextensions.qc" + #include "../util.qh" + #include "markup.qh" +#endif + // ========================================================= // Markup chat characters command code, reworked by Samual // Last updated: December 28th, 2011 diff --git a/qcsrc/common/command/markup.qh b/qcsrc/common/command/markup.qh index cf72f850e..41fcf4004 100644 --- a/qcsrc/common/command/markup.qh +++ b/qcsrc/common/command/markup.qh @@ -1,3 +1,67 @@ +#ifndef MARKUP_H +#define MARKUP_H + +#if defined(CSQC) + #include "../util-pre.qh" + #include "../../client/sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../../client/sys-post.qh" + #include "../../client/Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../constants.qh" + #include "../stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../weapons/weapons.qh" + #include "../mapinfo.qh" +#elif defined(MENUQC) + #include "../util-pre.qh" + #include "../../menu/sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../menu/sys-post.qh" + #include "../../menu/config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../util.qh" + #include "../test.qh" + #include "../../menu/oo/base.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../constants.qh" + #include "../mapinfo.qh" + #include "../campaign_common.qh" + #include "../weapons/weapons.qh" + #include "../counting.qh" +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" +#endif // ========================================================== // Declarations for markup command code, reworked by Samual // Last updated: December 28th, 2011 @@ -7,3 +71,4 @@ const int NUM_MARKUPS = 41; bool markup_init; string markup_from[NUM_MARKUPS]; string markup_to[NUM_MARKUPS]; +#endif \ No newline at end of file diff --git a/qcsrc/common/command/rpn.qc b/qcsrc/common/command/rpn.qc index 480bac3c5..893633849 100644 --- a/qcsrc/common/command/rpn.qc +++ b/qcsrc/common/command/rpn.qc @@ -1,3 +1,22 @@ +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../../warpzonelib/mathlib.qh" + #include "../util.qh" + #include "rpn.qh" + #include "generic.qh" + #include "shared_defs.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../util.qh" + #include "rpn.qh" + #include "generic.qh" + #include "shared_defs.qh" +#endif + // ======================================== // RPN command code, written by divVerent // Last updated: December 28th, 2011 diff --git a/qcsrc/common/command/rpn.qh b/qcsrc/common/command/rpn.qh index 5f6856c3a..ab02612ed 100644 --- a/qcsrc/common/command/rpn.qh +++ b/qcsrc/common/command/rpn.qh @@ -1,3 +1,70 @@ +#ifndef RPN_H +#define RPN_H + +#if defined(CSQC) + #include "../util-pre.qh" + #include "../../client/sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../../client/sys-post.qh" + #include "../../client/Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../constants.qh" + #include "../stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../weapons/weapons.qh" + #include "../mapinfo.qh" + #include "markup.qh" +#elif defined(MENUQC) + #include "../util-pre.qh" + #include "../../menu/sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../menu/sys-post.qh" + #include "../../menu/config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../util.qh" + #include "../test.qh" + #include "../../menu/oo/base.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../constants.qh" + #include "../mapinfo.qh" + #include "../campaign_common.qh" + #include "../weapons/weapons.qh" + #include "../counting.qh" + #include "markup.qh" +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "markup.qh" +#endif // ========================================================= // Declarations for RPN command code, written by divVerent // Last updated: December 28th, 2011 @@ -8,3 +75,4 @@ int rpn_db; int rpn_error; int rpn_sp; string rpn_stack[MAX_RPN_STACK]; +#endif \ No newline at end of file diff --git a/qcsrc/common/command/shared_defs.qh b/qcsrc/common/command/shared_defs.qh index 169b0f661..a158f811a 100644 --- a/qcsrc/common/command/shared_defs.qh +++ b/qcsrc/common/command/shared_defs.qh @@ -1,3 +1,77 @@ +#ifndef SHARED_DEFS_H +#define SHARED_DEFS_H + +#if defined(CSQC) + #include "../util-pre.qh" + #include "../../client/sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../../client/sys-post.qh" + #include "../../client/Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../constants.qh" + #include "../stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../weapons/weapons.qh" + #include "../mapinfo.qh" + #include "markup.qh" + #include "rpn.qh" + #include "generic.qh" +#elif defined(MENUQC) + #include "../util-pre.qh" + #include "../../menu/sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../menu/sys-post.qh" + #include "../../menu/config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../util.qh" + #include "../test.qh" + #include "../../menu/oo/base.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../constants.qh" + #include "../mapinfo.qh" + #include "../campaign_common.qh" + #include "../weapons/weapons.qh" + #include "../counting.qh" + #include "markup.qh" + #include "rpn.qh" + #include "generic.qh" +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "markup.qh" + #include "rpn.qh" + #include "generic.qh" +#endif + // ========================================================= // Shared declarations for all commands, written by Samual // Last updated: December 13th, 2011 @@ -5,4 +79,5 @@ // identifiers for subfunction requests by the command code structure const int CMD_REQUEST_COMMAND = 1; -const int CMD_REQUEST_USAGE = 2; \ No newline at end of file +const int CMD_REQUEST_USAGE = 2; +#endif \ No newline at end of file diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index a110a818c..baff2469b 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -1,3 +1,39 @@ +#ifndef CONSTANTS_H +#define CONSTANTS_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" + #include "test.qh" + #include "../menu/oo/base.qh" + #include "playerstats.qh" + #include "teams.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" +#endif + const int AS_STRING = 1; const int AS_INT = 2; const int AS_FLOAT_TRUNCATED = 2; @@ -320,3 +356,4 @@ const int URI_GET_URLLIB_END = 191; const int GTV_AVAILABLE = 0; // for later use in per-map gametype filtering const int GTV_FORBIDDEN = 2; +#endif \ No newline at end of file diff --git a/qcsrc/common/counting.qh b/qcsrc/common/counting.qh index 4a2007cf1..a271a55ad 100644 --- a/qcsrc/common/counting.qh +++ b/qcsrc/common/counting.qh @@ -1,3 +1,62 @@ +#ifndef COUNTING_H +#define COUNTING_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" + #include "test.qh" + #include "../menu/oo/base.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "constants.qh" + #include "mapinfo.qh" + #include "campaign_common.qh" + #include "weapons/weapons.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" +#endif + // =============================================== // Time processing and counting functions/macros // =============================================== @@ -215,3 +274,4 @@ string process_time(float outputtype, float seconds) } return ""; } +#endif \ No newline at end of file diff --git a/qcsrc/common/csqcmodel_settings.qh b/qcsrc/common/csqcmodel_settings.qh index 54ef11117..3b142fe9f 100644 --- a/qcsrc/common/csqcmodel_settings.qh +++ b/qcsrc/common/csqcmodel_settings.qh @@ -1,3 +1,116 @@ +#ifndef CSQCMODEL_SETTINGS_H +#define CSQCMODEL_SETTINGS_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "weapons/weapons.qh" + #include "mapinfo.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "urllib.qh" + #include "animdecide.qh" + #include "../client/command/cl_cmd.qh" + #include "monsters/monsters.qh" + #include "../client/autocvars.qh" + #include "notifications.qh" + #include "deathtypes.qh" + #include "../client/damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "../client/teamradar.qh" + #include "../client/hud.qh" + #include "../client/scoreboard.qh" + #include "../client/waypointsprites.qh" + #include "../client/movetypes.qh" + #include "../client/prandom.qh" + #include "../client/bgmscript.qh" + #include "../client/noise.qh" + #include "../client/tturrets.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../client/main.qh" + #include "../client/vehicles/vehicles.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "urllib.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "net_notice.qh" + #include "animdecide.qh" + #include "monsters/monsters.qh" + #include "monsters/sv_monsters.qh" + #include "monsters/spawn.qh" + #include "weapons/config.qh" + #include "weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/csqcprojectile.qh" + #include "../server/weapons/hitplot.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/spawning.qh" + #include "../server/weapons/throwing.qh" + #include "../server/weapons/tracing.qh" + #include "../server/weapons/weaponstats.qh" + #include "../server/weapons/weaponsystem.qh" + #include "../server/t_items.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "notifications.qh" + #include "deathtypes.qh" + #include "../server/mutators/mutators_include.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../server/vehicles/vehicles_def.qh" + #include "../server/campaign.qh" + #include "campaign_common.qh" + #include "mapinfo.qh" + #include "../server/command/common.qh" + #include "../server/command/banning.qh" + #include "../server/command/radarmap.qh" + #include "../server/command/vote.qh" + #include "../server/command/getreplies.qh" + #include "../server/command/cmd.qh" + #include "../server/command/sv_cmd.qh" +#endif + // define this if svqc code wants to use .frame2 and .lerpfrac //#define CSQCMODEL_HAVE_TWO_FRAMES @@ -78,3 +191,4 @@ const float CSQCPLAYER_FORCE_UPDATES = 0.25; #endif #define CSQCMODEL_EF_RESPAWNGHOST EF_SELECTABLE +#endif \ No newline at end of file diff --git a/qcsrc/common/deathtypes.qh b/qcsrc/common/deathtypes.qh index 591c48e17..e05f6a4d0 100644 --- a/qcsrc/common/deathtypes.qh +++ b/qcsrc/common/deathtypes.qh @@ -1,3 +1,87 @@ +#ifndef DEATHTYPES_H +#define DEATHTYPES_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "weapons/weapons.qh" + #include "mapinfo.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "urllib.qh" + #include "animdecide.qh" + #include "../client/command/cl_cmd.qh" + #include "monsters/monsters.qh" + #include "../client/autocvars.qh" + #include "notifications.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "urllib.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "net_notice.qh" + #include "animdecide.qh" + #include "monsters/monsters.qh" + #include "monsters/sv_monsters.qh" + #include "monsters/spawn.qh" + #include "weapons/config.qh" + #include "weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/csqcprojectile.qh" + #include "../server/weapons/hitplot.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/spawning.qh" + #include "../server/weapons/throwing.qh" + #include "../server/weapons/tracing.qh" + #include "../server/weapons/weaponstats.qh" + #include "../server/weapons/weaponsystem.qh" + #include "../server/t_items.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "notifications.qh" +#endif + // ================================ // Deathtypes, reworked by Samual // ================================ @@ -131,3 +215,4 @@ const int HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage const int HITTYPE_BOUNCE = 0x400; const int HITTYPE_RESERVED2 = 0x800; const int HITTYPE_RESERVED = 0x1000; // unused yet +#endif \ No newline at end of file diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 7299b285d..47978dd35 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -1,3 +1,21 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "util.qh" + #include "buffs.qh" + #include "weapons/weapons.qh" + #include "mapinfo.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "util.qh" + #include "buffs.qh" + #include "monsters/monsters.qh" + #include "mapinfo.qh" +#endif + // generic string stuff float _MapInfo_Cache_Active; diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 1f7b7adfc..9733052e0 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -1,3 +1,95 @@ +#ifndef MAPINFO_H +#define MAPINFO_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "weapons/weapons.qh" +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" + #include "test.qh" + #include "../menu/oo/base.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "constants.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "urllib.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "net_notice.qh" + #include "animdecide.qh" + #include "monsters/monsters.qh" + #include "monsters/sv_monsters.qh" + #include "monsters/spawn.qh" + #include "weapons/config.qh" + #include "weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/csqcprojectile.qh" + #include "../server/weapons/hitplot.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/spawning.qh" + #include "../server/weapons/throwing.qh" + #include "../server/weapons/tracing.qh" + #include "../server/weapons/weaponstats.qh" + #include "../server/weapons/weaponsystem.qh" + #include "../server/t_items.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "notifications.qh" + #include "deathtypes.qh" + #include "../server/mutators/mutators_include.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../server/vehicles/vehicles_def.qh" + #include "../server/campaign.qh" + #include "campaign_common.qh" +#endif + float MAPINFO_TYPE_ALL; entity MapInfo_Type_first; entity MapInfo_Type_last; @@ -165,3 +257,4 @@ void MapInfo_Shutdown(); // call this in the shutdown handler #define MAPINFO_SETTEMP_ACL_USER cvar_string("g_mapinfo_settemp_acl") #define MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -_* -g_ban* +*" +#endif \ No newline at end of file diff --git a/qcsrc/common/monsters/monsters.qc b/qcsrc/common/monsters/monsters.qc index 54cdf4ac4..3b694a691 100644 --- a/qcsrc/common/monsters/monsters.qc +++ b/qcsrc/common/monsters/monsters.qc @@ -1,3 +1,25 @@ +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../weapons/weapons.qh" + #include "monsters.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../util.qh" + #include "monsters.qh" + #include "sv_monsters.qh" + #include "../weapons/weapons.qh" + #include "../../server/t_items.qh" + #include "../../server/autocvars.qh" + #include "../../server/constants.qh" + #include "../../server/defs.qh" + #include "../deathtypes.qh" + #include "../../server/mutators/mutators_include.qh" + #include "../../csqcmodellib/sv_model.qh" +#endif #include "all.qh" // MONSTER PLUGIN SYSTEM diff --git a/qcsrc/common/monsters/monsters.qh b/qcsrc/common/monsters/monsters.qh index 612822e6e..22beb2647 100644 --- a/qcsrc/common/monsters/monsters.qh +++ b/qcsrc/common/monsters/monsters.qh @@ -1,3 +1,86 @@ +#ifndef MONSTERS_H +#define MONSTERS_H + +#if defined(CSQC) + #include "../util-pre.qh" + #include "../../client/sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../../client/sys-post.qh" + #include "../../client/Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../constants.qh" + #include "../stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../weapons/weapons.qh" + #include "../mapinfo.qh" + #include "../command/markup.qh" + #include "../command/rpn.qh" + #include "../command/generic.qh" + #include "../command/shared_defs.qh" + #include "../urllib.qh" + #include "../animdecide.qh" + #include "../../client/command/cl_cmd.qh" +#elif defined(MENUQC) + #include "../util-pre.qh" + #include "../../menu/sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../menu/sys-post.qh" + #include "../../menu/config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../util.qh" + #include "../test.qh" + #include "../../menu/oo/base.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../constants.qh" + #include "../mapinfo.qh" + #include "../campaign_common.qh" + #include "../weapons/weapons.qh" + #include "../counting.qh" + #include "../command/markup.qh" + #include "../command/rpn.qh" + #include "../command/generic.qh" + #include "../command/shared_defs.qh" + #include "../urllib.qh" +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "../command/markup.qh" + #include "../command/rpn.qh" + #include "../command/generic.qh" + #include "../command/shared_defs.qh" + #include "../net_notice.qh" + #include "../animdecide.qh" +#endif + // monster requests const int MR_SETUP = 1; // (SERVER) setup monster data const int MR_THINK = 2; // (SERVER) logic to run every frame @@ -65,3 +148,4 @@ int MON_LAST; #undef REGISTER_MONSTER ACCUMULATE_FUNCTION(RegisterMonsters, register_monsters_done); +#endif \ No newline at end of file diff --git a/qcsrc/common/monsters/spawn.qc b/qcsrc/common/monsters/spawn.qc index e6b5db8e3..0991ef621 100644 --- a/qcsrc/common/monsters/spawn.qc +++ b/qcsrc/common/monsters/spawn.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../util.qh" + #include "monsters.qh" + #include "sv_monsters.qh" + #include "spawn.qh" + #include "../../server/autocvars.qh" + #include "../../server/defs.qh" +#endif entity spawnmonster (string monster, float monster_id, entity spawnedby, entity own, vector orig, float respwn, float invincible, float moveflag) { // ensure spawnfunc database is initialized diff --git a/qcsrc/common/monsters/spawn.qh b/qcsrc/common/monsters/spawn.qh index 02d308677..44ea1708b 100644 --- a/qcsrc/common/monsters/spawn.qh +++ b/qcsrc/common/monsters/spawn.qh @@ -1 +1,36 @@ +#ifndef SPAWN_H +#define SPAWN_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "../command/markup.qh" + #include "../command/rpn.qh" + #include "../command/generic.qh" + #include "../command/shared_defs.qh" + #include "../net_notice.qh" + #include "../animdecide.qh" + #include "monsters.qh" + #include "sv_monsters.qh" +#endif entity spawnmonster (string monster, float monster_id, entity spawnedby, entity own, vector orig, float respwn, float invincible, float moveflag); +#endif \ No newline at end of file diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index d5cd1f3e4..7dadaee64 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -1,3 +1,30 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/common.qh" + #include "../constants.qh" + #include "../teams.qh" + #include "../util.qh" + #include "monsters.qh" + #include "sv_monsters.qh" + #include "../weapons/weapons.qh" + #include "../../server/autocvars.qh" + #include "../../server/defs.qh" + #include "../deathtypes.qh" + #include "../../server/mutators/mutators_include.qh" + #include "../../server/tturrets/include/turrets_early.qh" + #include "../../server/vehicles/vehicles_def.qh" + #include "../../server/campaign.qh" + #include "../../server/command/common.qh" + #include "../../server/command/cmd.qh" + #include "../../csqcmodellib/sv_model.qh" + #include "../../server/round_handler.qh" + #include "../../server/tturrets/include/turrets.qh" +#endif + // ========================= // SVQC Monster Properties // ========================= diff --git a/qcsrc/common/monsters/sv_monsters.qh b/qcsrc/common/monsters/sv_monsters.qh index 159ade2e3..1a3522aef 100644 --- a/qcsrc/common/monsters/sv_monsters.qh +++ b/qcsrc/common/monsters/sv_monsters.qh @@ -1,3 +1,37 @@ +#ifndef SV_MONSTERS_H +#define SV_MONSTERS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "../command/markup.qh" + #include "../command/rpn.qh" + #include "../command/generic.qh" + #include "../command/shared_defs.qh" + #include "../net_notice.qh" + #include "../animdecide.qh" + #include "monsters.qh" +#endif + .string spawnmob; .float monster_attack; @@ -86,3 +120,4 @@ const int MONSTER_MOVE_ENEMY = 5; // used only as a movestate const int MONSTER_STATE_ATTACK_LEAP = 1; const int MONSTER_STATE_ATTACK_MELEE = 2; +#endif \ No newline at end of file diff --git a/qcsrc/common/nades.qc b/qcsrc/common/nades.qc index e0d5cbc81..b90ba4c2e 100644 --- a/qcsrc/common/nades.qc +++ b/qcsrc/common/nades.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "nades.qh" + #include "buffs.qh" + #include "../client/movetypes.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../client/main.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "constants.qh" + #include "../server/constants.qh" +#endif + .float healer_lifetime; .float healer_radius; diff --git a/qcsrc/common/nades.qh b/qcsrc/common/nades.qh index b87375808..49fad4a55 100644 --- a/qcsrc/common/nades.qh +++ b/qcsrc/common/nades.qh @@ -1,3 +1,40 @@ +#ifndef NADES_H +#define NADES_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" +#endif + // use slots 70-100 const int PROJECTILE_NADE = 71; const int PROJECTILE_NADE_BURN = 72; @@ -101,3 +138,4 @@ string Nade_TrailEffect(float proj, float nade_team) // misc functions void ent_healer(); #endif // CSQC +#endif \ No newline at end of file diff --git a/qcsrc/common/net_notice.qc b/qcsrc/common/net_notice.qc index 084c83c22..2197b9ee5 100644 --- a/qcsrc/common/net_notice.qc +++ b/qcsrc/common/net_notice.qc @@ -1,3 +1,16 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "constants.qh" + #include "net_notice.qh" + #include "../server/defs.qh" +#endif + #ifdef SVQC void sv_notice_join_think() { diff --git a/qcsrc/common/net_notice.qh b/qcsrc/common/net_notice.qh index d94f1d98f..67621b588 100644 --- a/qcsrc/common/net_notice.qh +++ b/qcsrc/common/net_notice.qh @@ -1,3 +1,34 @@ +#ifndef NET_NOTICE_H +#define NET_NOTICE_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "urllib.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" +#endif + #ifdef CSQC void cl_notice_read(); void sv_notice_to(entity _to, string _notice, float _howlong, float _modal); @@ -11,3 +42,4 @@ void sv_notice_to(entity _to, string _notice, float _howlong, float _modal); void sv_notice_toall(string _notice, float _howlong, float _modal); void sv_notice_join(); #endif +#endif \ No newline at end of file diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 9391c6bc7..64daa613f 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -1,3 +1,28 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "teams.qh" + #include "util.qh" + #include "buffs.qh" + #include "counting.qh" + #include "weapons/weapons.qh" + #include "../client/autocvars.qh" + #include "notifications.qh" + #include "../client/main.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "constants.qh" + #include "teams.qh" + #include "counting.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "notifications.qh" + #include "../server/mutators/mutators_include.qh" +#endif + // ================================================ // Unified notification system, written by Samual // Last updated: August, 2013 diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 6844d6274..b905f6706 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -1,3 +1,85 @@ +#ifndef NOTIFICATIONS_H +#define NOTIFICATIONS_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "weapons/weapons.qh" + #include "mapinfo.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "urllib.qh" + #include "animdecide.qh" + #include "../client/command/cl_cmd.qh" + #include "monsters/monsters.qh" + #include "../client/autocvars.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "urllib.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "net_notice.qh" + #include "animdecide.qh" + #include "monsters/monsters.qh" + #include "monsters/sv_monsters.qh" + #include "monsters/spawn.qh" + #include "weapons/config.qh" + #include "weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/csqcprojectile.qh" + #include "../server/weapons/hitplot.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/spawning.qh" + #include "../server/weapons/throwing.qh" + #include "../server/weapons/tracing.qh" + #include "../server/weapons/weaponstats.qh" + #include "../server/weapons/weaponsystem.qh" + #include "../server/t_items.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" +#endif + // ================================================ // Unified notification system, written by Samual // Last updated: March, 2013 @@ -1643,3 +1725,4 @@ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotifications_Done); #undef MSG_CHOICE_NOTIF #undef NOTIF_ADD_AUTOCVAR +#endif \ No newline at end of file diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 60af8294f..b586ca4cd 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "constants.qh" + #include "util.qh" + #include "urllib.qh" + #include "weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/defs.qh" + #include "playerstats.qh" + #include "../server/scores.qh" +#endif + #ifdef SVQC void PlayerStats_Prematch(void) { diff --git a/qcsrc/common/playerstats.qh b/qcsrc/common/playerstats.qh index 1e132eab7..811e78ded 100644 --- a/qcsrc/common/playerstats.qh +++ b/qcsrc/common/playerstats.qh @@ -1,3 +1,97 @@ +#ifndef PLAYERSTATS_H +#define PLAYERSTATS_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" + #include "test.qh" + #include "../menu/oo/base.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "urllib.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" + #include "net_notice.qh" + #include "animdecide.qh" + #include "monsters/monsters.qh" + #include "monsters/sv_monsters.qh" + #include "monsters/spawn.qh" + #include "weapons/config.qh" + #include "weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/csqcprojectile.qh" + #include "../server/weapons/hitplot.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/spawning.qh" + #include "../server/weapons/throwing.qh" + #include "../server/weapons/tracing.qh" + #include "../server/weapons/weaponstats.qh" + #include "../server/weapons/weaponsystem.qh" + #include "../server/t_items.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "notifications.qh" + #include "deathtypes.qh" + #include "../server/mutators/mutators_include.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../server/vehicles/vehicles_def.qh" + #include "../server/campaign.qh" + #include "campaign_common.qh" + #include "mapinfo.qh" + #include "../server/command/common.qh" + #include "../server/command/banning.qh" + #include "../server/command/radarmap.qh" + #include "../server/command/vote.qh" + #include "../server/command/getreplies.qh" + #include "../server/command/cmd.qh" + #include "../server/command/sv_cmd.qh" + #include "csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "../server/anticheat.qh" + #include "../server/cheats.qh" +#endif + #ifdef SVQC //float PS_PM_IN_DB = -1; // playerstats_prematch_in_db // db for info COLLECTED at the beginning of a match float PS_GR_OUT_DB = -1; // playerstats_gamereport_out_db // db of info SENT at the end of a match @@ -113,3 +207,4 @@ void PlayerStats_PlayerDetail(void); void PlayerStats_PlayerDetail_CheckUpdate(void); void PlayerStats_PlayerDetail_Handler(entity fh, entity p, float status); #endif +#endif \ No newline at end of file diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 2bf147fd4..b1aeb017a 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -1,4 +1,30 @@ -// Full list of all stat constants, icnluded in a single location for easy reference +#ifndef STATS_H +#define STATS_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" +#endif + +// Full list of all stat constants, included in a single location for easy reference // 255 is the current limit (MAX_CL_STATS - 1), engine will need to be modified if you wish to add more stats const int MAX_CL_STATS = 256; @@ -288,3 +314,4 @@ const int STAT_MOVEVARS_MAXAIRSPEED = 252; const int STAT_MOVEVARS_STEPHEIGHT = 253; const int STAT_MOVEVARS_AIRACCEL_QW = 254; const int STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION = 255; +#endif \ No newline at end of file diff --git a/qcsrc/common/teams.qh b/qcsrc/common/teams.qh index 679405f3b..388b994e1 100644 --- a/qcsrc/common/teams.qh +++ b/qcsrc/common/teams.qh @@ -1,3 +1,47 @@ +#ifndef TEAMS_H +#define TEAMS_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" + #include "test.qh" + #include "../menu/oo/base.qh" + #include "playerstats.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" +#endif + #ifdef TEAMNUMBERS_THAT_ARENT_STUPID const int NUM_TEAM_1 = 1; // red const int NUM_TEAM_2 = 2; // blue @@ -165,3 +209,4 @@ float Team_TeamToNumber(float teamid) #define APP_TEAM_NUM_4(num,prefix) ((num == NUM_TEAM_1) ? prefix##RED : ((num == NUM_TEAM_2) ? prefix##BLUE : ((num == NUM_TEAM_3) ? prefix##YELLOW : prefix##PINK))) #define APP_TEAM_ENT_2(ent,prefix) ((ent.team == NUM_TEAM_1) ? prefix##RED : prefix##BLUE) #define APP_TEAM_ENT_4(ent,prefix) ((ent.team == NUM_TEAM_1) ? prefix##RED : ((ent.team == NUM_TEAM_2) ? prefix##BLUE : ((ent.team == NUM_TEAM_3) ? prefix##YELLOW : prefix##PINK))) +#endif \ No newline at end of file diff --git a/qcsrc/common/test.qc b/qcsrc/common/test.qc index 53b4476ae..3599819e7 100644 --- a/qcsrc/common/test.qc +++ b/qcsrc/common/test.qc @@ -1,3 +1,12 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "test.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/dpextensions.qc" + #include "test.qh" +#endif + float TEST_failed; float TEST_ok; diff --git a/qcsrc/common/test.qh b/qcsrc/common/test.qh index ff442cef9..6cda6f296 100644 --- a/qcsrc/common/test.qh +++ b/qcsrc/common/test.qh @@ -1,3 +1,52 @@ +#ifndef TEST_H +#define TEST_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" +#endif + #define TEST_Check(cond) do { if(!(cond)) TEST_Fail(#cond); } while(0) void TEST_OK(); @@ -5,3 +54,4 @@ void TEST_Fail(string cond); float TEST_RunAll(); float TEST_Run(string test); +#endif \ No newline at end of file diff --git a/qcsrc/common/urllib.qc b/qcsrc/common/urllib.qc index 518b207fc..2ab046cd9 100644 --- a/qcsrc/common/urllib.qc +++ b/qcsrc/common/urllib.qc @@ -1,3 +1,18 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "constants.qh" + #include "util.qh" + #include "urllib.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "constants.qh" + #include "util.qh" + #include "urllib.qh" +#endif + // files .float url_fh; const float URL_FH_CURL = -1; diff --git a/qcsrc/common/urllib.qh b/qcsrc/common/urllib.qh index 6353c33fe..4999a1d04 100644 --- a/qcsrc/common/urllib.qh +++ b/qcsrc/common/urllib.qh @@ -1,3 +1,75 @@ +#ifndef URLLIB_H +#define URLLIB_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" + #include "weapons/weapons.qh" + #include "mapinfo.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" + #include "test.qh" + #include "../menu/oo/base.qh" + #include "playerstats.qh" + #include "teams.qh" + #include "constants.qh" + #include "mapinfo.qh" + #include "campaign_common.qh" + #include "weapons/weapons.qh" + #include "counting.qh" + #include "command/markup.qh" + #include "command/rpn.qh" + #include "command/generic.qh" + #include "command/shared_defs.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" + #include "util.qh" + #include "nades.qh" + #include "buffs.qh" + #include "test.qh" + #include "counting.qh" +#endif + const float URL_READY_ERROR = -1; const float URL_READY_CLOSED = 0; const float URL_READY_CANWRITE = 1; @@ -16,3 +88,4 @@ float url_URI_Get_Callback(float id, float status, string data); #define NUM_URL_ID (URI_GET_URLLIB_END - URI_GET_URLLIB + 1) void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass); +#endif \ No newline at end of file diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index bba5af1f4..d8bd8636a 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -1,3 +1,11 @@ +#ifndef UTIL_PRE_H +#define UTIL_PRE_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + #ifndef NOCOMPAT #define COMPAT_NO_MOD_IS_XONOTIC #endif @@ -28,3 +36,4 @@ const bool true = 1; const bool false = 0; #endif +#endif \ No newline at end of file diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 7b3df7f77..2d5170dcb 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -1,3 +1,27 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "constants.qh" + #include "../warpzonelib/mathlib.qh" + #include "util.qh" + #include "mapinfo.qh" + #include "notifications.qh" + #include "deathtypes.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/mathlib.qh" + #include "constants.qh" + #include "util.qh" + #include "../server/autocvars.qh" + #include "../server/defs.qh" + #include "notifications.qh" + #include "deathtypes.qh" + #include "mapinfo.qh" +#endif + string wordwrap_buffer; void wordwrap_buffer_put(string s) diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 3d4e9b9e9..efe6d30ec 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -1,3 +1,45 @@ +#ifndef COMMON_UTIL_H +#define COMMON_UTIL_H + +#if defined(CSQC) + #include "util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "constants.qh" + #include "stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "playerstats.qh" + #include "teams.qh" +#elif defined(MENUQC) + #include "util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" + #include "../warpzonelib/mathlib.qh" +#elif defined(SVQC) + #include "util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "constants.qh" + #include "stats.qh" + #include "teams.qh" +#endif + #ifdef QCC_SUPPORT_ACCUMULATE # define ACCUMULATE_FUNCTION(func,otherfunc) \ [[accumulate]] void func() { otherfunc(); } @@ -441,4 +483,5 @@ vector bezier_quadratic_getderivative(vector a, vector p, vector b, float t); #define APPEND_TO_STRING(list,sep,add) ((list) = (((list) != "") ? strcat(list, sep, add) : (add))) // Returns the correct difference between two always increasing numbers -#define COMPARE_INCREASING(to,from) (to < from ? from + to + 2 : to - from) \ No newline at end of file +#define COMPARE_INCREASING(to,from) (to < from ? from + to + 2 : to - from) +#endif \ No newline at end of file diff --git a/qcsrc/common/weapons/config.qc b/qcsrc/common/weapons/config.qc index 3a41d094f..ab6e7905c 100644 --- a/qcsrc/common/weapons/config.qc +++ b/qcsrc/common/weapons/config.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../util.qh" + #include "config.qh" + #include "weapons.qh" +#endif + // ========================== // Balance Config Generator // ========================== diff --git a/qcsrc/common/weapons/config.qh b/qcsrc/common/weapons/config.qh index 4412c0c6c..affba63a0 100644 --- a/qcsrc/common/weapons/config.qh +++ b/qcsrc/common/weapons/config.qh @@ -1,13 +1,49 @@ +#ifndef WEAPONS_CONFIG_H +#define WEAPONS_CONFIG_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "../command/markup.qh" + #include "../command/rpn.qh" + #include "../command/generic.qh" + #include "../command/shared_defs.qh" + #include "../net_notice.qh" + #include "../animdecide.qh" + #include "../monsters/monsters.qh" + #include "../monsters/sv_monsters.qh" + #include "../monsters/spawn.qh" +#endif + // ========================== // Balance Config Generator // ========================== void Dump_Weapon_Settings(void); -float wep_config_file; -float wep_config_alsoprint; +int wep_config_file; +bool wep_config_alsoprint; -const float MAX_WEP_CONFIG = 256; -float WEP_CONFIG_COUNT; +const int MAX_WEP_CONFIG = 256; +int WEP_CONFIG_COUNT; string wep_config_queue[MAX_WEP_CONFIG]; #define WEP_CONFIG_QUEUE(a) { \ @@ -43,3 +79,4 @@ string wep_config_queue[MAX_WEP_CONFIG]; cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) } #define WEP_CONFIG_WRITE_PROPS(wepid,wepname,type,prop,name) WEP_CONFIG_WRITE_PROPS_##type(wepname,name) +#endif \ No newline at end of file diff --git a/qcsrc/common/weapons/weapons.qc b/qcsrc/common/weapons/weapons.qc index 7b91f1d30..ff97b16c5 100644 --- a/qcsrc/common/weapons/weapons.qc +++ b/qcsrc/common/weapons/weapons.qc @@ -1,3 +1,54 @@ +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../../client/Defs.qc" + #include "../constants.qh" + #include "../stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../util.qh" + #include "../buffs.qh" + #include "weapons.qh" + #include "../../client/autocvars.qh" + #include "../deathtypes.qh" + #include "../../csqcmodellib/interpolate.qh" + #include "../../client/movetypes.qh" + #include "../../client/main.qh" + #include "../../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../buffs.qh" + #include "../monsters/monsters.qh" + #include "config.qh" + #include "weapons.qh" + #include "../../server/weapons/csqcprojectile.qh" + #include "../../server/weapons/tracing.qh" + #include "../../server/t_items.qh" + #include "../../server/autocvars.qh" + #include "../../server/constants.qh" + #include "../../server/defs.qh" + #include "../notifications.qh" + #include "../deathtypes.qh" + #include "../../server/mutators/mutators_include.qh" + #include "../mapinfo.qh" + #include "../../server/command/common.qh" + #include "../../csqcmodellib/sv_model.qh" + #include "../../server/portals.qh" + #include "../../server/g_hook.qh" +#endif #ifndef MENUQC #include "calculations.qc" #endif diff --git a/qcsrc/common/weapons/weapons.qh b/qcsrc/common/weapons/weapons.qh index 1b0061e66..00ee68b4e 100644 --- a/qcsrc/common/weapons/weapons.qh +++ b/qcsrc/common/weapons/weapons.qh @@ -1,3 +1,74 @@ +#ifndef WEAPONS_H +#define WEAPONS_H + +#if defined(CSQC) + #include "../util-pre.qh" + #include "../../client/sys-pre.qh" + #include "../../dpdefs/csprogsdefs.qc" + #include "../../client/sys-post.qh" + #include "../../client/Defs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../constants.qh" + #include "../stats.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/client.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" +#elif defined(MENUQC) + #include "../util-pre.qh" + #include "../../menu/sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../../menu/sys-post.qh" + #include "../../menu/config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../util.qh" + #include "../test.qh" + #include "../../menu/oo/base.qh" + #include "../playerstats.qh" + #include "../teams.qh" + #include "../constants.qh" + #include "../mapinfo.qh" + #include "../campaign_common.qh" +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "../command/markup.qh" + #include "../command/rpn.qh" + #include "../command/generic.qh" + #include "../command/shared_defs.qh" + #include "../net_notice.qh" + #include "../animdecide.qh" + #include "../monsters/monsters.qh" + #include "../monsters/sv_monsters.qh" + #include "../monsters/spawn.qh" + #include "config.qh" +#endif + #ifndef MENUQC #include "calculations.qh" #endif @@ -206,3 +277,4 @@ void register_weapons_done(); #undef REGISTER_WEAPON ACCUMULATE_FUNCTION(RegisterWeapons, register_weapons_done); +#endif \ No newline at end of file diff --git a/qcsrc/csqcmodellib/cl_model.qc b/qcsrc/csqcmodellib/cl_model.qc index 78150ddd5..83355d654 100644 --- a/qcsrc/csqcmodellib/cl_model.qc +++ b/qcsrc/csqcmodellib/cl_model.qc @@ -19,6 +19,19 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ + #if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "../common/util.qh" + #include "../common/animdecide.qh" + #include "interpolate.qh" + #include "../common/csqcmodel_settings.qh" + #include "common.qh" + #include "cl_model.qh" + #include "cl_player.qh" + #elif defined(MENUQC) + #elif defined(SVQC) + #endif float autocvar_cl_lerpanim_maxdelta_framegroups = 0.1; float autocvar_cl_nolerp = 0; diff --git a/qcsrc/csqcmodellib/cl_model.qh b/qcsrc/csqcmodellib/cl_model.qh index ded735741..f49f800fb 100644 --- a/qcsrc/csqcmodellib/cl_model.qh +++ b/qcsrc/csqcmodellib/cl_model.qh @@ -19,6 +19,61 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ +#ifndef CL_MODEL_H +#define CL_MODEL_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "../client/command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "../client/autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "../client/damage.qh" + #include "interpolate.qh" + #include "../client/teamradar.qh" + #include "../client/hud.qh" + #include "../client/scoreboard.qh" + #include "../client/waypointsprites.qh" + #include "../client/movetypes.qh" + #include "../client/prandom.qh" + #include "../client/bgmscript.qh" + #include "../client/noise.qh" + #include "../client/tturrets.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../client/main.qh" + #include "../client/vehicles/vehicles.qh" + #include "../common/csqcmodel_settings.qh" + #include "common.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif void CSQCModel_Read(float isnew); @@ -48,3 +103,4 @@ void CSQCModel_InterpolateAnimation_1To2_Note(float sf, float set_times); void CSQCModel_InterpolateAnimation_2To4_Do(); void CSQCModel_InterpolateAnimation_1To2_Do(); // will overwrite lerpfrac, lerpfrac3, lerpfrac4, and possibly clear frame*time if they are undisplayed according to lerpfracs +#endif \ No newline at end of file diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index 64fe370a2..1cc357f58 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -19,6 +19,20 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/util.qh" + #include "interpolate.qh" + #include "../client/main.qh" + #include "common.qh" + #include "cl_model.qh" + #include "cl_player.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif float autocvar_cl_movement_errorcompensation = 0; diff --git a/qcsrc/csqcmodellib/cl_player.qh b/qcsrc/csqcmodellib/cl_player.qh index 92ac5481e..917c58e2f 100644 --- a/qcsrc/csqcmodellib/cl_player.qh +++ b/qcsrc/csqcmodellib/cl_player.qh @@ -19,6 +19,62 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ +#ifndef CL_PLAYER_H +#define CL_PLAYER_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "../client/command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "../client/autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "../client/damage.qh" + #include "interpolate.qh" + #include "../client/teamradar.qh" + #include "../client/hud.qh" + #include "../client/scoreboard.qh" + #include "../client/waypointsprites.qh" + #include "../client/movetypes.qh" + #include "../client/prandom.qh" + #include "../client/bgmscript.qh" + #include "../client/noise.qh" + #include "../client/tturrets.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../client/main.qh" + #include "../client/vehicles/vehicles.qh" + #include "../common/csqcmodel_settings.qh" + #include "common.qh" + #include "cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif entity csqcplayer; float csqcplayer_status; @@ -36,3 +92,4 @@ void CSQCPlayer_SetCamera(); float CSQCPlayer_PreUpdate(); float CSQCPlayer_PostUpdate(); float CSQCPlayer_IsLocalPlayer(); +#endif \ No newline at end of file diff --git a/qcsrc/csqcmodellib/common.qh b/qcsrc/csqcmodellib/common.qh index 8cd5aa698..39325b519 100644 --- a/qcsrc/csqcmodellib/common.qh +++ b/qcsrc/csqcmodellib/common.qh @@ -19,6 +19,120 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ +#ifndef CSQCMODELLIB_COMMON_H +#define CSQCMODELLIB_COMMON_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "../client/command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "../client/autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "../client/damage.qh" + #include "interpolate.qh" + #include "../client/teamradar.qh" + #include "../client/hud.qh" + #include "../client/scoreboard.qh" + #include "../client/waypointsprites.qh" + #include "../client/movetypes.qh" + #include "../client/prandom.qh" + #include "../client/bgmscript.qh" + #include "../client/noise.qh" + #include "../client/tturrets.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../client/main.qh" + #include "../client/vehicles/vehicles.qh" + #include "../common/csqcmodel_settings.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/csqcprojectile.qh" + #include "../server/weapons/hitplot.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/spawning.qh" + #include "../server/weapons/throwing.qh" + #include "../server/weapons/tracing.qh" + #include "../server/weapons/weaponstats.qh" + #include "../server/weapons/weaponsystem.qh" + #include "../server/t_items.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "../server/mutators/mutators_include.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../server/vehicles/vehicles_def.qh" + #include "../server/campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "../server/command/common.qh" + #include "../server/command/banning.qh" + #include "../server/command/radarmap.qh" + #include "../server/command/vote.qh" + #include "../server/command/getreplies.qh" + #include "../server/command/cmd.qh" + #include "../server/command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" +#endif noref string csqcmodel_license = "\ Copyright (c) 2011 Rudolf Polzer\ @@ -90,3 +204,4 @@ const int CSQCMODEL_PROPERTY_SIZE = 32768; #else #define ALLPROPERTIES ALLPROPERTIES_COMMON #endif +#endif \ No newline at end of file diff --git a/qcsrc/csqcmodellib/interpolate.qc b/qcsrc/csqcmodellib/interpolate.qc index 4632cec46..583f41f8f 100644 --- a/qcsrc/csqcmodellib/interpolate.qc +++ b/qcsrc/csqcmodellib/interpolate.qc @@ -19,6 +19,16 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../client/Defs.qc" + #include "../warpzonelib/anglestransform.qh" + #include "../client/autocvars.qh" + #include "interpolate.qh" + #include "cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif .vector iorigin1, iorigin2; .vector ivelocity1, ivelocity2; diff --git a/qcsrc/csqcmodellib/interpolate.qh b/qcsrc/csqcmodellib/interpolate.qh index a29fdc46d..9aade3b68 100644 --- a/qcsrc/csqcmodellib/interpolate.qh +++ b/qcsrc/csqcmodellib/interpolate.qh @@ -19,6 +19,46 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ +#ifndef INTERPOLATE_H +#define INTERPOLATE_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "../client/command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "../client/autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "../client/damage.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif .int iflags; const int IFLAG_VELOCITY = 1; @@ -47,3 +87,4 @@ void InterpolateOrigin_Do(); // in case we interpolate that: .vector v_angle; +#endif \ No newline at end of file diff --git a/qcsrc/csqcmodellib/sv_model.qc b/qcsrc/csqcmodellib/sv_model.qc index cbc26213c..9ac6ed02e 100644 --- a/qcsrc/csqcmodellib/sv_model.qc +++ b/qcsrc/csqcmodellib/sv_model.qc @@ -20,6 +20,20 @@ * IN THE SOFTWARE. */ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/animdecide.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "common.qh" + #include "sv_model.qh" +#endif + // generic CSQC model code float CSQCModel_Send(entity to, float sf) diff --git a/qcsrc/csqcmodellib/sv_model.qh b/qcsrc/csqcmodellib/sv_model.qh index 3c4ce2b78..a4bbd4558 100644 --- a/qcsrc/csqcmodellib/sv_model.qh +++ b/qcsrc/csqcmodellib/sv_model.qh @@ -1,3 +1,5 @@ +#ifndef SV_MODEL_H +#define SV_MODEL_H /* * Copyright (c) 2011 Rudolf Polzer * @@ -20,6 +22,72 @@ * IN THE SOFTWARE. */ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "../server/weapons/accuracy.qh" + #include "../server/weapons/common.qh" + #include "../server/weapons/csqcprojectile.qh" + #include "../server/weapons/hitplot.qh" + #include "../server/weapons/selection.qh" + #include "../server/weapons/spawning.qh" + #include "../server/weapons/throwing.qh" + #include "../server/weapons/tracing.qh" + #include "../server/weapons/weaponstats.qh" + #include "../server/weapons/weaponsystem.qh" + #include "../server/t_items.qh" + #include "../server/autocvars.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "../server/mutators/mutators_include.qh" + #include "../server/tturrets/include/turrets_early.qh" + #include "../server/vehicles/vehicles_def.qh" + #include "../server/campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "../server/command/common.qh" + #include "../server/command/banning.qh" + #include "../server/command/radarmap.qh" + #include "../server/command/vote.qh" + #include "../server/command/getreplies.qh" + #include "../server/command/cmd.qh" + #include "../server/command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "common.qh" +#endif + // generic CSQC model code void CSQCModel_CheckUpdate(); @@ -37,3 +105,4 @@ void CSQCModel_UnlinkEntity(); #undef CSQCMODEL_PROPERTY #undef CSQCMODEL_ENDIF #undef CSQCMODEL_IF +#endif \ No newline at end of file diff --git a/qcsrc/dpdefs/csprogsdefs.qc b/qcsrc/dpdefs/csprogsdefs.qc index 3a318cc4a..dac4c1651 100644 --- a/qcsrc/dpdefs/csprogsdefs.qc +++ b/qcsrc/dpdefs/csprogsdefs.qc @@ -1,3 +1,5 @@ +#ifndef CSPROGSDEFS_H +#define CSPROGSDEFS_H /* ============================================================================== @@ -1442,3 +1444,4 @@ vector gettaginfo_forward; vector gettaginfo_right; vector gettaginfo_up; float checkpvs(vector viewpos, entity viewee) = #240; +#endif \ No newline at end of file diff --git a/qcsrc/dpdefs/dpextensions.qc b/qcsrc/dpdefs/dpextensions.qc index a38746e59..443d3248b 100644 --- a/qcsrc/dpdefs/dpextensions.qc +++ b/qcsrc/dpdefs/dpextensions.qc @@ -1,3 +1,5 @@ +#ifndef DPEXTENSIONS_H +#define DPEXTENSIONS_H //DarkPlaces supported extension list, draft version 1.04 //things that don't have extensions yet: @@ -2553,3 +2555,4 @@ void(float pause) setpause = #531; float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513; //description: //use -1 as buffer handle to justs end delim as postdata +#endif \ No newline at end of file diff --git a/qcsrc/dpdefs/keycodes.qc b/qcsrc/dpdefs/keycodes.qc index 65fe815b0..9ed47ec96 100644 --- a/qcsrc/dpdefs/keycodes.qc +++ b/qcsrc/dpdefs/keycodes.qc @@ -1,3 +1,11 @@ +#ifndef KEYCODES_H +#define KEYCODES_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + /////////////////////////// // key constants @@ -144,4 +152,4 @@ float K_MOUSE13 = 526; float K_MOUSE14 = 527; float K_MOUSE15 = 528; float K_MOUSE16 = 529; - +#endif \ No newline at end of file diff --git a/qcsrc/dpdefs/menudefs.qc b/qcsrc/dpdefs/menudefs.qc index 98a8003f2..94ac814ae 100644 --- a/qcsrc/dpdefs/menudefs.qc +++ b/qcsrc/dpdefs/menudefs.qc @@ -1,3 +1,11 @@ +#ifndef MENUDEFS_H +#define MENUDEFS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + ////////////////////////////////////////////////////////// // sys globals @@ -563,3 +571,4 @@ string getextresponse(void) = #624; const string cvar_string(string name) = #71; const string cvar_defstring(string name) = #89; float stringwidth(string text, float handleColors, vector size) = #468; +#endif \ No newline at end of file diff --git a/qcsrc/dpdefs/progsdefs.qc b/qcsrc/dpdefs/progsdefs.qc index 210ad1b8d..0064060a4 100644 --- a/qcsrc/dpdefs/progsdefs.qc +++ b/qcsrc/dpdefs/progsdefs.qc @@ -1,3 +1,6 @@ +#ifndef PROGSDEFS_H +#define PROGSDEFS_H + /* ============================================================================== @@ -502,3 +505,4 @@ void(entity e) setspawnparms = #78; // set parm1... to the // for coop respawn //============================================================================ +#endif \ No newline at end of file diff --git a/qcsrc/menu/command/menu_cmd.qc b/qcsrc/menu/command/menu_cmd.qc index c7499e58e..ee556ba00 100644 --- a/qcsrc/menu/command/menu_cmd.qc +++ b/qcsrc/menu/command/menu_cmd.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) + #include "../../dpdefs/menudefs.qc" + #include "../../common/util.qh" + #include "../oo/base.qh" + #include "menu_cmd.qh" + #include "../menu.qh" +#elif defined(SVQC) +#endif + string _dumptree_space; void _dumptree_open(entity pass, entity me) { diff --git a/qcsrc/menu/command/menu_cmd.qh b/qcsrc/menu/command/menu_cmd.qh index 7a18fe2de..c75d8e3c1 100644 --- a/qcsrc/menu/command/menu_cmd.qh +++ b/qcsrc/menu/command/menu_cmd.qh @@ -1 +1,33 @@ +#ifndef MENU_CMD_H +#define MENU_CMD_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../sys-post.qh" + #include "../config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../common/util.qh" + #include "../../common/test.qh" + #include "../oo/base.qh" + #include "../../common/playerstats.qh" + #include "../../common/teams.qh" + #include "../../common/constants.qh" + #include "../../common/mapinfo.qh" + #include "../../common/campaign_common.qh" + #include "../../common/weapons/weapons.qh" + #include "../../common/counting.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/urllib.qh" + #include "../../common/monsters/monsters.qh" +#elif defined(SVQC) +#endif + void GameCommand(string command); +#endif \ No newline at end of file diff --git a/qcsrc/menu/config.qh b/qcsrc/menu/config.qh index ceb266ac9..f2c4a9b43 100644 --- a/qcsrc/menu/config.qh +++ b/qcsrc/menu/config.qh @@ -1,3 +1,14 @@ -// build config file -#define MENUQC // so common/*.qc can check for menu QC or game QC +#ifndef CONFIG_H +#define CONFIG_H +#if defined(CSQC) +#elif defined(MENUQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "sys-post.qh" +#elif defined(SVQC) +#endif + +#endif \ No newline at end of file diff --git a/qcsrc/menu/draw.qc b/qcsrc/menu/draw.qc index ff9d9590d..fa7c65c51 100644 --- a/qcsrc/menu/draw.qc +++ b/qcsrc/menu/draw.qc @@ -1,3 +1,8 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + string draw_mousepointer; vector draw_mousepointer_offset; vector draw_mousepointer_size; diff --git a/qcsrc/menu/draw.qh b/qcsrc/menu/draw.qh index 96e0233df..95667434d 100644 --- a/qcsrc/menu/draw.qh +++ b/qcsrc/menu/draw.qh @@ -1,3 +1,36 @@ +#ifndef DRAW_H +#define DRAW_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "sys-post.qh" + #include "config.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/util.qh" + #include "../common/test.qh" + #include "oo/base.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/constants.qh" + #include "../common/mapinfo.qh" + #include "../common/campaign_common.qh" + #include "../common/weapons/weapons.qh" + #include "../common/counting.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/monsters/monsters.qh" + #include "command/menu_cmd.qh" + #include "menu.qh" +#elif defined(SVQC) +#endif + // from the engine vector drawfontscale; #define draw_fontscale drawfontscale @@ -38,3 +71,4 @@ vector globalToBoxSize(vector v, vector scale); float draw_TextWidth_WithColors(string s, vector size); float draw_TextWidth_WithoutColors(string s, vector size); +#endif \ No newline at end of file diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 94446bd3f..ec19cb9e1 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -1,3 +1,8 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + /////////////////////////////////////////////// // Menu Source File /////////////////////// diff --git a/qcsrc/menu/menu.qh b/qcsrc/menu/menu.qh index b6c0795a8..bae23e4f7 100644 --- a/qcsrc/menu/menu.qh +++ b/qcsrc/menu/menu.qh @@ -1,3 +1,35 @@ +#ifndef MENU_H +#define MENU_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "sys-post.qh" + #include "config.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/util.qh" + #include "../common/test.qh" + #include "oo/base.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/constants.qh" + #include "../common/mapinfo.qh" + #include "../common/campaign_common.qh" + #include "../common/weapons/weapons.qh" + #include "../common/counting.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/monsters/monsters.qh" + #include "command/menu_cmd.qh" +#elif defined(SVQC) +#endif + #define localcmd cmd #define NULL (null_entity) @@ -38,3 +70,4 @@ void preMenuDraw(); // this is run before the menu is drawn. You may put some st void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else. void m_sync(); +#endif \ No newline at end of file diff --git a/qcsrc/menu/oo/base.qh b/qcsrc/menu/oo/base.qh index ed4eba5a1..72280a1d1 100644 --- a/qcsrc/menu/oo/base.qh +++ b/qcsrc/menu/oo/base.qh @@ -1,3 +1,20 @@ +#ifndef BASE_H +#define BASE_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../sys-post.qh" + #include "../config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../common/util.qh" + #include "../../common/test.qh" +#elif defined(SVQC) +#endif + .string classname; entity Object_vtbl; .string vtblname; @@ -25,3 +42,4 @@ entity spawnObject() Object_vtbl = spawnVtbl(e, null_entity); return e; } +#endif \ No newline at end of file diff --git a/qcsrc/menu/oo/implementation.qh b/qcsrc/menu/oo/implementation.qh index 28b7f08e4..b8073e6ba 100644 --- a/qcsrc/menu/oo/implementation.qh +++ b/qcsrc/menu/oo/implementation.qh @@ -1,3 +1,40 @@ +#ifndef IMPLEMENTATION_H +#define IMPLEMENTATION_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../sys-post.qh" + #include "../config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../common/util.qh" + #include "../../common/test.qh" + #include "base.qh" + #include "../../common/playerstats.qh" + #include "../../common/teams.qh" + #include "../../common/constants.qh" + #include "../../common/mapinfo.qh" + #include "../../common/campaign_common.qh" + #include "../../common/weapons/weapons.qh" + #include "../../common/counting.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/urllib.qh" + #include "../../common/monsters/monsters.qh" + #include "../command/menu_cmd.qh" + #include "../menu.qh" + #include "../draw.qh" + #include "../skin.qh" + #include "../xonotic/util.qh" + #include "interface.qh" +#elif defined(SVQC) +#endif + #ifndef INTERFACE #define INTERFACE #endif @@ -26,3 +63,4 @@ // for the implementation #define SUPER(cname) (cname##_vtbl.vtblbase) +#endif \ No newline at end of file diff --git a/qcsrc/menu/oo/interface.qh b/qcsrc/menu/oo/interface.qh index 1e122066c..8d25f5e37 100644 --- a/qcsrc/menu/oo/interface.qh +++ b/qcsrc/menu/oo/interface.qh @@ -1,3 +1,39 @@ +#ifndef INTERFACE_H +#define INTERFACE_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../sys-post.qh" + #include "../config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../common/util.qh" + #include "../../common/test.qh" + #include "base.qh" + #include "../../common/playerstats.qh" + #include "../../common/teams.qh" + #include "../../common/constants.qh" + #include "../../common/mapinfo.qh" + #include "../../common/campaign_common.qh" + #include "../../common/weapons/weapons.qh" + #include "../../common/counting.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/urllib.qh" + #include "../../common/monsters/monsters.qh" + #include "../command/menu_cmd.qh" + #include "../menu.qh" + #include "../draw.qh" + #include "../skin.qh" + #include "../xonotic/util.qh" +#elif defined(SVQC) +#endif + #ifndef INTERFACE #define INTERFACE #endif @@ -23,3 +59,4 @@ #define ATTRIBARRAY(cname,name,type,cnt) .type name[cnt]; #define ENDCLASS(cname) .float instanceOf##cname; #define SUPER(cname) +#endif \ No newline at end of file diff --git a/qcsrc/menu/skin.qh b/qcsrc/menu/skin.qh index d44f6577e..87f5b4928 100644 --- a/qcsrc/menu/skin.qh +++ b/qcsrc/menu/skin.qh @@ -1,3 +1,37 @@ +#ifndef SKIN_H +#define SKIN_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "sys-post.qh" + #include "config.qh" + #include "../warpzonelib/mathlib.qh" + #include "../common/util.qh" + #include "../common/test.qh" + #include "oo/base.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/constants.qh" + #include "../common/mapinfo.qh" + #include "../common/campaign_common.qh" + #include "../common/weapons/weapons.qh" + #include "../common/counting.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/monsters/monsters.qh" + #include "command/menu_cmd.qh" + #include "menu.qh" + #include "draw.qh" +#elif defined(SVQC) +#endif + #define SKINBEGIN #define SKINVECTOR(name,def) vector SKIN##name = def #define SKINFLOAT(name,def) float SKIN##name = def @@ -24,3 +58,4 @@ #undef SKINFLOAT #undef SKINVECTOR #undef SKINBEGIN +#endif \ No newline at end of file diff --git a/qcsrc/menu/sys-post.qh b/qcsrc/menu/sys-post.qh index e466fb482..187459091 100644 --- a/qcsrc/menu/sys-post.qh +++ b/qcsrc/menu/sys-post.qh @@ -1 +1,14 @@ +#ifndef SYS_POST_H +#define SYS_POST_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" +#elif defined(SVQC) +#endif + #pragma noref 0 +#endif \ No newline at end of file diff --git a/qcsrc/menu/sys-pre.qh b/qcsrc/menu/sys-pre.qh index a964ae961..3122cdf57 100644 --- a/qcsrc/menu/sys-pre.qh +++ b/qcsrc/menu/sys-pre.qh @@ -1 +1,11 @@ +#ifndef SYS_PRE_H +#define SYS_PRE_H + +#if defined(CSQC) +#elif defined(MENUQC) + #include "../common/util-pre.qh" +#elif defined(SVQC) +#endif + #pragma noref 1 +#endif \ No newline at end of file diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 95a7439a6..f7e8a41a6 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -1,3 +1,8 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + float GL_CheckExtension(string ext) { return (strstrofs(strcat(" ", cvar_string("gl_info_extensions"), " "), strcat(" ", ext, " "), 0) >= 0); diff --git a/qcsrc/menu/xonotic/util.qh b/qcsrc/menu/xonotic/util.qh index 33ecb8c4d..aad853485 100644 --- a/qcsrc/menu/xonotic/util.qh +++ b/qcsrc/menu/xonotic/util.qh @@ -1,3 +1,37 @@ +#ifndef MENU_UTIL_H +#define MENU_UTIL_H +#if defined(CSQC) +#elif defined(MENUQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/menudefs.qc" + #include "../../dpdefs/keycodes.qc" + #include "../sys-post.qh" + #include "../config.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../common/util.qh" + #include "../../common/test.qh" + #include "../oo/base.qh" + #include "../../common/playerstats.qh" + #include "../../common/teams.qh" + #include "../../common/constants.qh" + #include "../../common/mapinfo.qh" + #include "../../common/campaign_common.qh" + #include "../../common/weapons/weapons.qh" + #include "../../common/counting.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/urllib.qh" + #include "../../common/monsters/monsters.qh" + #include "../command/menu_cmd.qh" + #include "../menu.qh" + #include "../draw.qh" + #include "../skin.qh" +#elif defined(SVQC) +#endif + float GL_CheckExtension(string ext); float GL_Have_TextureCompression(); @@ -51,3 +85,4 @@ string _Nex_ExtResponseSystem_RecommendedServers; float _Nex_ExtResponseSystem_RecommendedServersNeedsRefresh; void CheckSendCvars(entity me, string cvarnamestring); +#endif \ No newline at end of file diff --git a/qcsrc/server/anticheat.qc b/qcsrc/server/anticheat.qc index 33c829131..a9d7fa8c8 100644 --- a/qcsrc/server/anticheat.qc +++ b/qcsrc/server/anticheat.qc @@ -1,3 +1,16 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/mathlib.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "command/common.qh" + #include "anticheat.qh" +#endif + .float anticheat_jointime; void mean_accumulate(entity e, .float a, .float c, float mean, float value, float weight) diff --git a/qcsrc/server/anticheat.qh b/qcsrc/server/anticheat.qh index e46dcce7b..f256cf7dd 100644 --- a/qcsrc/server/anticheat.qh +++ b/qcsrc/server/anticheat.qh @@ -1,3 +1,73 @@ +#ifndef ANTICHEAT_H +#define ANTICHEAT_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" +#endif + void anticheat_init(); void anticheat_report(); void anticheat_shutdown(); @@ -12,3 +82,4 @@ void anticheat_startframe(); void anticheat_endframe(); void anticheat_fixangle(); +#endif \ No newline at end of file diff --git a/qcsrc/server/antilag.qc b/qcsrc/server/antilag.qc index 5dfce7513..dc20370ee 100644 --- a/qcsrc/server/antilag.qc +++ b/qcsrc/server/antilag.qc @@ -1,3 +1,12 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "vehicles/vehicles_def.qh" + #include "antilag.qh" +#endif + const float ANTILAG_MAX_ORIGINS = 64; .vector antilag_origins[ANTILAG_MAX_ORIGINS]; .float antilag_times[ANTILAG_MAX_ORIGINS]; diff --git a/qcsrc/server/antilag.qh b/qcsrc/server/antilag.qh index b89f12bb1..555547d37 100644 --- a/qcsrc/server/antilag.qh +++ b/qcsrc/server/antilag.qh @@ -1,3 +1,83 @@ +#ifndef ANTILAG_H +#define ANTILAG_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "mapvoting.qh" + #include "ipban.qh" + #include "race.qh" +#endif + void antilag_record(entity e, float t); vector antilag_takebackorigin(entity e, float t); vector antilag_takebackavgvelocity(entity e, float t0, float t1); @@ -9,3 +89,4 @@ void antilag_clear(entity e); #define ANTILAG_LATENCY(e) min(0.4, e.ping * 0.001) // add one ticrate? +#endif \ No newline at end of file diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 4ef4ee379..760f6ddd4 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1,3 +1,52 @@ +#ifndef SERVER_AUTOCVARS_H +#define SERVER_AUTOCVARS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" +#endif + bool autocvar__notarget; bool autocvar__independent_players; bool autocvar__campaign_testrun; @@ -879,4 +928,4 @@ float autocvar_g_buffs_vampire_damage_steal; float autocvar_g_buffs_invisible_alpha; float autocvar_g_buffs_flight_gravity; float autocvar_g_buffs_jump_height; - +#endif \ No newline at end of file diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index d4737dba3..b45455c8e 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -1,3 +1,27 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../common/constants.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../mutators/mutators_include.qh" + #include "../campaign.qh" + #include "../../common/mapinfo.qh" + #include "../../csqcmodellib/sv_model.qh" + #include "../antilag.qh" +#endif + #include "bot.qh" #include "aim.qh" #include "navigation.qh" diff --git a/qcsrc/server/campaign.qc b/qcsrc/server/campaign.qc index 72e580b56..43a24ba99 100644 --- a/qcsrc/server/campaign.qc +++ b/qcsrc/server/campaign.qc @@ -1,3 +1,17 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "cheats.qh" +#endif + // campaign cvars: // _campaign_index: index of CURRENT map // _campaign_name: name of the current campaign diff --git a/qcsrc/server/campaign.qh b/qcsrc/server/campaign.qh index 487deb982..e80666bc9 100644 --- a/qcsrc/server/campaign.qh +++ b/qcsrc/server/campaign.qh @@ -1,3 +1,59 @@ +#ifndef CAMPAIGN_H +#define CAMPAIGN_H +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" +#endif + // this must be included BEFORE campaign_common.h to make this a memory saving #define CAMPAIGN_MAX_ENTRIES 2 @@ -13,3 +69,4 @@ void CampaignLevelWarp(float n); float campaign_bots_may_start; // campaign mode: bots shall spawn but wait for the player to spawn before they do anything // in other game modes, this is ignored +#endif \ No newline at end of file diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 28bb86cb8..716f4068d 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -1,3 +1,23 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/util_server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/monsters/monsters.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/tracing.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "../csqcmodellib/sv_model.qh" + #include "cheats.qh" +#endif + void CopyBody(float keepvelocity); #ifdef NOCHEATS diff --git a/qcsrc/server/cheats.qh b/qcsrc/server/cheats.qh index 1f31addee..dde27e892 100644 --- a/qcsrc/server/cheats.qh +++ b/qcsrc/server/cheats.qh @@ -1,3 +1,74 @@ +#ifndef CHEATS_H +#define CHEATS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" +#endif + //float autocvar_sv_cheats; // must... declare... global float cheatcount_total; @@ -11,3 +82,4 @@ float CheatCommand(float argc); float CheatFrame(); void Drag_MoveDrag(entity from, entity to); // call this from CopyBody +#endif \ No newline at end of file diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 0974dae55..b85b7c020 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1,3 +1,43 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/net_notice.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/weapons/weapons.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/vote.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "ipban.qh" + #include "race.qh" + #include "antilag.qh" + #include "playerdemo.qh" +#endif + void send_CSQC_teamnagger() { WriteByte(MSG_BROADCAST, SVC_TEMPENTITY); WriteByte(MSG_BROADCAST, TE_CSQC_TEAMNAGGER); diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index 3a9c8bb3a..0345a53a8 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -1,3 +1,20 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "../common/weapons/weapons.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "mutators/mutators_include.qh" + #include "vehicles/vehicles_def.qh" + #include "command/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "cheats.qh" + #include "round_handler.qh" +#endif + /* * Impulse map: * diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index c31550c58..3244f37af 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -1,3 +1,30 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/weapons/weapons.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "mutators/mutators_include.qh" + #include "../common/mapinfo.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "g_hook.qh" + #include "race.qh" + #include "playerdemo.qh" +#endif + .float race_penalty; .float restart_jump; diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 89f9ca2c5..32cd5f8db 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -1,3 +1,29 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../common/constants.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/animdecide.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" +#endif + .entity pusher; .float pushltime; .float istypefrag; diff --git a/qcsrc/server/command/banning.qc b/qcsrc/server/command/banning.qc index aaf8f5ef6..984093e56 100644 --- a/qcsrc/server/command/banning.qc +++ b/qcsrc/server/command/banning.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/dpextensions.qc" + #include "../../common/util.qh" + #include "../../common/command/shared_defs.qh" + #include "../autocvars.qh" + #include "common.qh" + #include "banning.qh" + #include "../ipban.qh" +#endif // ===================================================== // Banning and kicking command code, written by Samual // Last updated: December 29th, 2011 diff --git a/qcsrc/server/command/banning.qh b/qcsrc/server/command/banning.qh index 8c71af179..b49da6e81 100644 --- a/qcsrc/server/command/banning.qh +++ b/qcsrc/server/command/banning.qh @@ -1,3 +1,64 @@ +#ifndef BANNING_H +#define BANNING_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" + #include "../vehicles/vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/campaign_common.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" +#endif + // ==================================== // Declarations for kick/ban commands // Last updated: December 29th, 2011 @@ -13,3 +74,4 @@ float Ban_Delete(float i); // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void BanCommand_macro_write_aliases(float fh); +#endif \ No newline at end of file diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 29f46c9cd..fed7088ad 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -1,3 +1,32 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../warpzonelib/common.qh" + #include "../../common/constants.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../autocvars.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../vehicles/vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" + #include "vote.qh" + #include "cmd.qh" + #include "../cheats.qh" + #include "../scores.qh" + #include "../ipban.qh" +#endif + // ========================================================= // Server side networked commands code, reworked by Samual // Last updated: December 28th, 2011 diff --git a/qcsrc/server/command/cmd.qh b/qcsrc/server/command/cmd.qh index 120bf3e02..e995dd8f4 100644 --- a/qcsrc/server/command/cmd.qh +++ b/qcsrc/server/command/cmd.qh @@ -1,3 +1,68 @@ +#ifndef CMD_H +#define CMD_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" + #include "../vehicles/vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/campaign_common.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" + #include "banning.qh" + #include "radarmap.qh" + #include "vote.qh" + #include "getreplies.qh" +#endif + // ================================================= // Declarations for server side networked commands // Last updated: December 26th, 2011 @@ -15,3 +80,4 @@ string MapVote_Suggest(string m); // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file void ClientCommand_macro_write_aliases(float fh); +#endif \ No newline at end of file diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 323d232c7..e52d8fc14 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -1,3 +1,20 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../common/util.qh" + #include "../../common/counting.qh" + #include "../../common/command/shared_defs.qh" + #include "../autocvars.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "common.qh" + #include "vote.qh" + #include "../scores.qh" +#endif + // ==================================================== // Shared code for server commands, written by Samual // Last updated: December 27th, 2011 diff --git a/qcsrc/server/command/common.qh b/qcsrc/server/command/common.qh index 13b260dbd..9961e0e01 100644 --- a/qcsrc/server/command/common.qh +++ b/qcsrc/server/command/common.qh @@ -1,3 +1,63 @@ +#ifndef COMMAND_COMMON_H +#define COMMAND_COMMON_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" + #include "../vehicles/vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/campaign_common.qh" + #include "../../common/mapinfo.qh" +#endif + // ============================================================ // Shared declarations for server commands, written by Samual // Last updated: December 30th, 2011 @@ -35,4 +95,5 @@ void timeout_handler_think(); void CommonCommand_macro_write_aliases(float fh); // keep track of the next token to use for argc -float next_token; \ No newline at end of file +float next_token; +#endif \ No newline at end of file diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc index dd57b2645..a3290e1e1 100644 --- a/qcsrc/server/command/getreplies.qc +++ b/qcsrc/server/command/getreplies.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/counting.qh" + #include "../../common/monsters/monsters.qh" + #include "../defs.qh" + #include "../../common/mapinfo.qh" + #include "getreplies.qh" + #include "../race.qh" +#endif + // ========================================================= // Reply messages for common commands, re-worked by Samual // Last updated: December 30th, 2011 diff --git a/qcsrc/server/command/getreplies.qh b/qcsrc/server/command/getreplies.qh index d2b1395e8..7a22e86c0 100644 --- a/qcsrc/server/command/getreplies.qh +++ b/qcsrc/server/command/getreplies.qh @@ -1,3 +1,22 @@ +#ifndef GETREPLIES_H +#define GETREPLIES_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/counting.qh" + #include "../../common/monsters/monsters.qh" + #include "../defs.qh" + #include "../../common/mapinfo.qh" + #include "getreplies.qh" + #include "../race.qh" +#endif + // ====================================================== // Declarations for reply messages, re-worked by Samual // Last updated: December 30th, 2011 @@ -18,3 +37,4 @@ string getladder(void); string getmaplist(void); string getlsmaps(void); string getmonsterlist(void); +#endif \ No newline at end of file diff --git a/qcsrc/server/command/radarmap.qc b/qcsrc/server/command/radarmap.qc index 9c644bfc5..7214b7ea5 100644 --- a/qcsrc/server/command/radarmap.qc +++ b/qcsrc/server/command/radarmap.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../common/util.qh" + #include "../defs.qh" + #include "radarmap.qh" + #include "../../csqcmodellib/sv_model.qh" +#endif + // =============================================== // Generates radar map images for use in the HUD // =============================================== diff --git a/qcsrc/server/command/radarmap.qh b/qcsrc/server/command/radarmap.qh index 706de7072..e4fe3c47c 100644 --- a/qcsrc/server/command/radarmap.qh +++ b/qcsrc/server/command/radarmap.qh @@ -1,3 +1,65 @@ +#ifndef RADARMAP_H +#define RADARMAP_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" + #include "../vehicles/vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/campaign_common.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" + #include "banning.qh" +#endif + // =========================================== // Declarations for radarmap generation code // =========================================== @@ -11,3 +73,4 @@ float sharpen_buffer[RADAR_WIDTH_MAX * 3]; string doublehex = "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFFFF"; // FF is contained twice, to map 256 to FF too // removes the need to bound() +#endif \ No newline at end of file diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 63485d59c..7ffd1b924 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1,3 +1,27 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../common/constants.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../autocvars.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../mutators/mutators_include.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" + #include "cmd.qh" + #include "sv_cmd.qh" + #include "../anticheat.qh" + #include "../playerdemo.qh" +#endif + // ===================================================== // Server side game commands code, reworked by Samual // Last updated: December 29th, 2011 diff --git a/qcsrc/server/command/sv_cmd.qh b/qcsrc/server/command/sv_cmd.qh index 4b8c946a2..c28fae6a4 100644 --- a/qcsrc/server/command/sv_cmd.qh +++ b/qcsrc/server/command/sv_cmd.qh @@ -1,3 +1,69 @@ +#ifndef SV_CMD_H +#define SV_CMD_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" + #include "../vehicles/vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/campaign_common.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" + #include "banning.qh" + #include "radarmap.qh" + #include "vote.qh" + #include "getreplies.qh" + #include "cmd.qh" +#endif + // ================================================= // Declarations for server side game commands // Last updated: December 25th, 2011 @@ -13,4 +79,5 @@ float shuffleteams_players[SHUFFLETEAMS_MAX_PLAYERS]; // maximum of 255 player s float shuffleteams_teams[SHUFFLETEAMS_MAX_TEAMS]; // maximum of 4 teams // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file -void GameCommand_macro_write_aliases(float fh); \ No newline at end of file +void GameCommand_macro_write_aliases(float fh); +#endif \ No newline at end of file diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 79925fc4e..d1cc5c50c 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -1,3 +1,26 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/command/shared_defs.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../mutators/mutators_include.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" + #include "vote.qh" + #include "../../common/playerstats.qh" + #include "../scores.qh" + #include "../race.qh" + #include "../round_handler.qh" +#endif + // ============================================= // Server side voting code, reworked by Samual // Last updated: December 27th, 2011 diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index 36da80619..cd34fa2f6 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -1,3 +1,29 @@ +#ifndef VOTE_H +#define VOTE_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/command/shared_defs.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../mutators/mutators_include.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" + #include "vote.qh" + #include "../../common/playerstats.qh" + #include "../scores.qh" + #include "../race.qh" + #include "../round_handler.qh" +#endif + // ================================================ // Declarations for the vote system/vote commands // Last updated: December 14th, 2011 @@ -48,4 +74,5 @@ float readyrestart_happened; // keeps track of whether a restart has already hap float restart_mapalreadyrestarted; // bool, indicates whether reset_map() was already executed .float ready; // flag for if a player is ready void reset_map(float dorespawn); -void ReadyCount(); \ No newline at end of file +void ReadyCount(); +#endif \ No newline at end of file diff --git a/qcsrc/server/constants.qh b/qcsrc/server/constants.qh index ada2acd1a..1f40027fb 100644 --- a/qcsrc/server/constants.qh +++ b/qcsrc/server/constants.qh @@ -1,3 +1,53 @@ +#ifndef SERVER_CONSTANTS_H +#define SERVER_CONSTANTS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" +#endif + const float FL_WEAPON = 8192; const float FL_POWERUP = 16384; const float FL_PROJECTILE = 32768; @@ -21,3 +71,4 @@ const float NUM_PLAYERSKINS_TEAMPLAY = 3; const float ASSAULT_VALUE_INACTIVE = 1000; const float DOOR_NOSPLASH = 256; // generic anti-splashdamage spawnflag +#endif \ No newline at end of file diff --git a/qcsrc/server/csqceffects.qc b/qcsrc/server/csqceffects.qc index 82ae49133..21d9f077c 100644 --- a/qcsrc/server/csqceffects.qc +++ b/qcsrc/server/csqceffects.qc @@ -1,3 +1,10 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../common/constants.qh" +#endif + void te_csqc_lightningarc(vector from,vector to) { WriteByte(MSG_BROADCAST, SVC_TEMPENTITY); diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index e4184e284..be8a6a84b 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -1,3 +1,54 @@ +#ifndef SERVER_DEFS_H +#define SERVER_DEFS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" +#endif + #define INDEPENDENT_ATTACK_FINISHED noref float require_spawnfunc_prefix; // if this float exists, only functions with spawnfunc_ name prefix qualify as spawn functions @@ -618,3 +669,4 @@ const int MIF_GUIDED_TAG = 128; .string playernick; .float elos; .float ranks; +#endif \ No newline at end of file diff --git a/qcsrc/server/ent_cs.qc b/qcsrc/server/ent_cs.qc index b6db8dd3c..f63ca3de2 100644 --- a/qcsrc/server/ent_cs.qc +++ b/qcsrc/server/ent_cs.qc @@ -1,3 +1,14 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "constants.qh" + #include "defs.qh" + #include "mutators/mutators_include.qh" +#endif + /** * The point of these entities is to avoid the problems * with clientprediction. diff --git a/qcsrc/server/func_breakable.qc b/qcsrc/server/func_breakable.qc index d117cbfe6..206df5d5b 100644 --- a/qcsrc/server/func_breakable.qc +++ b/qcsrc/server/func_breakable.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/monsters/monsters.qh" + #include "../common/weapons/weapons.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "../csqcmodellib/sv_model.qh" +#endif + .entity sprite; .float dmg; diff --git a/qcsrc/server/g_casings.qc b/qcsrc/server/g_casings.qc index 2ef04be17..e43d66fdc 100644 --- a/qcsrc/server/g_casings.qc +++ b/qcsrc/server/g_casings.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "constants.qh" + #include "defs.qh" +#endif + float Casing_SendEntity(entity to, float sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_CASING); diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 0e35b0f74..5f8f44964 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -1,3 +1,33 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/common.qh" + #include "../common/constants.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/selection.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "../csqcmodellib/sv_model.qh" + #include "../common/playerstats.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" +#endif + .float dmg; .float dmg_edge; .float dmg_force; diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index f77cf56e3..275e7ee8d 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -1,3 +1,22 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/weapons/weapons.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "vehicles/vehicles_def.qh" + #include "command/common.qh" + #include "g_hook.qh" + #include "round_handler.qh" +#endif + /*============================================ Wazat's Xonotic Grappling Hook diff --git a/qcsrc/server/g_hook.qh b/qcsrc/server/g_hook.qh index 2904c3230..10a5476c6 100644 --- a/qcsrc/server/g_hook.qh +++ b/qcsrc/server/g_hook.qh @@ -1,3 +1,25 @@ +#ifndef HOOK_H +#define HOOK_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/weapons/weapons.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "vehicles/vehicles_def.qh" + #include "command/common.qh" + #include "g_hook.qh" + #include "round_handler.qh" +#endif + // Wazat's grappling hook .entity hook; void GrapplingHookFrame(); @@ -15,3 +37,4 @@ const float HOOK_WAITING_FOR_RELEASE = 16; void GrappleHookInit(); vector hook_shotorigin[4]; +#endif \ No newline at end of file diff --git a/qcsrc/server/g_models.qc b/qcsrc/server/g_models.qc index 3916d2b51..3e214d540 100644 --- a/qcsrc/server/g_models.qc +++ b/qcsrc/server/g_models.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../csqcmodellib/sv_model.qh" +#endif + .float modelscale; void g_model_setcolormaptoactivator (void) diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index 94856c9c4..558243aa6 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -1,3 +1,17 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/common.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "command/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "antilag.qh" +#endif + void SUB_NullThink(void) { } void() SUB_CalcMoveDone; diff --git a/qcsrc/server/g_tetris.qc b/qcsrc/server/g_tetris.qc index 00daebf63..212e4a10d 100644 --- a/qcsrc/server/g_tetris.qc +++ b/qcsrc/server/g_tetris.qc @@ -1,3 +1,11 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "autocvars.qh" +#endif + /* Installation: diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index 0af8737b4..cacb434d3 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -1,3 +1,22 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/util_server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/monsters/monsters.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/csqcprojectile.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "../common/mapinfo.qh" +#endif + void SUB_DontUseTargets() { } diff --git a/qcsrc/server/g_violence.qc b/qcsrc/server/g_violence.qc index 0f3e885de..906f27e11 100644 --- a/qcsrc/server/g_violence.qc +++ b/qcsrc/server/g_violence.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/mapinfo.qh" +#endif + float Violence_GibSplash_SendEntity(entity to, float sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_GIBSPLASH); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 08681c980..c62fee03d 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1,3 +1,39 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/weaponstats.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "mutators/mutators_include.qh" + #include "campaign.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/sv_cmd.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "mapvoting.qh" + #include "ipban.qh" + #include "race.qh" + #include "antilag.qh" + #include "secret.qh" +#endif + const float LATENCY_THINKRATE = 10; .float latency_sum; .float latency_cnt; diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index 2c9fa4bcd..1a7d1ff45 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -1,3 +1,17 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "command/banning.qh" + #include "ipban.qh" +#endif + /* * Protocol of online ban list: * diff --git a/qcsrc/server/ipban.qh b/qcsrc/server/ipban.qh index d466942e3..afa23e86a 100644 --- a/qcsrc/server/ipban.qh +++ b/qcsrc/server/ipban.qh @@ -1,3 +1,81 @@ +#ifndef IPBAN_H +#define IPBAN_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "mapvoting.qh" +#endif + void Ban_SaveBans(); void Ban_LoadBans(); float Ban_MaybeEnforceBan(entity client); @@ -5,3 +83,4 @@ float Ban_MaybeEnforceBanOnce(entity client); float BanCommand(string command); void OnlineBanList_URI_Get_Callback(float id, float status, string data); +#endif \ No newline at end of file diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 994e6a6f1..0963a294a 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -1,3 +1,16 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/util_server.qh" + #include "../common/util.qh" + #include "../common/monsters/monsters.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "item_key.qh" +#endif + /* TODO: - add an unlock sound (here to trigger_keylock and to func_door) diff --git a/qcsrc/server/item_key.qh b/qcsrc/server/item_key.qh index 99b2b1d5c..b45562efc 100644 --- a/qcsrc/server/item_key.qh +++ b/qcsrc/server/item_key.qh @@ -1,3 +1,86 @@ +#ifndef ITEM_KEY +#define ITEM_KEY + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "mapvoting.qh" + #include "ipban.qh" + #include "race.qh" + #include "antilag.qh" + #include "playerdemo.qh" + #include "round_handler.qh" +#endif + /** * Returns the bit ID of a key */ @@ -20,4 +103,4 @@ float item_keys_usekey(entity l, entity p); * Returns a string with a comma separated list of key names, as specified in keylist. */ string item_keys_keylist(float keylist); - +#endif \ No newline at end of file diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index a85415ff8..47ef2d182 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -1,4 +1,22 @@ -float GameTypeVote_AvailabilityStatus(string gtname) +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/mapinfo.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "../common/playerstats.qh" + #include "mapvoting.qh" +#endif + +float GameTypeVote_AvailabilityStatus(string gtname) { float type = MapInfo_Type_FromString(gtname); if( type == 0 ) diff --git a/qcsrc/server/mapvoting.qh b/qcsrc/server/mapvoting.qh index 72c519c84..e79bdea28 100644 --- a/qcsrc/server/mapvoting.qh +++ b/qcsrc/server/mapvoting.qh @@ -1,3 +1,80 @@ +#ifndef MAPVOTING_H +#define MAPVOTING_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" +#endif + // definitions for functions used outside mapvoting.qc void MapVote_Start(); void MapVote_Spawn(); @@ -36,3 +113,4 @@ float mapvote_abstain; .float mapvote; entity mapvote_ent; +#endif \ No newline at end of file diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 3a150b58d..1577acc13 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1,9 +1,36 @@ -var void remove(entity e); -void objerror(string s); -void droptofloor(); -.vector dropped_origin; +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "miscfunctions.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../common/playerstats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/urllib.qh" + #include "../common/command/generic.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/selection.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "ipban.qh" +#endif -void traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); void crosshair_trace(entity pl) { traceline_antilag(pl, pl.cursor_trace_start, pl.cursor_trace_start + normalize(pl.cursor_trace_endpos - pl.cursor_trace_start) * MAX_SHOT_DISTANCE, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl)); @@ -23,15 +50,11 @@ void crosshair_trace_plusvisibletriggers(entity pl) for (e = first; e; e = e.chain) e.solid = SOLID_TRIGGER; } -void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); void WarpZone_crosshair_trace(entity pl) { WarpZone_traceline_antilag(pl, pl.cursor_trace_start, pl.cursor_trace_start + normalize(pl.cursor_trace_endpos - pl.cursor_trace_start) * MAX_SHOT_DISTANCE, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl)); } -void() spawnfunc_info_player_deathmatch; // needed for the other spawnpoints -void() spawnpoint_use; -string GetMapname(); string admin_name(void) { @@ -41,8 +64,6 @@ string admin_name(void) return "SERVER ADMIN"; } -float DistributeEvenly_amount; -float DistributeEvenly_totalweight; void DistributeEvenly_Init(float amount, float totalweight) { if (DistributeEvenly_amount) @@ -77,37 +98,6 @@ float DistributeEvenly_GetRandomized(float weight) return f; } -#define move_out_of_solid(e) WarpZoneLib_MoveOutOfSolid(e) - -const string STR_PLAYER = "player"; -const string STR_SPECTATOR = "spectator"; -const string STR_OBSERVER = "observer"; - -#define IS_PLAYER(v) (v.classname == STR_PLAYER) -#define IS_SPEC(v) (v.classname == STR_SPECTATOR) -#define IS_OBSERVER(v) (v.classname == STR_OBSERVER) -#define IS_CLIENT(v) (v.flags & FL_CLIENT) -#define IS_BOT_CLIENT(v) (clienttype(v) == CLIENTTYPE_BOT) -#define IS_REAL_CLIENT(v) (clienttype(v) == CLIENTTYPE_REAL) -#define IS_NOT_A_CLIENT(v) (clienttype(v) == CLIENTTYPE_NOTACLIENT) - -#define FOR_EACH_CLIENTSLOT(v) for(v = world; (v = nextent(v)) && (num_for_edict(v) <= maxclients); ) -#define FOR_EACH_CLIENT(v) FOR_EACH_CLIENTSLOT(v) if(IS_CLIENT(v)) -#define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v)) - -#define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(IS_PLAYER(v)) -#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if (!IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too -#define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v)) - -#define FOR_EACH_MONSTER(v) for(v = world; (v = findflags(v, flags, FL_MONSTER)) != world; ) - -#define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5))) - -// copies a string to a tempstring (so one can strunzone it) -string strcat1(string s) = #115; // FRIK_FILE - -float logfile_open; -float logfile; void GameLogEcho(string s) { @@ -157,32 +147,6 @@ void GameLogClose() } } -#define strstr strstrofs -/* -// NOTE: DO NOT USE THIS FUNCTION TOO OFTEN. -// IT WILL MOST PROBABLY DESTROY _ALL_ OTHER TEMP -// STRINGS AND TAKE QUITE LONG. haystack and needle MUST -// BE CONSTANT OR strzoneD! -float strstr(string haystack, string needle, float offset) -{ - float len, endpos; - string found; - len = strlen(needle); - endpos = strlen(haystack) - len; - while(offset <= endpos) - { - found = substring(haystack, offset, len); - if(found == needle) - return offset; - offset = offset + 1; - } - return -1; -} -*/ - -const float NUM_NEAREST_ENTITIES = 4; -entity nearest_entity[NUM_NEAREST_ENTITIES]; -float nearest_length[NUM_NEAREST_ENTITIES]; entity findnearest(vector point, .string field, string value, vector axismod) { entity localhead; @@ -554,494 +518,7 @@ vector randompos(vector m1, vector m2) return v; } -//#NO AUTOCVARS START - -float g_pickup_shells; -float g_pickup_shells_max; -float g_pickup_nails; -float g_pickup_nails_max; -float g_pickup_rockets; -float g_pickup_rockets_max; -float g_pickup_cells; -float g_pickup_cells_max; -float g_pickup_plasma; -float g_pickup_plasma_max; -float g_pickup_fuel; -float g_pickup_fuel_jetpack; -float g_pickup_fuel_max; -float g_pickup_armorsmall; -float g_pickup_armorsmall_max; -float g_pickup_armorsmall_anyway; -float g_pickup_armormedium; -float g_pickup_armormedium_max; -float g_pickup_armormedium_anyway; -float g_pickup_armorbig; -float g_pickup_armorbig_max; -float g_pickup_armorbig_anyway; -float g_pickup_armorlarge; -float g_pickup_armorlarge_max; -float g_pickup_armorlarge_anyway; -float g_pickup_healthsmall; -float g_pickup_healthsmall_max; -float g_pickup_healthsmall_anyway; -float g_pickup_healthmedium; -float g_pickup_healthmedium_max; -float g_pickup_healthmedium_anyway; -float g_pickup_healthlarge; -float g_pickup_healthlarge_max; -float g_pickup_healthlarge_anyway; -float g_pickup_healthmega; -float g_pickup_healthmega_max; -float g_pickup_healthmega_anyway; -float g_pickup_ammo_anyway; -float g_pickup_weapons_anyway; -float g_weaponarena; -WepSet g_weaponarena_weapons; -float g_weaponarena_random; -float g_weaponarena_random_with_blaster; -string g_weaponarena_list; -float g_weaponspeedfactor; -float g_weaponratefactor; -float g_weapondamagefactor; -float g_weaponforcefactor; -float g_weaponspreadfactor; - -WepSet start_weapons; -WepSet start_weapons_default; -WepSet start_weapons_defaultmask; -float start_items; -float start_ammo_shells; -float start_ammo_nails; -float start_ammo_rockets; -float start_ammo_cells; -float start_ammo_plasma; -float start_ammo_fuel; -float start_health; -float start_armorvalue; -WepSet warmup_start_weapons; -WepSet warmup_start_weapons_default; -WepSet warmup_start_weapons_defaultmask; -#define WARMUP_START_WEAPONS ((g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons) -float warmup_start_ammo_shells; -float warmup_start_ammo_nails; -float warmup_start_ammo_rockets; -float warmup_start_ammo_cells; -float warmup_start_ammo_plasma; -float warmup_start_ammo_fuel; -float warmup_start_health; -float warmup_start_armorvalue; -float g_weapon_stay; - -float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still needs done? -{ - float i = weaponinfo.weapon; - float d = 0; - - if (!i) - return 0; - - if (g_lms || g_ca || allguns) - { - if(weaponinfo.spawnflags & WEP_FLAG_NORMAL) - d = true; - else - d = false; - } - else if (g_cts) - d = (i == WEP_SHOTGUN); - else if (g_nexball) - d = 0; // weapon is set a few lines later - else - d = !(!weaponinfo.weaponstart); - - if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook - d |= (i == WEP_HOOK); - if(!g_cts && (weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // never default mutator blocked guns - d = 0; - - float t = weaponinfo.weaponstartoverride; - - //print(strcat("want_weapon: ", weaponinfo.netname, " - d: ", ftos(d), ", t: ", ftos(t), ". \n")); - - // bit order in t: - // 1: want or not - // 2: is default? - // 4: is set by default? - if(t < 0) - t = 4 | (3 * d); - else - t |= (2 * d); - - return t; -} - -void readplayerstartcvars() -{ - entity e; - float i, j, t; - string s; - - // initialize starting values for players - start_weapons = '0 0 0'; - start_weapons_default = '0 0 0'; - start_weapons_defaultmask = '0 0 0'; - start_items = 0; - start_ammo_shells = 0; - start_ammo_nails = 0; - start_ammo_rockets = 0; - start_ammo_cells = 0; - start_ammo_plasma = 0; - start_health = cvar("g_balance_health_start"); - start_armorvalue = cvar("g_balance_armor_start"); - - g_weaponarena = 0; - g_weaponarena_weapons = '0 0 0'; - - s = cvar_string("g_weaponarena"); - if (s == "0" || s == "") - { - if(g_ca) - s = "most"; - } - - if (s == "0" || s == "") - { - // no arena - } - else if (s == "off") - { - // forcibly turn off weaponarena - } - else if (s == "all" || s == "1") - { - g_weaponarena = 1; - g_weaponarena_list = "All Weapons"; - for (j = WEP_FIRST; j <= WEP_LAST; ++j) - { - e = get_weaponinfo(j); - if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)) - g_weaponarena_weapons |= WepSet_FromWeapon(j); - } - } - else if (s == "most") - { - g_weaponarena = 1; - g_weaponarena_list = "Most Weapons"; - for (j = WEP_FIRST; j <= WEP_LAST; ++j) - { - e = get_weaponinfo(j); - if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)) - if (e.spawnflags & WEP_FLAG_NORMAL) - g_weaponarena_weapons |= WepSet_FromWeapon(j); - } - } - else if (s == "none") - { - g_weaponarena = 1; - g_weaponarena_list = "No Weapons"; - } - else - { - g_weaponarena = 1; - t = tokenize_console(s); - g_weaponarena_list = ""; - for (i = 0; i < t; ++i) - { - s = argv(i); - for (j = WEP_FIRST; j <= WEP_LAST; ++j) - { - e = get_weaponinfo(j); - if (e.netname == s) - { - g_weaponarena_weapons |= WepSet_FromWeapon(j); - g_weaponarena_list = strcat(g_weaponarena_list, e.message, " & "); - break; - } - } - if (j > WEP_LAST) - { - print("The weapon mutator list contains an unknown weapon ", s, ". Skipped.\n"); - } - } - g_weaponarena_list = strzone(substring(g_weaponarena_list, 0, strlen(g_weaponarena_list) - 3)); - } - - if(g_weaponarena) - g_weaponarena_random = cvar("g_weaponarena_random"); - else - g_weaponarena_random = 0; - g_weaponarena_random_with_blaster = cvar("g_weaponarena_random_with_blaster"); - - if (g_weaponarena) - { - g_weapon_stay = 0; // incompatible - start_weapons = g_weaponarena_weapons; - start_items |= IT_UNLIMITED_AMMO; - } - else - { - for (i = WEP_FIRST; i <= WEP_LAST; ++i) - { - e = get_weaponinfo(i); - float w = want_weapon(e, false); - if(w & 1) - start_weapons |= WepSet_FromWeapon(i); - if(w & 2) - start_weapons_default |= WepSet_FromWeapon(i); - if(w & 4) - start_weapons_defaultmask |= WepSet_FromWeapon(i); - } - } - - if(!cvar("g_use_ammunition")) - start_items |= IT_UNLIMITED_AMMO; - if(start_items & IT_UNLIMITED_WEAPON_AMMO) - { - start_ammo_shells = 999; - start_ammo_nails = 999; - start_ammo_rockets = 999; - start_ammo_cells = 999; - start_ammo_plasma = 999; - start_ammo_fuel = 999; - } - else - { - start_ammo_shells = cvar("g_start_ammo_shells"); - start_ammo_nails = cvar("g_start_ammo_nails"); - start_ammo_rockets = cvar("g_start_ammo_rockets"); - start_ammo_cells = cvar("g_start_ammo_cells"); - start_ammo_plasma = cvar("g_start_ammo_plasma"); - start_ammo_fuel = cvar("g_start_ammo_fuel"); - } - - if (warmup_stage) - { - warmup_start_ammo_shells = start_ammo_shells; - warmup_start_ammo_nails = start_ammo_nails; - warmup_start_ammo_rockets = start_ammo_rockets; - warmup_start_ammo_cells = start_ammo_cells; - warmup_start_ammo_plasma = start_ammo_plasma; - warmup_start_ammo_fuel = start_ammo_fuel; - warmup_start_health = start_health; - warmup_start_armorvalue = start_armorvalue; - warmup_start_weapons = start_weapons; - warmup_start_weapons_default = start_weapons_default; - warmup_start_weapons_defaultmask = start_weapons_defaultmask; - - if (!g_weaponarena && !g_ca) - { - warmup_start_ammo_shells = cvar("g_warmup_start_ammo_shells"); - warmup_start_ammo_nails = cvar("g_warmup_start_ammo_nails"); - warmup_start_ammo_rockets = cvar("g_warmup_start_ammo_rockets"); - warmup_start_ammo_cells = cvar("g_warmup_start_ammo_cells"); - warmup_start_ammo_plasma = cvar("g_warmup_start_ammo_plasma"); - warmup_start_ammo_fuel = cvar("g_warmup_start_ammo_fuel"); - warmup_start_health = cvar("g_warmup_start_health"); - warmup_start_armorvalue = cvar("g_warmup_start_armor"); - warmup_start_weapons = '0 0 0'; - warmup_start_weapons_default = '0 0 0'; - warmup_start_weapons_defaultmask = '0 0 0'; - for (i = WEP_FIRST; i <= WEP_LAST; ++i) - { - e = get_weaponinfo(i); - float w = want_weapon(e, g_warmup_allguns); - if(w & 1) - warmup_start_weapons |= WepSet_FromWeapon(i); - if(w & 2) - warmup_start_weapons_default |= WepSet_FromWeapon(i); - if(w & 4) - warmup_start_weapons_defaultmask |= WepSet_FromWeapon(i); - } - } - } - - if (g_jetpack) - start_items |= IT_JETPACK; - - MUTATOR_CALLHOOK(SetStartItems); - - if ((start_items & IT_JETPACK) || (g_grappling_hook && (start_weapons & WEPSET_HOOK))) - { - start_items |= IT_FUEL_REGEN; - start_ammo_fuel = max(start_ammo_fuel, cvar("g_balance_fuel_rotstable")); - warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable")); - } - - WepSet precache_weapons = start_weapons; - if (g_warmup_allguns != 1) - precache_weapons |= warmup_start_weapons; - for (i = WEP_FIRST; i <= WEP_LAST; ++i) - { - e = get_weaponinfo(i); - if(precache_weapons & WepSet_FromWeapon(i)) - WEP_ACTION(i, WR_INIT); - } - - start_ammo_shells = max(0, start_ammo_shells); - start_ammo_nails = max(0, start_ammo_nails); - start_ammo_rockets = max(0, start_ammo_rockets); - start_ammo_cells = max(0, start_ammo_cells); - start_ammo_plasma = max(0, start_ammo_plasma); - start_ammo_fuel = max(0, start_ammo_fuel); - - warmup_start_ammo_shells = max(0, warmup_start_ammo_shells); - warmup_start_ammo_nails = max(0, warmup_start_ammo_nails); - warmup_start_ammo_rockets = max(0, warmup_start_ammo_rockets); - warmup_start_ammo_cells = max(0, warmup_start_ammo_cells); - warmup_start_ammo_plasma = max(0, warmup_start_ammo_plasma); - warmup_start_ammo_fuel = max(0, warmup_start_ammo_fuel); -} - -float g_bugrigs; -float g_bugrigs_planar_movement; -float g_bugrigs_planar_movement_car_jumping; -float g_bugrigs_reverse_spinning; -float g_bugrigs_reverse_speeding; -float g_bugrigs_reverse_stopping; -float g_bugrigs_air_steering; -float g_bugrigs_angle_smoothing; -float g_bugrigs_friction_floor; -float g_bugrigs_friction_brake; -float g_bugrigs_friction_air; -float g_bugrigs_accel; -float g_bugrigs_speed_ref; -float g_bugrigs_speed_pow; -float g_bugrigs_steer; - -float sv_autotaunt; -float sv_taunt; - -string GetGametype(); // g_world.qc -void mutators_add(); // mutators.qc -void readlevelcvars(void) -{ - // load mutators - mutators_add(); - - if(cvar("sv_allow_fullbright")) - serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT; - - g_bugrigs = cvar("g_bugrigs"); - g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement"); - g_bugrigs_planar_movement_car_jumping = cvar("g_bugrigs_planar_movement_car_jumping"); - g_bugrigs_reverse_spinning = cvar("g_bugrigs_reverse_spinning"); - g_bugrigs_reverse_speeding = cvar("g_bugrigs_reverse_speeding"); - g_bugrigs_reverse_stopping = cvar("g_bugrigs_reverse_stopping"); - g_bugrigs_air_steering = cvar("g_bugrigs_air_steering"); - g_bugrigs_angle_smoothing = cvar("g_bugrigs_angle_smoothing"); - g_bugrigs_friction_floor = cvar("g_bugrigs_friction_floor"); - g_bugrigs_friction_brake = cvar("g_bugrigs_friction_brake"); - g_bugrigs_friction_air = cvar("g_bugrigs_friction_air"); - g_bugrigs_accel = cvar("g_bugrigs_accel"); - g_bugrigs_speed_ref = cvar("g_bugrigs_speed_ref"); - g_bugrigs_speed_pow = cvar("g_bugrigs_speed_pow"); - g_bugrigs_steer = cvar("g_bugrigs_steer"); - - g_instagib = cvar("g_instagib"); - - sv_clones = cvar("sv_clones"); - sv_foginterval = cvar("sv_foginterval"); - g_cloaked = cvar("g_cloaked"); - g_footsteps = cvar("g_footsteps"); - g_grappling_hook = cvar("g_grappling_hook"); - g_jetpack = cvar("g_jetpack"); - sv_maxidle = cvar("sv_maxidle"); - sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle"); - sv_autotaunt = cvar("sv_autotaunt"); - sv_taunt = cvar("sv_taunt"); - - warmup_stage = cvar("g_warmup"); - g_warmup_limit = cvar("g_warmup_limit"); - g_warmup_allguns = cvar("g_warmup_allguns"); - g_warmup_allow_timeout = cvar("g_warmup_allow_timeout"); - - if ((g_race && g_race_qualifying == 2) || g_assault || cvar("g_campaign")) - warmup_stage = 0; // these modes cannot work together, sorry - - g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon"); - g_pickup_respawntime_superweapon = cvar("g_pickup_respawntime_superweapon"); - g_pickup_respawntime_ammo = cvar("g_pickup_respawntime_ammo"); - g_pickup_respawntime_short = cvar("g_pickup_respawntime_short"); - g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium"); - g_pickup_respawntime_long = cvar("g_pickup_respawntime_long"); - g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup"); - g_pickup_respawntimejitter_weapon = cvar("g_pickup_respawntimejitter_weapon"); - g_pickup_respawntimejitter_superweapon = cvar("g_pickup_respawntimejitter_superweapon"); - g_pickup_respawntimejitter_ammo = cvar("g_pickup_respawntimejitter_ammo"); - g_pickup_respawntimejitter_short = cvar("g_pickup_respawntimejitter_short"); - g_pickup_respawntimejitter_medium = cvar("g_pickup_respawntimejitter_medium"); - g_pickup_respawntimejitter_long = cvar("g_pickup_respawntimejitter_long"); - g_pickup_respawntimejitter_powerup = cvar("g_pickup_respawntimejitter_powerup"); - - g_weaponspeedfactor = cvar("g_weaponspeedfactor"); - g_weaponratefactor = cvar("g_weaponratefactor"); - g_weapondamagefactor = cvar("g_weapondamagefactor"); - g_weaponforcefactor = cvar("g_weaponforcefactor"); - g_weaponspreadfactor = cvar("g_weaponspreadfactor"); - - g_pickup_shells = cvar("g_pickup_shells"); - g_pickup_shells_max = cvar("g_pickup_shells_max"); - g_pickup_nails = cvar("g_pickup_nails"); - g_pickup_nails_max = cvar("g_pickup_nails_max"); - g_pickup_rockets = cvar("g_pickup_rockets"); - g_pickup_rockets_max = cvar("g_pickup_rockets_max"); - g_pickup_cells = cvar("g_pickup_cells"); - g_pickup_cells_max = cvar("g_pickup_cells_max"); - g_pickup_plasma = cvar("g_pickup_plasma"); - g_pickup_plasma_max = cvar("g_pickup_plasma_max"); - g_pickup_fuel = cvar("g_pickup_fuel"); - g_pickup_fuel_jetpack = cvar("g_pickup_fuel_jetpack"); - g_pickup_fuel_max = cvar("g_pickup_fuel_max"); - g_pickup_armorsmall = cvar("g_pickup_armorsmall"); - g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max"); - g_pickup_armorsmall_anyway = cvar("g_pickup_armorsmall_anyway"); - g_pickup_armormedium = cvar("g_pickup_armormedium"); - g_pickup_armormedium_max = cvar("g_pickup_armormedium_max"); - g_pickup_armormedium_anyway = cvar("g_pickup_armormedium_anyway"); - g_pickup_armorbig = cvar("g_pickup_armorbig"); - g_pickup_armorbig_max = cvar("g_pickup_armorbig_max"); - g_pickup_armorbig_anyway = cvar("g_pickup_armorbig_anyway"); - g_pickup_armorlarge = cvar("g_pickup_armorlarge"); - g_pickup_armorlarge_max = cvar("g_pickup_armorlarge_max"); - g_pickup_armorlarge_anyway = cvar("g_pickup_armorlarge_anyway"); - g_pickup_healthsmall = cvar("g_pickup_healthsmall"); - g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max"); - g_pickup_healthsmall_anyway = cvar("g_pickup_healthsmall_anyway"); - g_pickup_healthmedium = cvar("g_pickup_healthmedium"); - g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max"); - g_pickup_healthmedium_anyway = cvar("g_pickup_healthmedium_anyway"); - g_pickup_healthlarge = cvar("g_pickup_healthlarge"); - g_pickup_healthlarge_max = cvar("g_pickup_healthlarge_max"); - g_pickup_healthlarge_anyway = cvar("g_pickup_healthlarge_anyway"); - g_pickup_healthmega = cvar("g_pickup_healthmega"); - g_pickup_healthmega_max = cvar("g_pickup_healthmega_max"); - g_pickup_healthmega_anyway = cvar("g_pickup_healthmega_anyway"); - - g_pickup_ammo_anyway = cvar("g_pickup_ammo_anyway"); - g_pickup_weapons_anyway = cvar("g_pickup_weapons_anyway"); - - g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay")); - if(!g_weapon_stay) - g_weapon_stay = cvar("g_weapon_stay"); - - if (!warmup_stage) - game_starttime = time + cvar("g_start_delay"); - - readplayerstartcvars(); -} - -//#NO AUTOCVARS END - -// Sound functions -//string precache_sound (string s) = #19; -// hack -float precache_sound_index (string s) = #19; - -const float SND_VOLUME = 1; -const float SND_ATTENUATION = 2; -const float SND_LARGEENTITY = 8; -const float SND_LARGESOUND = 16; float sound_allowed(float dest, entity e) { @@ -1390,23 +867,6 @@ void precache() #include "precache-for-csqc.inc" } -// WARNING: this kills the trace globals -#define EXACTTRIGGER_TOUCH if(WarpZoneLib_ExactTrigger_Touch()) return -#define EXACTTRIGGER_INIT WarpZoneLib_ExactTrigger_Init() - -const float INITPRIO_FIRST = 0; -const float INITPRIO_GAMETYPE = 0; -const float INITPRIO_GAMETYPE_FALLBACK = 1; -const float INITPRIO_FINDTARGET = 10; -const float INITPRIO_DROPTOFLOOR = 20; -const float INITPRIO_SETLOCATION = 90; -const float INITPRIO_LINKDOORS = 91; -const float INITPRIO_LAST = 99; - -.void(void) initialize_entity; -.float initialize_entity_order; -.entity initialize_entity_next; -entity initialize_entity_first; void make_safe_for_remove(entity e) { diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh new file mode 100644 index 000000000..a6d92ab8a --- /dev/null +++ b/qcsrc/server/miscfunctions.qh @@ -0,0 +1,596 @@ +#ifndef MISCFUNCTIONS_H +#define MISCFUNCTIONS_H + +var void remove(entity e); +void objerror(string s); +void droptofloor(); +.vector dropped_origin; + +void traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); +void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); + +void() spawnfunc_info_player_deathmatch; // needed for the other spawnpoints +void() spawnpoint_use; +string GetMapname(); + +float DistributeEvenly_amount; +float DistributeEvenly_totalweight; + +#define move_out_of_solid(e) WarpZoneLib_MoveOutOfSolid(e) + +const string STR_PLAYER = "player"; +const string STR_SPECTATOR = "spectator"; +const string STR_OBSERVER = "observer"; + +#define IS_PLAYER(v) (v.classname == STR_PLAYER) +#define IS_SPEC(v) (v.classname == STR_SPECTATOR) +#define IS_OBSERVER(v) (v.classname == STR_OBSERVER) +#define IS_CLIENT(v) (v.flags & FL_CLIENT) +#define IS_BOT_CLIENT(v) (clienttype(v) == CLIENTTYPE_BOT) +#define IS_REAL_CLIENT(v) (clienttype(v) == CLIENTTYPE_REAL) +#define IS_NOT_A_CLIENT(v) (clienttype(v) == CLIENTTYPE_NOTACLIENT) + +#define FOR_EACH_CLIENTSLOT(v) for(v = world; (v = nextent(v)) && (num_for_edict(v) <= maxclients); ) +#define FOR_EACH_CLIENT(v) FOR_EACH_CLIENTSLOT(v) if(IS_CLIENT(v)) +#define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v)) + +#define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(IS_PLAYER(v)) +#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if (!IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too +#define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v)) + +#define FOR_EACH_MONSTER(v) for(v = world; (v = findflags(v, flags, FL_MONSTER)) != world; ) + +#define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5))) + +// copies a string to a tempstring (so one can strunzone it) +string strcat1(string s) = #115; // FRIK_FILE + +float logfile_open; +float logfile; + +#define strstr strstrofs +/* +// NOTE: DO NOT USE THIS FUNCTION TOO OFTEN. +// IT WILL MOST PROBABLY DESTROY _ALL_ OTHER TEMP +// STRINGS AND TAKE QUITE LONG. haystack and needle MUST +// BE CONSTANT OR strzoneD! +float strstr(string haystack, string needle, float offset) +{ + float len, endpos; + string found; + len = strlen(needle); + endpos = strlen(haystack) - len; + while(offset <= endpos) + { + found = substring(haystack, offset, len); + if(found == needle) + return offset; + offset = offset + 1; + } + return -1; +} +*/ + +const float NUM_NEAREST_ENTITIES = 4; +entity nearest_entity[NUM_NEAREST_ENTITIES]; +float nearest_length[NUM_NEAREST_ENTITIES]; + + +//#NO AUTOCVARS START + +float g_pickup_shells; +float g_pickup_shells_max; +float g_pickup_nails; +float g_pickup_nails_max; +float g_pickup_rockets; +float g_pickup_rockets_max; +float g_pickup_cells; +float g_pickup_cells_max; +float g_pickup_plasma; +float g_pickup_plasma_max; +float g_pickup_fuel; +float g_pickup_fuel_jetpack; +float g_pickup_fuel_max; +float g_pickup_armorsmall; +float g_pickup_armorsmall_max; +float g_pickup_armorsmall_anyway; +float g_pickup_armormedium; +float g_pickup_armormedium_max; +float g_pickup_armormedium_anyway; +float g_pickup_armorbig; +float g_pickup_armorbig_max; +float g_pickup_armorbig_anyway; +float g_pickup_armorlarge; +float g_pickup_armorlarge_max; +float g_pickup_armorlarge_anyway; +float g_pickup_healthsmall; +float g_pickup_healthsmall_max; +float g_pickup_healthsmall_anyway; +float g_pickup_healthmedium; +float g_pickup_healthmedium_max; +float g_pickup_healthmedium_anyway; +float g_pickup_healthlarge; +float g_pickup_healthlarge_max; +float g_pickup_healthlarge_anyway; +float g_pickup_healthmega; +float g_pickup_healthmega_max; +float g_pickup_healthmega_anyway; +float g_pickup_ammo_anyway; +float g_pickup_weapons_anyway; +float g_weaponarena; +WepSet g_weaponarena_weapons; +float g_weaponarena_random; +float g_weaponarena_random_with_blaster; +string g_weaponarena_list; +float g_weaponspeedfactor; +float g_weaponratefactor; +float g_weapondamagefactor; +float g_weaponforcefactor; +float g_weaponspreadfactor; + +WepSet start_weapons; +WepSet start_weapons_default; +WepSet start_weapons_defaultmask; +float start_items; +float start_ammo_shells; +float start_ammo_nails; +float start_ammo_rockets; +float start_ammo_cells; +float start_ammo_plasma; +float start_ammo_fuel; +float start_health; +float start_armorvalue; +WepSet warmup_start_weapons; +WepSet warmup_start_weapons_default; +WepSet warmup_start_weapons_defaultmask; +#define WARMUP_START_WEAPONS ((g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons) +float warmup_start_ammo_shells; +float warmup_start_ammo_nails; +float warmup_start_ammo_rockets; +float warmup_start_ammo_cells; +float warmup_start_ammo_plasma; +float warmup_start_ammo_fuel; +float warmup_start_health; +float warmup_start_armorvalue; +float g_weapon_stay; + +float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still needs done? +{ + float i = weaponinfo.weapon; + float d = 0; + + if (!i) + return 0; + + if (g_lms || g_ca || allguns) + { + if(weaponinfo.spawnflags & WEP_FLAG_NORMAL) + d = true; + else + d = false; + } + else if (g_cts) + d = (i == WEP_SHOTGUN); + else if (g_nexball) + d = 0; // weapon is set a few lines later + else + d = !(!weaponinfo.weaponstart); + + if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook + d |= (i == WEP_HOOK); + if(!g_cts && (weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED)) // never default mutator blocked guns + d = 0; + + float t = weaponinfo.weaponstartoverride; + + //print(strcat("want_weapon: ", weaponinfo.netname, " - d: ", ftos(d), ", t: ", ftos(t), ". \n")); + + // bit order in t: + // 1: want or not + // 2: is default? + // 4: is set by default? + if(t < 0) + t = 4 | (3 * d); + else + t |= (2 * d); + + return t; +} + +void readplayerstartcvars() +{ + entity e; + float i, j, t; + string s; + + // initialize starting values for players + start_weapons = '0 0 0'; + start_weapons_default = '0 0 0'; + start_weapons_defaultmask = '0 0 0'; + start_items = 0; + start_ammo_shells = 0; + start_ammo_nails = 0; + start_ammo_rockets = 0; + start_ammo_cells = 0; + start_ammo_plasma = 0; + start_health = cvar("g_balance_health_start"); + start_armorvalue = cvar("g_balance_armor_start"); + + g_weaponarena = 0; + g_weaponarena_weapons = '0 0 0'; + + s = cvar_string("g_weaponarena"); + if (s == "0" || s == "") + { + if(g_ca) + s = "most"; + } + + if (s == "0" || s == "") + { + // no arena + } + else if (s == "off") + { + // forcibly turn off weaponarena + } + else if (s == "all" || s == "1") + { + g_weaponarena = 1; + g_weaponarena_list = "All Weapons"; + for (j = WEP_FIRST; j <= WEP_LAST; ++j) + { + e = get_weaponinfo(j); + if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)) + g_weaponarena_weapons |= WepSet_FromWeapon(j); + } + } + else if (s == "most") + { + g_weaponarena = 1; + g_weaponarena_list = "Most Weapons"; + for (j = WEP_FIRST; j <= WEP_LAST; ++j) + { + e = get_weaponinfo(j); + if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)) + if (e.spawnflags & WEP_FLAG_NORMAL) + g_weaponarena_weapons |= WepSet_FromWeapon(j); + } + } + else if (s == "none") + { + g_weaponarena = 1; + g_weaponarena_list = "No Weapons"; + } + else + { + g_weaponarena = 1; + t = tokenize_console(s); + g_weaponarena_list = ""; + for (i = 0; i < t; ++i) + { + s = argv(i); + for (j = WEP_FIRST; j <= WEP_LAST; ++j) + { + e = get_weaponinfo(j); + if (e.netname == s) + { + g_weaponarena_weapons |= WepSet_FromWeapon(j); + g_weaponarena_list = strcat(g_weaponarena_list, e.message, " & "); + break; + } + } + if (j > WEP_LAST) + { + print("The weapon mutator list contains an unknown weapon ", s, ". Skipped.\n"); + } + } + g_weaponarena_list = strzone(substring(g_weaponarena_list, 0, strlen(g_weaponarena_list) - 3)); + } + + if(g_weaponarena) + g_weaponarena_random = cvar("g_weaponarena_random"); + else + g_weaponarena_random = 0; + g_weaponarena_random_with_blaster = cvar("g_weaponarena_random_with_blaster"); + + if (g_weaponarena) + { + g_weapon_stay = 0; // incompatible + start_weapons = g_weaponarena_weapons; + start_items |= IT_UNLIMITED_AMMO; + } + else + { + for (i = WEP_FIRST; i <= WEP_LAST; ++i) + { + e = get_weaponinfo(i); + float w = want_weapon(e, false); + if(w & 1) + start_weapons |= WepSet_FromWeapon(i); + if(w & 2) + start_weapons_default |= WepSet_FromWeapon(i); + if(w & 4) + start_weapons_defaultmask |= WepSet_FromWeapon(i); + } + } + + if(!cvar("g_use_ammunition")) + start_items |= IT_UNLIMITED_AMMO; + + if(start_items & IT_UNLIMITED_WEAPON_AMMO) + { + start_ammo_shells = 999; + start_ammo_nails = 999; + start_ammo_rockets = 999; + start_ammo_cells = 999; + start_ammo_plasma = 999; + start_ammo_fuel = 999; + } + else + { + start_ammo_shells = cvar("g_start_ammo_shells"); + start_ammo_nails = cvar("g_start_ammo_nails"); + start_ammo_rockets = cvar("g_start_ammo_rockets"); + start_ammo_cells = cvar("g_start_ammo_cells"); + start_ammo_plasma = cvar("g_start_ammo_plasma"); + start_ammo_fuel = cvar("g_start_ammo_fuel"); + } + + if (warmup_stage) + { + warmup_start_ammo_shells = start_ammo_shells; + warmup_start_ammo_nails = start_ammo_nails; + warmup_start_ammo_rockets = start_ammo_rockets; + warmup_start_ammo_cells = start_ammo_cells; + warmup_start_ammo_plasma = start_ammo_plasma; + warmup_start_ammo_fuel = start_ammo_fuel; + warmup_start_health = start_health; + warmup_start_armorvalue = start_armorvalue; + warmup_start_weapons = start_weapons; + warmup_start_weapons_default = start_weapons_default; + warmup_start_weapons_defaultmask = start_weapons_defaultmask; + + if (!g_weaponarena && !g_ca) + { + warmup_start_ammo_shells = cvar("g_warmup_start_ammo_shells"); + warmup_start_ammo_nails = cvar("g_warmup_start_ammo_nails"); + warmup_start_ammo_rockets = cvar("g_warmup_start_ammo_rockets"); + warmup_start_ammo_cells = cvar("g_warmup_start_ammo_cells"); + warmup_start_ammo_plasma = cvar("g_warmup_start_ammo_plasma"); + warmup_start_ammo_fuel = cvar("g_warmup_start_ammo_fuel"); + warmup_start_health = cvar("g_warmup_start_health"); + warmup_start_armorvalue = cvar("g_warmup_start_armor"); + warmup_start_weapons = '0 0 0'; + warmup_start_weapons_default = '0 0 0'; + warmup_start_weapons_defaultmask = '0 0 0'; + for (i = WEP_FIRST; i <= WEP_LAST; ++i) + { + e = get_weaponinfo(i); + float w = want_weapon(e, g_warmup_allguns); + if(w & 1) + warmup_start_weapons |= WepSet_FromWeapon(i); + if(w & 2) + warmup_start_weapons_default |= WepSet_FromWeapon(i); + if(w & 4) + warmup_start_weapons_defaultmask |= WepSet_FromWeapon(i); + } + } + } + + if (g_jetpack) + start_items |= IT_JETPACK; + + MUTATOR_CALLHOOK(SetStartItems); + + if ((start_items & IT_JETPACK) || (g_grappling_hook && (start_weapons & WEPSET_HOOK))) + { + start_items |= IT_FUEL_REGEN; + start_ammo_fuel = max(start_ammo_fuel, cvar("g_balance_fuel_rotstable")); + warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable")); + } + + WepSet precache_weapons = start_weapons; + if (g_warmup_allguns != 1) + precache_weapons |= warmup_start_weapons; + for (i = WEP_FIRST; i <= WEP_LAST; ++i) + { + e = get_weaponinfo(i); + if(precache_weapons & WepSet_FromWeapon(i)) + WEP_ACTION(i, WR_INIT); + } + + start_ammo_shells = max(0, start_ammo_shells); + start_ammo_nails = max(0, start_ammo_nails); + start_ammo_rockets = max(0, start_ammo_rockets); + start_ammo_cells = max(0, start_ammo_cells); + start_ammo_plasma = max(0, start_ammo_plasma); + start_ammo_fuel = max(0, start_ammo_fuel); + + warmup_start_ammo_shells = max(0, warmup_start_ammo_shells); + warmup_start_ammo_nails = max(0, warmup_start_ammo_nails); + warmup_start_ammo_rockets = max(0, warmup_start_ammo_rockets); + warmup_start_ammo_cells = max(0, warmup_start_ammo_cells); + warmup_start_ammo_plasma = max(0, warmup_start_ammo_plasma); + warmup_start_ammo_fuel = max(0, warmup_start_ammo_fuel); +} + +float g_bugrigs; +float g_bugrigs_planar_movement; +float g_bugrigs_planar_movement_car_jumping; +float g_bugrigs_reverse_spinning; +float g_bugrigs_reverse_speeding; +float g_bugrigs_reverse_stopping; +float g_bugrigs_air_steering; +float g_bugrigs_angle_smoothing; +float g_bugrigs_friction_floor; +float g_bugrigs_friction_brake; +float g_bugrigs_friction_air; +float g_bugrigs_accel; +float g_bugrigs_speed_ref; +float g_bugrigs_speed_pow; +float g_bugrigs_steer; + +float sv_autotaunt; +float sv_taunt; + +string GetGametype(); // g_world.qc +void mutators_add(); // mutators.qc +void readlevelcvars(void) +{ + // load mutators + mutators_add(); + + if(cvar("sv_allow_fullbright")) + serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT; + + g_bugrigs = cvar("g_bugrigs"); + g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement"); + g_bugrigs_planar_movement_car_jumping = cvar("g_bugrigs_planar_movement_car_jumping"); + g_bugrigs_reverse_spinning = cvar("g_bugrigs_reverse_spinning"); + g_bugrigs_reverse_speeding = cvar("g_bugrigs_reverse_speeding"); + g_bugrigs_reverse_stopping = cvar("g_bugrigs_reverse_stopping"); + g_bugrigs_air_steering = cvar("g_bugrigs_air_steering"); + g_bugrigs_angle_smoothing = cvar("g_bugrigs_angle_smoothing"); + g_bugrigs_friction_floor = cvar("g_bugrigs_friction_floor"); + g_bugrigs_friction_brake = cvar("g_bugrigs_friction_brake"); + g_bugrigs_friction_air = cvar("g_bugrigs_friction_air"); + g_bugrigs_accel = cvar("g_bugrigs_accel"); + g_bugrigs_speed_ref = cvar("g_bugrigs_speed_ref"); + g_bugrigs_speed_pow = cvar("g_bugrigs_speed_pow"); + g_bugrigs_steer = cvar("g_bugrigs_steer"); + + g_instagib = cvar("g_instagib"); + + sv_clones = cvar("sv_clones"); + sv_foginterval = cvar("sv_foginterval"); + g_cloaked = cvar("g_cloaked"); + g_footsteps = cvar("g_footsteps"); + g_grappling_hook = cvar("g_grappling_hook"); + g_jetpack = cvar("g_jetpack"); + sv_maxidle = cvar("sv_maxidle"); + sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle"); + sv_autotaunt = cvar("sv_autotaunt"); + sv_taunt = cvar("sv_taunt"); + + warmup_stage = cvar("g_warmup"); + g_warmup_limit = cvar("g_warmup_limit"); + g_warmup_allguns = cvar("g_warmup_allguns"); + g_warmup_allow_timeout = cvar("g_warmup_allow_timeout"); + + if ((g_race && g_race_qualifying == 2) || g_assault || cvar("g_campaign")) + warmup_stage = 0; // these modes cannot work together, sorry + + g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon"); + g_pickup_respawntime_superweapon = cvar("g_pickup_respawntime_superweapon"); + g_pickup_respawntime_ammo = cvar("g_pickup_respawntime_ammo"); + g_pickup_respawntime_short = cvar("g_pickup_respawntime_short"); + g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium"); + g_pickup_respawntime_long = cvar("g_pickup_respawntime_long"); + g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup"); + g_pickup_respawntimejitter_weapon = cvar("g_pickup_respawntimejitter_weapon"); + g_pickup_respawntimejitter_superweapon = cvar("g_pickup_respawntimejitter_superweapon"); + g_pickup_respawntimejitter_ammo = cvar("g_pickup_respawntimejitter_ammo"); + g_pickup_respawntimejitter_short = cvar("g_pickup_respawntimejitter_short"); + g_pickup_respawntimejitter_medium = cvar("g_pickup_respawntimejitter_medium"); + g_pickup_respawntimejitter_long = cvar("g_pickup_respawntimejitter_long"); + g_pickup_respawntimejitter_powerup = cvar("g_pickup_respawntimejitter_powerup"); + + g_weaponspeedfactor = cvar("g_weaponspeedfactor"); + g_weaponratefactor = cvar("g_weaponratefactor"); + g_weapondamagefactor = cvar("g_weapondamagefactor"); + g_weaponforcefactor = cvar("g_weaponforcefactor"); + g_weaponspreadfactor = cvar("g_weaponspreadfactor"); + + g_pickup_shells = cvar("g_pickup_shells"); + g_pickup_shells_max = cvar("g_pickup_shells_max"); + g_pickup_nails = cvar("g_pickup_nails"); + g_pickup_nails_max = cvar("g_pickup_nails_max"); + g_pickup_rockets = cvar("g_pickup_rockets"); + g_pickup_rockets_max = cvar("g_pickup_rockets_max"); + g_pickup_cells = cvar("g_pickup_cells"); + g_pickup_cells_max = cvar("g_pickup_cells_max"); + g_pickup_plasma = cvar("g_pickup_plasma"); + g_pickup_plasma_max = cvar("g_pickup_plasma_max"); + g_pickup_fuel = cvar("g_pickup_fuel"); + g_pickup_fuel_jetpack = cvar("g_pickup_fuel_jetpack"); + g_pickup_fuel_max = cvar("g_pickup_fuel_max"); + g_pickup_armorsmall = cvar("g_pickup_armorsmall"); + g_pickup_armorsmall_max = cvar("g_pickup_armorsmall_max"); + g_pickup_armorsmall_anyway = cvar("g_pickup_armorsmall_anyway"); + g_pickup_armormedium = cvar("g_pickup_armormedium"); + g_pickup_armormedium_max = cvar("g_pickup_armormedium_max"); + g_pickup_armormedium_anyway = cvar("g_pickup_armormedium_anyway"); + g_pickup_armorbig = cvar("g_pickup_armorbig"); + g_pickup_armorbig_max = cvar("g_pickup_armorbig_max"); + g_pickup_armorbig_anyway = cvar("g_pickup_armorbig_anyway"); + g_pickup_armorlarge = cvar("g_pickup_armorlarge"); + g_pickup_armorlarge_max = cvar("g_pickup_armorlarge_max"); + g_pickup_armorlarge_anyway = cvar("g_pickup_armorlarge_anyway"); + g_pickup_healthsmall = cvar("g_pickup_healthsmall"); + g_pickup_healthsmall_max = cvar("g_pickup_healthsmall_max"); + g_pickup_healthsmall_anyway = cvar("g_pickup_healthsmall_anyway"); + g_pickup_healthmedium = cvar("g_pickup_healthmedium"); + g_pickup_healthmedium_max = cvar("g_pickup_healthmedium_max"); + g_pickup_healthmedium_anyway = cvar("g_pickup_healthmedium_anyway"); + g_pickup_healthlarge = cvar("g_pickup_healthlarge"); + g_pickup_healthlarge_max = cvar("g_pickup_healthlarge_max"); + g_pickup_healthlarge_anyway = cvar("g_pickup_healthlarge_anyway"); + g_pickup_healthmega = cvar("g_pickup_healthmega"); + g_pickup_healthmega_max = cvar("g_pickup_healthmega_max"); + g_pickup_healthmega_anyway = cvar("g_pickup_healthmega_anyway"); + + g_pickup_ammo_anyway = cvar("g_pickup_ammo_anyway"); + g_pickup_weapons_anyway = cvar("g_pickup_weapons_anyway"); + + g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay")); + if(!g_weapon_stay) + g_weapon_stay = cvar("g_weapon_stay"); + + if (!warmup_stage) + game_starttime = time + cvar("g_start_delay"); + + readplayerstartcvars(); +} + +//#NO AUTOCVARS END + + +// Sound functions +//string precache_sound (string s) = #19; +// hack +float precache_sound_index (string s) = #19; + +const float SND_VOLUME = 1; +const float SND_ATTENUATION = 2; +const float SND_LARGEENTITY = 8; +const float SND_LARGESOUND = 16; + +// WARNING: this kills the trace globals +#define EXACTTRIGGER_TOUCH if(WarpZoneLib_ExactTrigger_Touch()) return +#define EXACTTRIGGER_INIT WarpZoneLib_ExactTrigger_Init() + +const float INITPRIO_FIRST = 0; +const float INITPRIO_GAMETYPE = 0; +const float INITPRIO_GAMETYPE_FALLBACK = 1; +const float INITPRIO_FINDTARGET = 10; +const float INITPRIO_DROPTOFLOOR = 20; +const float INITPRIO_SETLOCATION = 90; +const float INITPRIO_LINKDOORS = 91; +const float INITPRIO_LAST = 99; + +.void(void) initialize_entity; +.float initialize_entity_order; +.entity initialize_entity_next; +entity initialize_entity_first; + + + + + +float sound_allowed(float dest, entity e); +void InitializeEntity(entity e, void(void) func, float order); +void SetCustomizer(entity e, float(void) customizer, void(void) uncustomizer); +void Net_LinkEntity(entity e, float docull, float dt, float(entity, float) sendfunc); + +#endif \ No newline at end of file diff --git a/qcsrc/server/movelib.qc b/qcsrc/server/movelib.qc index 66c13162f..a156074d1 100644 --- a/qcsrc/server/movelib.qc +++ b/qcsrc/server/movelib.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../csqcmodellib/sv_model.qh" +#endif + #ifdef SVQC .vector moveto; diff --git a/qcsrc/server/mutators/mutators.qc b/qcsrc/server/mutators/mutators.qc index 0fa2caab2..4baa94836 100644 --- a/qcsrc/server/mutators/mutators.qc +++ b/qcsrc/server/mutators/mutators.qc @@ -1,3 +1,12 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../sys-post.qh" + #include "mutators_include.qh" + #include "../../common/mapinfo.qh" +#endif + void mutators_add() { #define CHECK_MUTATOR_ADD(mut_cvar,mut_name,dependence) \ diff --git a/qcsrc/server/mutators/mutators_include.qc b/qcsrc/server/mutators/mutators_include.qc index 0f52e34f0..260332961 100644 --- a/qcsrc/server/mutators/mutators_include.qc +++ b/qcsrc/server/mutators/mutators_include.qc @@ -1,3 +1,88 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" + #include "../vehicles/vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/campaign_common.qh" + #include "../../common/mapinfo.qh" + #include "../command/common.qh" + #include "../command/banning.qh" + #include "../command/radarmap.qh" + #include "../command/vote.qh" + #include "../command/getreplies.qh" + #include "../command/cmd.qh" + #include "../command/sv_cmd.qh" + #include "../../common/csqcmodel_settings.qh" + #include "../../csqcmodellib/common.qh" + #include "../../csqcmodellib/sv_model.qh" + #include "../anticheat.qh" + #include "../cheats.qh" + #include "../../common/playerstats.qh" + #include "../portals.qh" + #include "../g_hook.qh" + #include "../scores.qh" + #include "../spawnpoints.qh" + #include "../mapvoting.qh" + #include "../ipban.qh" + #include "../race.qh" + #include "../antilag.qh" + #include "../playerdemo.qh" + #include "../round_handler.qh" + #include "../item_key.qh" + #include "../secret.qh" + #include "../pathlib/pathlib.qh" + #include "../tturrets/include/turrets.qh" + #include "../vehicles/vehicles.qh" +#endif + #include "base.qc" #include "gamemode_assault.qc" #include "gamemode_ca.qc" diff --git a/qcsrc/server/mutators/mutators_include.qh b/qcsrc/server/mutators/mutators_include.qh index c869ab696..3a83b2b57 100644 --- a/qcsrc/server/mutators/mutators_include.qh +++ b/qcsrc/server/mutators/mutators_include.qh @@ -1,3 +1,57 @@ +#ifndef MUTATORS_INCLUDE_H +#define MUTATORS_INCLUDE_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" +#endif + #include "base.qh" #include "mutators.qh" #include "gamemode_assault.qh" @@ -16,3 +70,4 @@ #include "mutator_overkill.qh" #include "mutator_nades.qh" #include "mutator_buffs.qh" +#endif \ No newline at end of file diff --git a/qcsrc/server/pathlib/pathlib.qh b/qcsrc/server/pathlib/pathlib.qh index 55bd95dbd..300bf3923 100644 --- a/qcsrc/server/pathlib/pathlib.qh +++ b/qcsrc/server/pathlib/pathlib.qh @@ -1,3 +1,89 @@ +#ifndef PATHLIB_H +#define PATHLIB_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" + #include "../vehicles/vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/campaign_common.qh" + #include "../../common/mapinfo.qh" + #include "../command/common.qh" + #include "../command/banning.qh" + #include "../command/radarmap.qh" + #include "../command/vote.qh" + #include "../command/getreplies.qh" + #include "../command/cmd.qh" + #include "../command/sv_cmd.qh" + #include "../../common/csqcmodel_settings.qh" + #include "../../csqcmodellib/common.qh" + #include "../../csqcmodellib/sv_model.qh" + #include "../anticheat.qh" + #include "../cheats.qh" + #include "../../common/playerstats.qh" + #include "../portals.qh" + #include "../g_hook.qh" + #include "../scores.qh" + #include "../spawnpoints.qh" + #include "../mapvoting.qh" + #include "../ipban.qh" + #include "../race.qh" + #include "../antilag.qh" + #include "../playerdemo.qh" + #include "../round_handler.qh" + #include "../item_key.qh" + #include "../secret.qh" +#endif + + .entity pathlib_list; .entity path_next; .entity path_prev; @@ -116,3 +202,4 @@ var float pathlib_wpp_waypointcallback(entity wp, entity wp_prev); #include "expandnode.qc" #include "main.qc" #include "path_waypoint.qc" +#endif \ No newline at end of file diff --git a/qcsrc/server/playerdemo.qc b/qcsrc/server/playerdemo.qc index b848cfac7..cb61a55a5 100644 --- a/qcsrc/server/playerdemo.qc +++ b/qcsrc/server/playerdemo.qc @@ -1,3 +1,12 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "defs.qh" + #include "playerdemo.qh" +#endif + .float playerdemo_fh; .float playerdemo_mode; .float playerdemo_starttime; diff --git a/qcsrc/server/playerdemo.qh b/qcsrc/server/playerdemo.qh index b79068367..346dcf45c 100644 --- a/qcsrc/server/playerdemo.qh +++ b/qcsrc/server/playerdemo.qh @@ -1,3 +1,84 @@ +#ifndef PLAYERDEMO_H +#define PLAYERDEMO_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "mapvoting.qh" + #include "ipban.qh" + #include "race.qh" + #include "antilag.qh" +#endif + void playerdemo_init(); void playerdemo_shutdown(); void playerdemo_write(); @@ -5,3 +86,4 @@ float playerdemo_read(); void playerdemo_open_read(string f); void playerdemo_open_write(string f); +#endif \ No newline at end of file diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 16fde1955..008dd7a1a 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -1,3 +1,24 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/util_server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/weapons/weapons.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "../csqcmodellib/sv_model.qh" + #include "portals.qh" + #include "g_hook.qh" +#endif + #define PORTALS_ARE_NOT_SOLID const vector SAFENUDGE = '1 1 1'; diff --git a/qcsrc/server/portals.qh b/qcsrc/server/portals.qh index cd0bc0408..03fa3d546 100644 --- a/qcsrc/server/portals.qh +++ b/qcsrc/server/portals.qh @@ -1,3 +1,76 @@ +#ifndef PORTALS_H +#define PORTALS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" +#endif + .float portal_id; .entity portal_in, portal_out; @@ -9,3 +82,4 @@ void Portal_ClearWithID(entity own, float id); vector Portal_ApplyTransformToPlayerAngle(vector transform, vector vangle); void Portal_ClearAll_PortalsOnly(entity own); +#endif \ No newline at end of file diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index aa70d407c..2cf7f9f78 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -1,3 +1,25 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/util_server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "../common/mapinfo.qh" + #include "command/sv_cmd.qh" + #include "portals.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "race.qh" +#endif + float race_readTime(string map, float pos) { string rr = (g_cts) ? CTS_RECORD : RACE_RECORD; diff --git a/qcsrc/server/race.qh b/qcsrc/server/race.qh index 09b4b36ce..e72a93fe0 100644 --- a/qcsrc/server/race.qh +++ b/qcsrc/server/race.qh @@ -1,3 +1,82 @@ +#ifndef RACE_H +#define RACE_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "mapvoting.qh" + #include "ipban.qh" +#endif + float race_spawns; float race_highest_place_spawn; // number of places; a place higher gets spawned at 0 float race_lowest_place_spawn; // where to spawn in qualifying @@ -26,3 +105,4 @@ float race_GetFractionalLapCount(entity e); float race_readTime(string map, float pos); string race_readUID(string map, float pos); string race_readName(string map, float pos); +#endif \ No newline at end of file diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index 6681151df..e6f5c9a43 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/util.qh" + #include "defs.qh" + #include "round_handler.qh" +#endif + void round_handler_Think() { float f; diff --git a/qcsrc/server/round_handler.qh b/qcsrc/server/round_handler.qh index 90ffc33fa..8751751ce 100644 --- a/qcsrc/server/round_handler.qh +++ b/qcsrc/server/round_handler.qh @@ -1,3 +1,85 @@ +#ifndef ROUND_HANDLER_H +#define ROUND_HANDLER_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "mapvoting.qh" + #include "ipban.qh" + #include "race.qh" + #include "antilag.qh" + #include "playerdemo.qh" +#endif + entity round_handler; .float delay; // stores delay from round end to countdown start .float count; // stores initial number of the countdown @@ -21,3 +103,4 @@ void round_handler_Remove(); #define round_handler_IsRoundStarted() (!round_handler.wait && !round_handler.cnt) #define round_handler_GetEndTime() (round_handler.round_endtime) +#endif \ No newline at end of file diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index b7278241e..23bca3f1f 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -1,3 +1,20 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "mutators/mutators_include.qh" + #include "../common/mapinfo.qh" + #include "../common/playerstats.qh" + #include "scores.qh" +#endif + .entity scorekeeper; entity teamscorekeepers[16]; string scores_label[MAX_SCORE]; diff --git a/qcsrc/server/scores.qh b/qcsrc/server/scores.qh index c26a4d295..1d0f17b81 100644 --- a/qcsrc/server/scores.qh +++ b/qcsrc/server/scores.qh @@ -1,3 +1,78 @@ +#ifndef SCORES_H +#define SCORES_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" +#endif + entity scores_initialized; // non-world when scores labels/rules have been set .float scores[MAX_SCORE]; .float teamscores[MAX_TEAMSCORE]; @@ -124,3 +199,4 @@ string GetTeamScoreString(float tm, float shortString); * nospectators: exclude spectators */ entity PlayerScore_Sort(.float field, float teams, float strict, float nospectators); +#endif \ No newline at end of file diff --git a/qcsrc/server/scores_rules.qc b/qcsrc/server/scores_rules.qc index 0b9d120d4..833041fad 100644 --- a/qcsrc/server/scores_rules.qc +++ b/qcsrc/server/scores_rules.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../common/constants.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "scores.qh" +#endif + float c1, c2, c3, c4; void CheckAllowedTeams (entity for_whom); @@ -43,4 +53,3 @@ void ScoreRules_generic() ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, true); ScoreRules_basics_end(); } - diff --git a/qcsrc/server/secret.qc b/qcsrc/server/secret.qc index 06f7e075d..7d5ca207b 100644 --- a/qcsrc/server/secret.qc +++ b/qcsrc/server/secret.qc @@ -1,4 +1,11 @@ - +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../common/util.qh" + #include "defs.qh" + #include "secret.qh" +#endif void secrets_setstatus() { self.stat_secrets_total = secrets_total; diff --git a/qcsrc/server/secret.qh b/qcsrc/server/secret.qh index dd94b1921..a99ea5baf 100644 --- a/qcsrc/server/secret.qh +++ b/qcsrc/server/secret.qh @@ -1,3 +1,87 @@ +#ifndef SECRET_H +#define SECRET_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" + #include "spawnpoints.qh" + #include "mapvoting.qh" + #include "ipban.qh" + #include "race.qh" + #include "antilag.qh" + #include "playerdemo.qh" + #include "round_handler.qh" + #include "item_key.qh" +#endif + /** * Total number of secrets on the map. */ @@ -16,4 +100,4 @@ float secrets_found; * update secrets status. */ void secrets_setstatus(); - +#endif \ No newline at end of file diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 552981ff3..10ef623e7 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -1,3 +1,20 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/util_server.qh" + #include "../common/constants.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "mutators/mutators_include.qh" + #include "spawnpoints.qh" + #include "race.qh" +#endif + float SpawnPoint_Send(entity to, float sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNPOINT); diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index 607629e42..7345a36ae 100644 --- a/qcsrc/server/spawnpoints.qh +++ b/qcsrc/server/spawnpoints.qh @@ -1,5 +1,82 @@ +#ifndef SPAWNPOINTS_H +#define SPAWNPOINTS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "campaign.qh" + #include "../common/campaign_common.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "command/banning.qh" + #include "command/radarmap.qh" + #include "command/vote.qh" + #include "command/getreplies.qh" + #include "command/cmd.qh" + #include "command/sv_cmd.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "cheats.qh" + #include "../common/playerstats.qh" + #include "portals.qh" + #include "g_hook.qh" + #include "scores.qh" +#endif + .vector spawnpoint_score; float spawnpoint_nag; float SpawnEvent_Send(entity to, float sf); entity Spawn_FilterOutBadSpots(entity firstspot, float mindist, float teamcheck); entity SelectSpawnPoint (float anypoint); +#endif \ No newline at end of file diff --git a/qcsrc/server/steerlib.qc b/qcsrc/server/steerlib.qc index fb243792b..0b275f628 100644 --- a/qcsrc/server/steerlib.qc +++ b/qcsrc/server/steerlib.qc @@ -1,3 +1,10 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" +#endif + .vector steerto; /** diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index fa1066b69..40b3d950a 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -1,3 +1,28 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/csqcprojectile.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "vehicles/vehicles_def.qh" + #include "../common/mapinfo.qh" + #include "command/common.qh" + #include "../csqcmodellib/sv_model.qh" + #include "anticheat.qh" + #include "g_hook.qh" +#endif + void CreatureFrame (void) { entity oldself; diff --git a/qcsrc/server/sys-post.qh b/qcsrc/server/sys-post.qh index 10b1abcef..38fc0f1cc 100644 --- a/qcsrc/server/sys-post.qh +++ b/qcsrc/server/sys-post.qh @@ -1,3 +1,15 @@ +#ifndef SERVER_SYS_POST_H +#define SERVER_SYS_POST_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" +#endif + #pragma noref 0 #undef ATTEN_NORM @@ -12,3 +24,4 @@ var float(string name) cvar; var string(string name) cvar_string; var void(string name, string value) cvar_set; +#endif \ No newline at end of file diff --git a/qcsrc/server/sys-pre.qh b/qcsrc/server/sys-pre.qh index 1907cb2bb..07c520938 100644 --- a/qcsrc/server/sys-pre.qh +++ b/qcsrc/server/sys-pre.qh @@ -1,4 +1,11 @@ -#define SVQC +#ifndef SERVER_SYS_PRE_H +#define SERVER_SYS_PRE_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" +#endif #define ATTEN_NORM builtin_ATTEN_NORM #define objerror builtin_objerror @@ -10,3 +17,4 @@ #define cvar builtin_cvar #pragma noref 1 +#endif \ No newline at end of file diff --git a/qcsrc/server/t_halflife.qc b/qcsrc/server/t_halflife.qc index bb2254c97..72fd0f07f 100644 --- a/qcsrc/server/t_halflife.qc +++ b/qcsrc/server/t_halflife.qc @@ -1,3 +1,11 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../warpzonelib/util_server.qh" + #include "defs.qh" + #include "vehicles/vehicles_def.qh" +#endif .float roomtype; .float radius; diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 1b876a098..058bd8292 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -1,3 +1,33 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "../common/util.qh" + #include "../common/buffs.qh" + #include "../common/weapons/weapons.qh" + #include "../client/autocvars.qh" + #include "../client/movetypes.qh" + #include "../client/main.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/cl_model.qh" + #include "t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/util_server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/monsters/monsters.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/weaponsystem.qh" + #include "t_items.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" +#endif + #ifdef CSQC void ItemDraw() { diff --git a/qcsrc/server/t_items.qh b/qcsrc/server/t_items.qh index 6b0c317c4..6b3acb064 100644 --- a/qcsrc/server/t_items.qh +++ b/qcsrc/server/t_items.qh @@ -1,3 +1,103 @@ +#ifndef T_ITEMS_H +#define T_ITEMS_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/client.qh" + #include "../common/playerstats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/weapons/weapons.qh" + #include "../common/mapinfo.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/urllib.qh" + #include "../common/animdecide.qh" + #include "../client/command/cl_cmd.qh" + #include "../common/monsters/monsters.qh" + #include "../client/autocvars.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "../client/damage.qh" + #include "../csqcmodellib/interpolate.qh" + #include "../client/teamradar.qh" + #include "../client/hud.qh" + #include "../client/scoreboard.qh" + #include "../client/waypointsprites.qh" + #include "../client/movetypes.qh" + #include "../client/prandom.qh" + #include "../client/bgmscript.qh" + #include "../client/noise.qh" + #include "../client/tturrets.qh" + #include "tturrets/include/turrets_early.qh" + #include "../client/main.qh" + #include "../client/vehicles/vehicles.qh" + #include "../common/csqcmodel_settings.qh" + #include "../csqcmodellib/common.qh" + #include "../csqcmodellib/cl_model.qh" + #include "../csqcmodellib/cl_player.qh" + #include "../client/weapons/projectile.qh" + #include "../client/player_skeleton.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "../common/nades.qh" + #include "../common/buffs.qh" + #include "../common/test.qh" + #include "../common/counting.qh" + #include "../common/urllib.qh" + #include "../common/command/markup.qh" + #include "../common/command/rpn.qh" + #include "../common/command/generic.qh" + #include "../common/command/shared_defs.qh" + #include "../common/net_notice.qh" + #include "../common/animdecide.qh" + #include "../common/monsters/monsters.qh" + #include "../common/monsters/sv_monsters.qh" + #include "../common/monsters/spawn.qh" + #include "../common/weapons/config.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/accuracy.qh" + #include "weapons/common.qh" + #include "weapons/csqcprojectile.qh" + #include "weapons/hitplot.qh" + #include "weapons/selection.qh" + #include "weapons/spawning.qh" + #include "weapons/throwing.qh" + #include "weapons/tracing.qh" + #include "weapons/weaponstats.qh" + #include "weapons/weaponsystem.qh" +#endif + // constants const int IT_UNLIMITED_WEAPON_AMMO = 1; // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup. const int IT_UNLIMITED_SUPERWEAPONS = 2; // when this bit is set, superweapons don't expire. Checkpoints can give this powerup. @@ -166,3 +266,4 @@ void GiveRot(entity e, float v0, float v1, .float rotfield, float rottime, .floa float GiveItems(entity e, float beginarg, float endarg); #endif +#endif \ No newline at end of file diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index 99a58a4b7..8bd5a2f1c 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/util_server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/animdecide.qh" + #include "../common/weapons/weapons.qh" + #include "weapons/csqcprojectile.qh" + #include "constants.qh" + #include "defs.qh" +#endif + const float PUSH_ONCE = 1; const float PUSH_SILENT = 2; diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index c51e5d53a..c714c69ec 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -1,3 +1,23 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../warpzonelib/mathlib.qh" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/weapons/weapons.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "command/common.qh" + #include "../csqcmodellib/sv_model.qh" +#endif + .float dmgtime2; void generic_plat_blocked() { diff --git a/qcsrc/server/t_quake.qc b/qcsrc/server/t_quake.qc index 219a6ae23..e7a3558a5 100644 --- a/qcsrc/server/t_quake.qc +++ b/qcsrc/server/t_quake.qc @@ -1,3 +1,9 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" +#endif + //*********************** //QUAKE 1 ENTITIES - So people can play quake1 maps with the xonotic weapons //*********************** diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index 7c1a58287..8e7079e07 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../common/buffs.qh" + #include "../common/weapons/weapons.qh" + #include "defs.qh" + #include "../common/mapinfo.qh" +#endif + //*********************** //QUAKE 3 ENTITIES - So people can play quake3 maps with the xonotic weapons //*********************** diff --git a/qcsrc/server/t_swamp.qc b/qcsrc/server/t_swamp.qc index e481dc634..b103e15e1 100644 --- a/qcsrc/server/t_swamp.qc +++ b/qcsrc/server/t_swamp.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../warpzonelib/util_server.qh" + #include "../common/weapons/weapons.qh" + #include "defs.qh" + #include "../common/deathtypes.qh" +#endif + /* * t_swamp.c * Adds spawnfunc_trigger_swamp and suppoart routines for xonotic 1.2.1+ diff --git a/qcsrc/server/t_teleporters.qc b/qcsrc/server/t_teleporters.qc index af72d135a..5143e3fb2 100644 --- a/qcsrc/server/t_teleporters.qc +++ b/qcsrc/server/t_teleporters.qc @@ -1,3 +1,24 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../warpzonelib/common.qh" + #include "../warpzonelib/util_server.qh" + #include "../warpzonelib/server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "weapons/csqcprojectile.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/deathtypes.qh" + #include "tturrets/include/turrets_early.qh" + #include "vehicles/vehicles_def.qh" + #include "../common/mapinfo.qh" + #include "anticheat.qh" +#endif + void trigger_teleport_use() { if(teamplay) diff --git a/qcsrc/server/target_music.qc b/qcsrc/server/target_music.qc index a806d40bb..da805d5ea 100644 --- a/qcsrc/server/target_music.qc +++ b/qcsrc/server/target_music.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "constants.qh" + #include "defs.qh" +#endif + .float lifetime; // values: // volume diff --git a/qcsrc/server/target_spawn.qc b/qcsrc/server/target_spawn.qc index 93d7485bb..ec410ff1a 100644 --- a/qcsrc/server/target_spawn.qc +++ b/qcsrc/server/target_spawn.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../common/util.qh" + #include "defs.qh" +#endif + // spawner entity // "classname" "target_spawn" // "message" "fieldname value fieldname value ..." diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 91eb7cebd..72e065485 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -1,3 +1,23 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "sys-post.qh" + #include "../common/constants.qh" + #include "../common/teams.qh" + #include "../common/util.qh" + #include "autocvars.qh" + #include "defs.qh" + #include "../common/notifications.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "../common/mapinfo.qh" + #include "command/vote.qh" + #include "scores.qh" + #include "race.qh" +#endif + string cache_mutatormsg; string cache_lastmutatormsg; diff --git a/qcsrc/server/tturrets/include/turrets.qh b/qcsrc/server/tturrets/include/turrets.qh index 60936410d..5c9123c1c 100644 --- a/qcsrc/server/tturrets/include/turrets.qh +++ b/qcsrc/server/tturrets/include/turrets.qh @@ -1,3 +1,89 @@ +#ifndef TURRETS_H +#define TURRETS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../../common/util-pre.qh" + #include "../../sys-pre.qh" + #include "../../../dpdefs/progsdefs.qc" + #include "../../../dpdefs/dpextensions.qc" + #include "../../sys-post.qh" + #include "../../../warpzonelib/anglestransform.qh" + #include "../../../warpzonelib/mathlib.qh" + #include "../../../warpzonelib/common.qh" + #include "../../../warpzonelib/util_server.qh" + #include "../../../warpzonelib/server.qh" + #include "../../../common/constants.qh" + #include "../../../common/stats.qh" + #include "../../../common/teams.qh" + #include "../../../common/util.qh" + #include "../../../common/nades.qh" + #include "../../../common/buffs.qh" + #include "../../../common/test.qh" + #include "../../../common/counting.qh" + #include "../../../common/urllib.qh" + #include "../../../common/command/markup.qh" + #include "../../../common/command/rpn.qh" + #include "../../../common/command/generic.qh" + #include "../../../common/command/shared_defs.qh" + #include "../../../common/net_notice.qh" + #include "../../../common/animdecide.qh" + #include "../../../common/monsters/monsters.qh" + #include "../../../common/monsters/sv_monsters.qh" + #include "../../../common/monsters/spawn.qh" + #include "../../../common/weapons/config.qh" + #include "../../../common/weapons/weapons.qh" + #include "../../weapons/accuracy.qh" + #include "../../weapons/common.qh" + #include "../../weapons/csqcprojectile.qh" + #include "../../weapons/hitplot.qh" + #include "../../weapons/selection.qh" + #include "../../weapons/spawning.qh" + #include "../../weapons/throwing.qh" + #include "../../weapons/tracing.qh" + #include "../../weapons/weaponstats.qh" + #include "../../weapons/weaponsystem.qh" + #include "../../t_items.qh" + #include "../../autocvars.qh" + #include "../../constants.qh" + #include "../../defs.qh" + #include "../../../common/notifications.qh" + #include "../../../common/deathtypes.qh" + #include "../../mutators/mutators_include.qh" + #include "turrets_early.qh" + #include "../../vehicles/vehicles_def.qh" + #include "../../campaign.qh" + #include "../../../common/campaign_common.qh" + #include "../../../common/mapinfo.qh" + #include "../../command/common.qh" + #include "../../command/banning.qh" + #include "../../command/radarmap.qh" + #include "../../command/vote.qh" + #include "../../command/getreplies.qh" + #include "../../command/cmd.qh" + #include "../../command/sv_cmd.qh" + #include "../../../common/csqcmodel_settings.qh" + #include "../../../csqcmodellib/common.qh" + #include "../../../csqcmodellib/sv_model.qh" + #include "../../anticheat.qh" + #include "../../cheats.qh" + #include "../../../common/playerstats.qh" + #include "../../portals.qh" + #include "../../g_hook.qh" + #include "../../scores.qh" + #include "../../spawnpoints.qh" + #include "../../mapvoting.qh" + #include "../../ipban.qh" + #include "../../race.qh" + #include "../../antilag.qh" + #include "../../playerdemo.qh" + #include "../../round_handler.qh" + #include "../../item_key.qh" + #include "../../secret.qh" +#endif + + #ifdef TTURRETS_ENABLED // Include section. @@ -27,3 +113,4 @@ //#include "../units/unit_hive.qc" /// Swarm AI #endif // TTURRETS_ENABLED +#endif \ No newline at end of file diff --git a/qcsrc/server/tturrets/include/turrets_early.qh b/qcsrc/server/tturrets/include/turrets_early.qh index 77d7cda9d..92c678620 100644 --- a/qcsrc/server/tturrets/include/turrets_early.qh +++ b/qcsrc/server/tturrets/include/turrets_early.qh @@ -1,3 +1,101 @@ +#ifndef TURRETS_EARLY_H +#define TURRETS_EARLY_H + +#if defined(CSQC) + #include "../../../common/util-pre.qh" + #include "../../../client/sys-pre.qh" + #include "../../../dpdefs/csprogsdefs.qc" + #include "../../../client/sys-post.qh" + #include "../../../client/Defs.qc" + #include "../../../dpdefs/keycodes.qc" + #include "../../../common/constants.qh" + #include "../../../common/stats.qh" + #include "../../../warpzonelib/anglestransform.qh" + #include "../../../warpzonelib/mathlib.qh" + #include "../../../warpzonelib/common.qh" + #include "../../../warpzonelib/client.qh" + #include "../../../common/playerstats.qh" + #include "../../../common/teams.qh" + #include "../../../common/util.qh" + #include "../../../common/nades.qh" + #include "../../../common/buffs.qh" + #include "../../../common/test.qh" + #include "../../../common/counting.qh" + #include "../../../common/weapons/weapons.qh" + #include "../../../common/mapinfo.qh" + #include "../../../common/command/markup.qh" + #include "../../../common/command/rpn.qh" + #include "../../../common/command/generic.qh" + #include "../../../common/command/shared_defs.qh" + #include "../../../common/urllib.qh" + #include "../../../common/animdecide.qh" + #include "../../../client/command/cl_cmd.qh" + #include "../../../common/monsters/monsters.qh" + #include "../../../client/autocvars.qh" + #include "../../../common/notifications.qh" + #include "../../../common/deathtypes.qh" + #include "../../../client/damage.qh" + #include "../../../csqcmodellib/interpolate.qh" + #include "../../../client/teamradar.qh" + #include "../../../client/hud.qh" + #include "../../../client/scoreboard.qh" + #include "../../../client/waypointsprites.qh" + #include "../../../client/movetypes.qh" + #include "../../../client/prandom.qh" + #include "../../../client/bgmscript.qh" + #include "../../../client/noise.qh" + #include "../../../client/tturrets.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../../common/util-pre.qh" + #include "../../sys-pre.qh" + #include "../../../dpdefs/progsdefs.qc" + #include "../../../dpdefs/dpextensions.qc" + #include "../../sys-post.qh" + #include "../../../warpzonelib/anglestransform.qh" + #include "../../../warpzonelib/mathlib.qh" + #include "../../../warpzonelib/common.qh" + #include "../../../warpzonelib/util_server.qh" + #include "../../../warpzonelib/server.qh" + #include "../../../common/constants.qh" + #include "../../../common/stats.qh" + #include "../../../common/teams.qh" + #include "../../../common/util.qh" + #include "../../../common/nades.qh" + #include "../../../common/buffs.qh" + #include "../../../common/test.qh" + #include "../../../common/counting.qh" + #include "../../../common/urllib.qh" + #include "../../../common/command/markup.qh" + #include "../../../common/command/rpn.qh" + #include "../../../common/command/generic.qh" + #include "../../../common/command/shared_defs.qh" + #include "../../../common/net_notice.qh" + #include "../../../common/animdecide.qh" + #include "../../../common/monsters/monsters.qh" + #include "../../../common/monsters/sv_monsters.qh" + #include "../../../common/monsters/spawn.qh" + #include "../../../common/weapons/config.qh" + #include "../../../common/weapons/weapons.qh" + #include "../../weapons/accuracy.qh" + #include "../../weapons/common.qh" + #include "../../weapons/csqcprojectile.qh" + #include "../../weapons/hitplot.qh" + #include "../../weapons/selection.qh" + #include "../../weapons/spawning.qh" + #include "../../weapons/throwing.qh" + #include "../../weapons/tracing.qh" + #include "../../weapons/weaponstats.qh" + #include "../../weapons/weaponsystem.qh" + #include "../../t_items.qh" + #include "../../autocvars.qh" + #include "../../constants.qh" + #include "../../defs.qh" + #include "../../../common/notifications.qh" + #include "../../../common/deathtypes.qh" + #include "../../mutators/mutators_include.qh" +#endif + // Comment out below to skip turrets #define TTURRETS_ENABLED @@ -469,5 +567,4 @@ const int TNSF_ANIM = 128; const int TNSF_FULL_UPDATE = 16777215; #endif // TTURRETS_ENABLED - - +#endif \ No newline at end of file diff --git a/qcsrc/server/vehicles/bumblebee.qc b/qcsrc/server/vehicles/bumblebee.qc index 9c1aa461f..c52896fe8 100644 --- a/qcsrc/server/vehicles/bumblebee.qc +++ b/qcsrc/server/vehicles/bumblebee.qc @@ -1,3 +1,16 @@ +#if defined(CSQC) + #include "../../dpdefs/csprogsdefs.qc" + #include "../../client/Defs.qc" + #include "../../common/buffs.qh" + #include "../../client/damage.qh" + #include "../../client/movetypes.qh" + #include "../../client/main.qh" + #include "../../csqcmodellib/cl_model.qh" + #include "../../client/weapons/projectile.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + const float BRG_SETUP = 2; const float BRG_START = 4; const float BRG_END = 8; diff --git a/qcsrc/server/vehicles/vehicles.qh b/qcsrc/server/vehicles/vehicles.qh index 549dfeab7..d1b424463 100644 --- a/qcsrc/server/vehicles/vehicles.qh +++ b/qcsrc/server/vehicles/vehicles.qh @@ -1,3 +1,90 @@ +#ifndef VEHICLES_H +#define VEHICLES_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" + #include "vehicles_def.qh" + #include "../campaign.qh" + #include "../../common/campaign_common.qh" + #include "../../common/mapinfo.qh" + #include "../command/common.qh" + #include "../command/banning.qh" + #include "../command/radarmap.qh" + #include "../command/vote.qh" + #include "../command/getreplies.qh" + #include "../command/cmd.qh" + #include "../command/sv_cmd.qh" + #include "../../common/csqcmodel_settings.qh" + #include "../../csqcmodellib/common.qh" + #include "../../csqcmodellib/sv_model.qh" + #include "../anticheat.qh" + #include "../cheats.qh" + #include "../../common/playerstats.qh" + #include "../portals.qh" + #include "../g_hook.qh" + #include "../scores.qh" + #include "../spawnpoints.qh" + #include "../mapvoting.qh" + #include "../ipban.qh" + #include "../race.qh" + #include "../antilag.qh" + #include "../playerdemo.qh" + #include "../round_handler.qh" + #include "../item_key.qh" + #include "../secret.qh" + #include "../pathlib/pathlib.qh" + #include "../tturrets/include/turrets.qh" +#endif + #ifdef VEHICLES_ENABLED #include "vehicles.qc" @@ -8,3 +95,4 @@ #include "bumblebee.qc" #endif #endif +#endif \ No newline at end of file diff --git a/qcsrc/server/vehicles/vehicles_def.qh b/qcsrc/server/vehicles/vehicles_def.qh index 9c1f0ffd8..67270f467 100644 --- a/qcsrc/server/vehicles/vehicles_def.qh +++ b/qcsrc/server/vehicles/vehicles_def.qh @@ -1,3 +1,59 @@ +#ifndef VEHICLES_DEF_H +#define VEHICLES_DEF_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "../weapons/accuracy.qh" + #include "../weapons/common.qh" + #include "../weapons/csqcprojectile.qh" + #include "../weapons/hitplot.qh" + #include "../weapons/selection.qh" + #include "../weapons/spawning.qh" + #include "../weapons/throwing.qh" + #include "../weapons/tracing.qh" + #include "../weapons/weaponstats.qh" + #include "../weapons/weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" + #include "../mutators/mutators_include.qh" + #include "../tturrets/include/turrets_early.qh" +#endif + // #define VEHICLES_USE_ODE #define VEHICLES_ENABLED #ifdef VEHICLES_ENABLED @@ -71,3 +127,4 @@ void(entity e, vector force, vector force_pos) physics_addforce = #541; // apply void(entity e, vector torque) physics_addtorque = #542; // add relative torque #endif // VEHICLES_USE_ODE #endif // VEHICLES_ENABLED +#endif \ No newline at end of file diff --git a/qcsrc/server/waypointsprites.qc b/qcsrc/server/waypointsprites.qc index 5ba24b448..b96306749 100644 --- a/qcsrc/server/waypointsprites.qc +++ b/qcsrc/server/waypointsprites.qc @@ -1,3 +1,20 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../common/buffs.qh" + #include "autocvars.qh" + #include "constants.qh" + #include "defs.qh" + #include "../common/deathtypes.qh" + #include "mutators/mutators_include.qh" + #include "../common/mapinfo.qh" + #include "miscfunctions.qh" +#endif + ..entity owned_by_field; .float rule; .string model1; diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index 2c6d91854..706b00b5f 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -1,3 +1,18 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../mutators/mutators_include.qh" +#endif + float accuracy_byte(float n, float d) { //printf("accuracy: %d / %d\n", n, d); diff --git a/qcsrc/server/weapons/accuracy.qh b/qcsrc/server/weapons/accuracy.qh index 4cd43ee8a..ed4cec1f4 100644 --- a/qcsrc/server/weapons/accuracy.qh +++ b/qcsrc/server/weapons/accuracy.qh @@ -1,3 +1,41 @@ +#ifndef ACCURACY_H +#define ACCURACY_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" +#endif + .float cvar_cl_accuracy_data_share; .float cvar_cl_accuracy_data_receive; @@ -23,3 +61,4 @@ void accuracy_add(entity e, float w, float fired, float hit); // helper float accuracy_isgooddamage(entity attacker, entity targ); float accuracy_canbegooddamage(entity attacker); +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index 04658b52a..14c80fd48 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -1,3 +1,17 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/weapons/weapons.qh" + #include "common.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../../common/deathtypes.qh" +#endif void W_GiveWeapon (entity e, float wep) { diff --git a/qcsrc/server/weapons/common.qh b/qcsrc/server/weapons/common.qh index 8f9454ed5..7bb2f011a 100644 --- a/qcsrc/server/weapons/common.qh +++ b/qcsrc/server/weapons/common.qh @@ -1,3 +1,41 @@ +#ifndef WEAPONS_COMMON_H +#define WEAPONS_COMMON_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" +#endif void W_GiveWeapon (entity e, float wep); .float prevstrengthsound; @@ -5,3 +43,4 @@ void W_GiveWeapon (entity e, float wep); void W_PlayStrengthSound(entity player); float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtype, float exception); void W_PrepareExplosionByDamage(entity attacker, void() explode); +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index bf09e1585..3a1072ef8 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -1,3 +1,16 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../common/constants.qh" + #include "../../common/weapons/weapons.qh" + #include "csqcprojectile.qh" + #include "../t_items.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../command/common.qh" +#endif + .float csqcprojectile_type; float CSQCProjectile_SendEntity(entity to, float sf) diff --git a/qcsrc/server/weapons/csqcprojectile.qh b/qcsrc/server/weapons/csqcprojectile.qh index e00c0988b..e1f9c41c1 100644 --- a/qcsrc/server/weapons/csqcprojectile.qh +++ b/qcsrc/server/weapons/csqcprojectile.qh @@ -1,6 +1,47 @@ +#ifndef CSQCPROJECTILE_H +#define CSQCPROJECTILE_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "common.qh" +#endif + .float csqcprojectile_clientanimate; void CSQCProjectile(entity e, float clientanimate, float type, float docull); void UpdateCSQCProjectile(entity e); void UpdateCSQCProjectileAfterTeleport(entity e); void CSQCProjectile_Check(entity e); +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/hitplot.qc b/qcsrc/server/weapons/hitplot.qc index 226601e85..ace69b672 100644 --- a/qcsrc/server/weapons/hitplot.qc +++ b/qcsrc/server/weapons/hitplot.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../common/weapons/weapons.qh" + #include "hitplot.qh" + #include "../autocvars.qh" + #include "../defs.qh" + #include "../antilag.qh" +#endif + vector W_HitPlotUnnormalizedUntransform(vector screenforward, vector screenright, vector screenup, vector v) { vector ret; diff --git a/qcsrc/server/weapons/hitplot.qh b/qcsrc/server/weapons/hitplot.qh index 9bc8ff303..01c2e8cc9 100644 --- a/qcsrc/server/weapons/hitplot.qh +++ b/qcsrc/server/weapons/hitplot.qh @@ -1,5 +1,47 @@ +#ifndef HITPLOT_H +#define HITPLOT_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "common.qh" + #include "csqcprojectile.qh" +#endif + .float hitplotfh; void W_HitPlotAnalysis(entity player, vector screenforward, vector screenright, vector screenup); void W_HitPlotOpen(entity player); void W_HitPlotClose(entity player); +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index 8ec11925f..6a625700c 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -1,3 +1,18 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/weapons/weapons.qh" + #include "selection.qh" + #include "weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../defs.qh" +#endif + // switch between weapons void Send_WeaponComplain(entity e, float wpn, float type) { diff --git a/qcsrc/server/weapons/selection.qh b/qcsrc/server/weapons/selection.qh index 0c9aeefb3..f36d6d487 100644 --- a/qcsrc/server/weapons/selection.qh +++ b/qcsrc/server/weapons/selection.qh @@ -1,3 +1,45 @@ +#ifndef SELECTION_H +#define SELECTION_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "common.qh" + #include "csqcprojectile.qh" + #include "hitplot.qh" +#endif + // switch between weapons void Send_WeaponComplain(entity e, float wpn, float type); @@ -27,3 +69,4 @@ void W_PreviousWeapon(float list); // previously used if exists and has ammo, (second) best otherwise void W_LastWeapon(void); +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index f13b28608..6d21022d3 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -1,3 +1,19 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../common/weapons/weapons.qh" + #include "spawning.qh" + #include "weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../mutators/mutators_include.qh" +#endif + string W_Apply_Weaponreplace(string in) { float n = tokenize_console(in); diff --git a/qcsrc/server/weapons/spawning.qh b/qcsrc/server/weapons/spawning.qh index c6939e53a..50e95896f 100644 --- a/qcsrc/server/weapons/spawning.qh +++ b/qcsrc/server/weapons/spawning.qh @@ -1,3 +1,47 @@ +#ifndef SPAWNING_H +#define SPAWNING_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "common.qh" + #include "csqcprojectile.qh" + #include "hitplot.qh" + #include "selection.qh" +#endif + string W_Apply_Weaponreplace(string in); void weapon_defaultspawnfunc(float wpn); +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 411ab92be..743cb8d56 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -1,3 +1,21 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../common/util.qh" + #include "../../common/weapons/weapons.qh" + #include "throwing.qh" + #include "weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../mutators/mutators_include.qh" + #include "../../common/mapinfo.qh" +#endif + void thrown_wep_think() { self.nextthink = time; diff --git a/qcsrc/server/weapons/throwing.qh b/qcsrc/server/weapons/throwing.qh index c09a8f882..b5d9ca054 100644 --- a/qcsrc/server/weapons/throwing.qh +++ b/qcsrc/server/weapons/throwing.qh @@ -1,3 +1,47 @@ +#ifndef THROWING_H +#define THROWING_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "common.qh" + #include "csqcprojectile.qh" + #include "hitplot.qh" + #include "selection.qh" + #include "spawning.qh" +#endif + .float savenextthink; void thrown_wep_think(); @@ -10,3 +54,4 @@ float W_IsWeaponThrowable(float w); void W_ThrowWeapon(vector velo, vector delta, float doreduce); void SpawnThrownWeapon(vector org, float w); +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index c4dbe9f84..16937cf68 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -1,3 +1,18 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../warpzonelib/common.qh" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/weapons/weapons.qh" + #include "tracing.qh" + #include "../autocvars.qh" + #include "../defs.qh" + #include "../antilag.qh" +#endif + // this function calculates w_shotorg and w_shotdir based on the weapon model // offset, trueaim and antilag, and won't put w_shotorg inside a wall. // make sure you call makevectors first (FIXME?) diff --git a/qcsrc/server/weapons/tracing.qh b/qcsrc/server/weapons/tracing.qh index ce8511ba3..2f31f9443 100644 --- a/qcsrc/server/weapons/tracing.qh +++ b/qcsrc/server/weapons/tracing.qh @@ -1,3 +1,48 @@ +#ifndef TRACING_H +#define TRACING_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "common.qh" + #include "csqcprojectile.qh" + #include "hitplot.qh" + #include "selection.qh" + #include "spawning.qh" + #include "throwing.qh" +#endif + vector w_shotorg; vector w_shotdir; vector w_shotend; @@ -53,3 +98,4 @@ float fireBullet_trace_callback_eff; entity fireBullet_last_hit; void fireBullet_trace_callback(vector start, vector hit, vector end); void fireBullet(vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, float tracereffects); +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/weaponstats.qc b/qcsrc/server/weapons/weaponstats.qc index c0ccff0b9..744d035ee 100644 --- a/qcsrc/server/weapons/weaponstats.qc +++ b/qcsrc/server/weapons/weaponstats.qc @@ -1,3 +1,15 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../common/urllib.qh" + #include "../../common/weapons/weapons.qh" + #include "weaponstats.qh" + #include "../autocvars.qh" + #include "../defs.qh" +#endif + void WeaponStats_Init() { weaponstats_buffer = ((autocvar_sv_weaponstats_file != "") ? buf_create() : -1); diff --git a/qcsrc/server/weapons/weaponstats.qh b/qcsrc/server/weapons/weaponstats.qh index 08ae8dd0a..0dc79146f 100644 --- a/qcsrc/server/weapons/weaponstats.qh +++ b/qcsrc/server/weapons/weaponstats.qh @@ -1,3 +1,49 @@ +#ifndef WEAPONSTATS_H +#define WEAPONSTATS_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "common.qh" + #include "csqcprojectile.qh" + #include "hitplot.qh" + #include "selection.qh" + #include "spawning.qh" + #include "throwing.qh" + #include "tracing.qh" +#endif + float weaponstats_buffer; void WeaponStats_Init(); @@ -8,3 +54,4 @@ void WeaponStats_LogDamage(float awep, float abot, float vwep, float vbot, float void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot); #define WEAPONSTATS_GETINDEX(awep,abot,vwep,vbot) (((vwep) + (awep) * (WEP_LAST - WEP_FIRST + 1) - (WEP_FIRST + WEP_FIRST * (WEP_LAST - WEP_FIRST + 1))) * 4 + (abot) * 2 + (vbot)) +#endif \ No newline at end of file diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 07558aad1..f3c5306e6 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -1,3 +1,25 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/weapons/weapons.qh" + #include "weaponsystem.qh" + #include "../t_items.qh" + #include "../autocvars.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../mutators/mutators_include.qh" + #include "../command/common.qh" + #include "../../csqcmodellib/sv_model.qh" + #include "../round_handler.qh" +#endif + /* =========================================================================== diff --git a/qcsrc/server/weapons/weaponsystem.qh b/qcsrc/server/weapons/weaponsystem.qh index ddb1ee695..81e2d6089 100644 --- a/qcsrc/server/weapons/weaponsystem.qh +++ b/qcsrc/server/weapons/weaponsystem.qh @@ -1,6 +1,54 @@ +#ifndef WEAPONSYSTEM_H +#define WEAPONSYSTEM_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../common/util-pre.qh" + #include "../sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../../common/constants.qh" + #include "../../common/stats.qh" + #include "../../common/teams.qh" + #include "../../common/util.qh" + #include "../../common/nades.qh" + #include "../../common/buffs.qh" + #include "../../common/test.qh" + #include "../../common/counting.qh" + #include "../../common/urllib.qh" + #include "../../common/command/markup.qh" + #include "../../common/command/rpn.qh" + #include "../../common/command/generic.qh" + #include "../../common/command/shared_defs.qh" + #include "../../common/net_notice.qh" + #include "../../common/animdecide.qh" + #include "../../common/monsters/monsters.qh" + #include "../../common/monsters/sv_monsters.qh" + #include "../../common/monsters/spawn.qh" + #include "../../common/weapons/config.qh" + #include "../../common/weapons/weapons.qh" + #include "accuracy.qh" + #include "common.qh" + #include "csqcprojectile.qh" + #include "hitplot.qh" + #include "selection.qh" + #include "spawning.qh" + #include "throwing.qh" + #include "tracing.qh" + #include "weaponstats.qh" +#endif + float weaponswapping; float internalteam; void W_DropEvent(float event, entity player, float weapon_type, entity weapon_item); float forbidWeaponUse(); +#endif \ No newline at end of file diff --git a/qcsrc/warpzonelib/anglestransform.qc b/qcsrc/warpzonelib/anglestransform.qc index b4ff61d9e..bb10e564e 100644 --- a/qcsrc/warpzonelib/anglestransform.qc +++ b/qcsrc/warpzonelib/anglestransform.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "anglestransform.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "anglestransform.qh" +#endif + #ifdef POSITIVE_PITCH_IS_DOWN vector fixedvectoangles(vector a) { diff --git a/qcsrc/warpzonelib/anglestransform.qh b/qcsrc/warpzonelib/anglestransform.qh index b1c8a85e9..1e2e671e1 100644 --- a/qcsrc/warpzonelib/anglestransform.qh +++ b/qcsrc/warpzonelib/anglestransform.qh @@ -1,3 +1,24 @@ +#ifndef ANGLETRANSFORM_H +#define ANGLETRANSFORM_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" +#endif + #define POSITIVE_PITCH_IS_DOWN #ifdef POSITIVE_PITCH_IS_DOWN @@ -30,3 +51,4 @@ vector AnglesTransform_ToVAngles(vector v); // transformed = original * transform + postshift vector AnglesTransform_Multiply_GetPostShift(vector sf0, vector st0, vector t1, vector st1); vector AnglesTransform_PrePostShift_GetPostShift(vector sf, vector t, vector st); +#endif \ No newline at end of file diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index 85aba53fc..7b9ac0c09 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "common.qh" + #include "client.qh" + #include "../client/autocvars.qh" + #include "../csqcmodellib/cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + void WarpZone_Fade_PreDraw() { vector org; diff --git a/qcsrc/warpzonelib/client.qh b/qcsrc/warpzonelib/client.qh index c0a4ca0f0..f8f13bfcf 100644 --- a/qcsrc/warpzonelib/client.qh +++ b/qcsrc/warpzonelib/client.qh @@ -1,3 +1,22 @@ +#ifndef CLIENT_H +#define CLIENT_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "anglestransform.qh" + #include "mathlib.qh" + #include "common.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif + void WarpZone_Read(float bIsNewEntity); void WarpZone_Camera_Read(float bIsNewEntity); void WarpZone_Teleported_Read(float bIsNewEntity); @@ -10,3 +29,4 @@ void WarpZone_Shutdown(); vector warpzone_save_view_origin; vector warpzone_save_view_angles; +#endif \ No newline at end of file diff --git a/qcsrc/warpzonelib/common.qc b/qcsrc/warpzonelib/common.qc index 146fdfb83..683b3e3b9 100644 --- a/qcsrc/warpzonelib/common.qc +++ b/qcsrc/warpzonelib/common.qc @@ -1,3 +1,16 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "common.qh" + #include "../server/t_items.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "common.qh" + #include "../common/weapons/weapons.qh" +#endif + void WarpZone_Accumulator_Clear(entity acc) { acc.warpzone_transform = '0 0 0'; diff --git a/qcsrc/warpzonelib/common.qh b/qcsrc/warpzonelib/common.qh index c79ee95d6..6c71ce91a 100644 --- a/qcsrc/warpzonelib/common.qh +++ b/qcsrc/warpzonelib/common.qh @@ -1,3 +1,28 @@ +#ifndef WARPZONELIB_COMMON_H +#define WARPZONELIB_COMMON_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "anglestransform.qh" + #include "mathlib.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "anglestransform.qh" + #include "mathlib.qh" +#endif + // uncomment this if your mod uses the roll angle in fixangle // #define KEEP_ROLL @@ -100,3 +125,4 @@ entity WarpZone_RefSys_SpawnSameRefSys(entity me); // spawn().R = me.R #ifndef BITXOR_ASSIGN # define BITXOR_ASSIGN(a,b) ((a) = ((a) | (b)) - ((a) & (b))) #endif +#endif \ No newline at end of file diff --git a/qcsrc/warpzonelib/mathlib.qc b/qcsrc/warpzonelib/mathlib.qc index a4421e85f..5ec65def5 100644 --- a/qcsrc/warpzonelib/mathlib.qc +++ b/qcsrc/warpzonelib/mathlib.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qc" + #include "mathlib.qh" +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "mathlib.qh" +#endif + int fpclassify(float x) { if(isnan(x)) diff --git a/qcsrc/warpzonelib/mathlib.qh b/qcsrc/warpzonelib/mathlib.qh index 8b1569221..2de42c605 100644 --- a/qcsrc/warpzonelib/mathlib.qh +++ b/qcsrc/warpzonelib/mathlib.qh @@ -1,3 +1,32 @@ +#ifndef MATHLIB_H +#define MATHLIB_H + +#if defined(CSQC) + #include "../common/util-pre.qh" + #include "../client/sys-pre.qh" + #include "../dpdefs/csprogsdefs.qc" + #include "../client/sys-post.qh" + #include "../client/Defs.qc" + #include "../dpdefs/keycodes.qc" + #include "../common/constants.qh" + #include "../common/stats.qh" + #include "anglestransform.qh" +#elif defined(MENUQC) + #include "../common/util-pre.qh" + #include "../menu/sys-pre.qh" + #include "../dpdefs/menudefs.qc" + #include "../dpdefs/keycodes.qc" + #include "../menu/sys-post.qh" + #include "../menu/config.qh" +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "anglestransform.qh" +#endif + // // The commented-out functions need no implementation because DarkPlaces offers @@ -98,3 +127,4 @@ const float M_2_PI = 0.63661977236758134308; /* 2/pi */ const float M_2_SQRTPI = 1.12837916709551257390; /* 2/sqrt(pi) */ const float M_SQRT2 = 1.41421356237309504880; /* sqrt(2) */ const float M_SQRT1_2 = 0.70710678118654752440; /* 1/sqrt(2) */ +#endif \ No newline at end of file diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index 3f14b9097..06af2fdfc 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -1,3 +1,17 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "common.qh" + #include "server.qh" + #include "../common/constants.qh" + #include "../common/util.qh" + #include "../server/constants.qh" + #include "../server/defs.qh" + #include "../server/command/common.qh" +#endif + #ifdef WARPZONELIB_KEEPDEBUG #define WARPZONELIB_REMOVEHACK #endif diff --git a/qcsrc/warpzonelib/server.qh b/qcsrc/warpzonelib/server.qh index 3c09ea770..5cf781d58 100644 --- a/qcsrc/warpzonelib/server.qh +++ b/qcsrc/warpzonelib/server.qh @@ -1,3 +1,20 @@ +#ifndef SERVER_H +#define SERVER_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "anglestransform.qh" + #include "mathlib.qh" + #include "common.qh" + #include "util_server.qh" +#endif + void WarpZone_StartFrame(); float WarpZone_Projectile_Touch(); @@ -12,3 +29,4 @@ float WarpZone_Projectile_Touch_ImpactFilter_Callback(); void WarpZone_PlayerPhysics_FixVAngle(void); void WarpZone_PostInitialize_Callback(void); +#endif \ No newline at end of file diff --git a/qcsrc/warpzonelib/util_server.qc b/qcsrc/warpzonelib/util_server.qc index 8beea9c76..10a7a2ffb 100644 --- a/qcsrc/warpzonelib/util_server.qc +++ b/qcsrc/warpzonelib/util_server.qc @@ -1,3 +1,13 @@ +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "common.qh" + #include "util_server.qh" + #include "../csqcmodellib/sv_model.qh" +#endif + void WarpZoneLib_MoveOutOfSolid_Expand(entity e, vector by) { float eps = 0.0625; diff --git a/qcsrc/warpzonelib/util_server.qh b/qcsrc/warpzonelib/util_server.qh index cd5af7fb4..9e29fe025 100644 --- a/qcsrc/warpzonelib/util_server.qh +++ b/qcsrc/warpzonelib/util_server.qh @@ -1,3 +1,20 @@ +#ifndef UTIL_SERVER_H +#define UTIL_SERVER_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../common/util-pre.qh" + #include "../server/sys-pre.qh" + #include "../dpdefs/progsdefs.qc" + #include "../dpdefs/dpextensions.qc" + #include "../server/sys-post.qh" + #include "anglestransform.qh" + #include "mathlib.qh" + #include "common.qh" +#endif + float WarpZoneLib_MoveOutOfSolid(entity e); float WarpZoneLib_ExactTrigger_Touch(); void WarpZoneLib_ExactTrigger_Init(); +#endif \ No newline at end of file -- 2.39.2