From a0b626ee78db909c214cc0fc7e829f8a8379704f Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 18 Oct 2015 15:21:03 +1100 Subject: [PATCH] Mutators: combine headers --- qcsrc/client/hud.qc | 3 +- qcsrc/client/progs.inc | 6 +- qcsrc/common/monsters/sv_monsters.qc | 2 +- qcsrc/common/notifications.qc | 2 +- qcsrc/common/weapons/all.qc | 2 +- qcsrc/lib/csqcmodel/cl_player.qc | 1 + qcsrc/server/bot/aim.qc | 2 +- qcsrc/server/bot/bot.qc | 2 +- qcsrc/server/cheats.qc | 2 +- qcsrc/server/command/cmd.qc | 2 +- qcsrc/server/command/sv_cmd.qc | 2 +- qcsrc/server/command/vote.qc | 2 +- qcsrc/server/ent_cs.qc | 2 - qcsrc/server/g_damage.qc | 2 +- qcsrc/server/g_damage.qh | 2 +- qcsrc/server/g_world.qc | 2 +- qcsrc/server/miscfunctions.qc | 2 +- qcsrc/server/miscfunctions.qh | 1 - qcsrc/server/mutators/all.inc | 41 ++++ .../mutators/{mutators_include.qc => all.qc} | 49 +---- qcsrc/server/mutators/all.qh | 6 + qcsrc/server/mutators/gamemode.qh | 2 - qcsrc/server/mutators/gamemode_assault.qh | 33 ---- qcsrc/server/mutators/gamemode_ca.qh | 5 - qcsrc/server/mutators/gamemode_ctf.qh | 168 ----------------- qcsrc/server/mutators/gamemode_cts.qh | 10 - qcsrc/server/mutators/gamemode_domination.qh | 32 ---- qcsrc/server/mutators/gamemode_freezetag.qh | 11 -- qcsrc/server/mutators/gamemode_invasion.qh | 18 -- qcsrc/server/mutators/gamemode_keepaway.qh | 17 -- qcsrc/server/mutators/gamemode_keyhunt.qh | 20 -- qcsrc/server/mutators/gamemode_lms.qh | 12 -- qcsrc/server/mutators/gamemode_onslaught.qh | 93 --------- qcsrc/server/mutators/gamemode_race.qh | 12 -- qcsrc/server/mutators/mutator.qh | 1 - .../{ => mutator}/gamemode_assault.qc | 37 +++- .../mutators/{ => mutator}/gamemode_ca.qc | 9 +- .../mutators/{ => mutator}/gamemode_ctf.qc | 176 +++++++++++++++++- .../mutators/{ => mutator}/gamemode_cts.qc | 15 +- .../{ => mutator}/gamemode_deathmatch.qc | 4 +- .../{ => mutator}/gamemode_domination.qc | 41 +++- .../{ => mutator}/gamemode_freezetag.qc | 15 +- .../{ => mutator}/gamemode_invasion.qc | 28 ++- .../{ => mutator}/gamemode_keepaway.qc | 19 +- .../{ => mutator}/gamemode_keyhunt.qc | 23 ++- .../mutators/{ => mutator}/gamemode_lms.qc | 21 ++- .../{ => mutator}/gamemode_onslaught.qc | 104 ++++++++++- .../mutators/{ => mutator}/gamemode_race.qc | 18 +- .../mutators/{ => mutator}/gamemode_tdm.qc | 4 +- .../{ => mutator}/mutator_bloodloss.qc | 5 +- .../{ => mutator}/mutator_breakablehook.qc | 6 +- .../mutators/{ => mutator}/mutator_buffs.qc | 44 ++++- .../{ => mutator}/mutator_campcheck.qc | 7 +- .../mutators/{ => mutator}/mutator_dodging.qc | 17 +- .../mutators/{ => mutator}/mutator_hook.qc | 2 + .../{ => mutator}/mutator_invincibleproj.qc | 5 +- .../{ => mutator}/mutator_melee_only.qc | 5 +- .../mutators/{ => mutator}/mutator_midair.qc | 5 +- .../{ => mutator}/mutator_multijump.qc | 7 +- .../mutators/{ => mutator}/mutator_nades.qc | 48 +++-- .../{ => mutator}/mutator_new_toys.qc | 5 +- .../mutators/{ => mutator}/mutator_nix.qc | 5 +- .../{ => mutator}/mutator_overkill.qc | 16 +- .../{ => mutator}/mutator_physical_items.qc | 5 +- .../mutators/{ => mutator}/mutator_pinata.qc | 5 +- .../{ => mutator}/mutator_random_gravity.qc | 5 +- .../{ => mutator}/mutator_rocketflying.qc | 5 +- .../{ => mutator}/mutator_rocketminsta.qc | 6 +- .../mutator_spawn_near_teammate.qc | 5 +- .../{ => mutator}/mutator_superspec.qc | 4 +- .../{ => mutator}/mutator_touchexplode.qc | 4 +- .../mutators/{ => mutator}/mutator_vampire.qc | 4 +- .../{ => mutator}/mutator_vampirehook.qc | 2 + .../server/mutators/{ => mutator}/sandbox.qc | 4 +- qcsrc/server/mutators/mutator_buffs.qh | 32 ---- qcsrc/server/mutators/mutator_dodging.qh | 11 -- qcsrc/server/mutators/mutator_nades.qh | 28 --- qcsrc/server/mutators/mutator_overkill.qh | 18 -- qcsrc/server/mutators/mutators_include.qh | 22 --- qcsrc/server/portals.qc | 2 +- qcsrc/server/progs.inc | 2 +- qcsrc/server/scores.qc | 2 +- qcsrc/server/spawnpoints.qc | 2 +- qcsrc/server/sv_main.qc | 2 +- qcsrc/server/t_items.qc | 2 +- qcsrc/server/teamplay.qc | 2 +- qcsrc/server/weapons/accuracy.qc | 2 +- qcsrc/server/weapons/spawning.qc | 2 +- qcsrc/server/weapons/throwing.qc | 2 +- qcsrc/server/weapons/weaponsystem.qc | 2 +- 90 files changed, 707 insertions(+), 735 deletions(-) create mode 100644 qcsrc/server/mutators/all.inc rename qcsrc/server/mutators/{mutators_include.qc => all.qc} (67%) create mode 100644 qcsrc/server/mutators/all.qh delete mode 100644 qcsrc/server/mutators/gamemode_assault.qh delete mode 100644 qcsrc/server/mutators/gamemode_ca.qh delete mode 100644 qcsrc/server/mutators/gamemode_ctf.qh delete mode 100644 qcsrc/server/mutators/gamemode_cts.qh delete mode 100644 qcsrc/server/mutators/gamemode_domination.qh delete mode 100644 qcsrc/server/mutators/gamemode_freezetag.qh delete mode 100644 qcsrc/server/mutators/gamemode_invasion.qh delete mode 100644 qcsrc/server/mutators/gamemode_keepaway.qh delete mode 100644 qcsrc/server/mutators/gamemode_keyhunt.qh delete mode 100644 qcsrc/server/mutators/gamemode_lms.qh delete mode 100644 qcsrc/server/mutators/gamemode_onslaught.qh delete mode 100644 qcsrc/server/mutators/gamemode_race.qh rename qcsrc/server/mutators/{ => mutator}/gamemode_assault.qc (94%) rename qcsrc/server/mutators/{ => mutator}/gamemode_ca.qc (98%) rename qcsrc/server/mutators/{ => mutator}/gamemode_ctf.qc (93%) rename qcsrc/server/mutators/{ => mutator}/gamemode_cts.qc (97%) rename qcsrc/server/mutators/{ => mutator}/gamemode_deathmatch.qc (95%) rename qcsrc/server/mutators/{ => mutator}/gamemode_domination.qc (96%) rename qcsrc/server/mutators/{ => mutator}/gamemode_freezetag.qc (98%) rename qcsrc/server/mutators/{ => mutator}/gamemode_invasion.qc (96%) rename qcsrc/server/mutators/{ => mutator}/gamemode_keepaway.qc (97%) rename qcsrc/server/mutators/{ => mutator}/gamemode_keyhunt.qc (98%) rename qcsrc/server/mutators/{ => mutator}/gamemode_lms.qc (95%) rename qcsrc/server/mutators/{ => mutator}/gamemode_onslaught.qc (96%) rename qcsrc/server/mutators/{ => mutator}/gamemode_race.qc (97%) rename qcsrc/server/mutators/{ => mutator}/gamemode_tdm.qc (98%) rename qcsrc/server/mutators/{ => mutator}/mutator_bloodloss.qc (96%) rename qcsrc/server/mutators/{ => mutator}/mutator_breakablehook.qc (87%) rename qcsrc/server/mutators/{ => mutator}/mutator_buffs.qc (96%) rename qcsrc/server/mutators/{ => mutator}/mutator_campcheck.qc (98%) rename qcsrc/server/mutators/{ => mutator}/mutator_dodging.qc (96%) rename qcsrc/server/mutators/{ => mutator}/mutator_hook.qc (97%) rename qcsrc/server/mutators/{ => mutator}/mutator_invincibleproj.qc (94%) rename qcsrc/server/mutators/{ => mutator}/mutator_melee_only.qc (96%) rename qcsrc/server/mutators/{ => mutator}/mutator_midair.qc (97%) rename qcsrc/server/mutators/{ => mutator}/mutator_multijump.qc (97%) rename qcsrc/server/mutators/{ => mutator}/mutator_nades.qc (97%) rename qcsrc/server/mutators/{ => mutator}/mutator_new_toys.qc (99%) rename qcsrc/server/mutators/{ => mutator}/mutator_nix.qc (99%) rename qcsrc/server/mutators/{ => mutator}/mutator_overkill.qc (97%) rename qcsrc/server/mutators/{ => mutator}/mutator_physical_items.qc (99%) rename qcsrc/server/mutators/{ => mutator}/mutator_pinata.qc (95%) rename qcsrc/server/mutators/{ => mutator}/mutator_random_gravity.qc (97%) rename qcsrc/server/mutators/{ => mutator}/mutator_rocketflying.qc (94%) rename qcsrc/server/mutators/{ => mutator}/mutator_rocketminsta.qc (88%) rename qcsrc/server/mutators/{ => mutator}/mutator_spawn_near_teammate.qc (99%) rename qcsrc/server/mutators/{ => mutator}/mutator_superspec.qc (99%) rename qcsrc/server/mutators/{ => mutator}/mutator_touchexplode.qc (97%) rename qcsrc/server/mutators/{ => mutator}/mutator_vampire.qc (95%) rename qcsrc/server/mutators/{ => mutator}/mutator_vampirehook.qc (97%) rename qcsrc/server/mutators/{ => mutator}/sandbox.qc (99%) delete mode 100644 qcsrc/server/mutators/mutator_buffs.qh delete mode 100644 qcsrc/server/mutators/mutator_dodging.qh delete mode 100644 qcsrc/server/mutators/mutator_nades.qh delete mode 100644 qcsrc/server/mutators/mutator_overkill.qh delete mode 100644 qcsrc/server/mutators/mutators_include.qh diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 90be935df..042536aa7 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -13,7 +13,8 @@ #include "../common/nades/all.qh" #include "../common/stats.qh" #include "../lib/csqcmodel/cl_player.qh" -#include "../server/mutators/gamemode_ctf.qh" +// TODO: remove +#include "../server/mutators/mutator/gamemode_ctf.qc" /* diff --git a/qcsrc/client/progs.inc b/qcsrc/client/progs.inc index 0c3884f67..5c110e2b8 100644 --- a/qcsrc/client/progs.inc +++ b/qcsrc/client/progs.inc @@ -67,7 +67,11 @@ #include "../lib/csqcmodel/cl_player.qc" #include "../lib/csqcmodel/interpolate.qc" -#include "../server/mutators/mutator_multijump.qc" +// TODO: move to common +#include "../server/mutators/mutator/mutator_multijump.qc" +#define IMPLEMENTATION +#include "../server/mutators/mutator/mutator_multijump.qc" +#undef IMPLEMENTATION #include "../lib/warpzone/anglestransform.qc" #include "../lib/warpzone/client.qc" diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index bf74dcea0..ac642fd3c 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -11,7 +11,7 @@ #include "../../server/autocvars.qh" #include "../../server/defs.qh" #include "../deathtypes/all.qh" - #include "../../server/mutators/mutators_include.qh" + #include "../../server/mutators/all.qh" #include "../../server/steerlib.qh" #include "../turrets/sv_turrets.qh" #include "../turrets/util.qh" diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 600ddaa1b..811e7007c 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -7,7 +7,7 @@ #include "../server/constants.qh" #include "../server/defs.qh" #include "notifications.qh" - #include "../server/mutators/mutators_include.qh" + #include "../server/mutators/all.qh" #endif // ================================================ diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index e603cb16c..ffbc0712d 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -39,7 +39,7 @@ #include "../../server/defs.qh" #include "../notifications.qh" #include "../deathtypes/all.qh" - #include "../../server/mutators/mutators_include.qh" + #include "../../server/mutators/all.qh" #include "../mapinfo.qh" #include "../../server/command/common.qh" #include "../../lib/csqcmodel/sv_model.qh" diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index ae4e55ac1..c39ee8797 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -28,6 +28,7 @@ #include "../../client/defs.qh" #include "../../client/main.qh" #include "../../common/constants.qh" +#include "../../common/physics.qh" #include "../../common/stats.qh" #include "../../common/triggers/trigger/viewloc.qh" #include "../../common/util.qh" diff --git a/qcsrc/server/bot/aim.qc b/qcsrc/server/bot/aim.qc index 07ea9091d..50e1d456f 100644 --- a/qcsrc/server/bot/aim.qc +++ b/qcsrc/server/bot/aim.qc @@ -4,7 +4,7 @@ #include "../weapons/weaponsystem.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" // traces multiple trajectories to find one that will impact the target // 'end' vector is the place it aims for, diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 95262bcfa..fb7662328 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -19,7 +19,7 @@ #include "../race.qh" #include "../t_items.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" #include "../weapons/accuracy.qh" diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 64c7cec19..8f34a7798 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -4,7 +4,7 @@ #include "race.qh" #include "../common/triggers/teleporters.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "weapons/tracing.qh" diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index dbb9e1a48..e4eee6983 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -12,7 +12,7 @@ #include "../scores.qh" #include "../teamplay.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" #ifdef SVQC #include "../../common/vehicles/all.qh" diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 21255e5dd..cde2d6c45 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -20,7 +20,7 @@ #include "../bot/navigation.qh" #include "../bot/scripting.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" #include "../../common/constants.qh" #include "../../common/mapinfo.qh" diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 0fca5d226..77c0a3560 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -9,7 +9,7 @@ #include "../round_handler.qh" #include "../scores.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" #include "../../common/constants.qh" #include "../../common/mapinfo.qh" diff --git a/qcsrc/server/ent_cs.qc b/qcsrc/server/ent_cs.qc index 548c60429..cf275c0f8 100644 --- a/qcsrc/server/ent_cs.qc +++ b/qcsrc/server/ent_cs.qc @@ -1,7 +1,5 @@ #include "ent_cs.qh" -#include "mutators/gamemode_ca.qh" - float entcs_customize() { SELFPARAM(); diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 6a80f7e5e..8354007aa 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -2,7 +2,7 @@ #include "bot/bot.qh" #include "g_hook.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "scores.qh" #include "spawnpoints.qh" #include "t_items.qh" diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index 62a74be22..cee65e164 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -18,7 +18,7 @@ #include "defs.qh" #include "../common/notifications.qh" #include "../common/deathtypes/all.qh" - #include "mutators/mutators_include.qh" + #include "mutators/all.qh" #include "../common/turrets/sv_turrets.qh" #include "../common/vehicles/all.qh" #include "../lib/csqcmodel/sv_model.qh" diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index e121e6f96..06913e06a 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -13,7 +13,7 @@ #include "g_hook.qh" #include "ipban.qh" #include "mapvoting.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "race.qh" #include "scores.qh" #include "teamplay.qh" diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index c01aca479..95133eb2e 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -4,7 +4,7 @@ #include "constants.qh" #include "g_hook.qh" #include "ipban.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "t_items.qh" #include "weapons/accuracy.qh" #include "weapons/csqcprojectile.qh" diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 1c9dfe689..050da2bc0 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -4,7 +4,6 @@ #include "t_items.qh" #include "mutators/events.qh" -#include "mutators/gamemode_race.qh" #include "../common/constants.qh" #include "../common/mapinfo.qh" diff --git a/qcsrc/server/mutators/all.inc b/qcsrc/server/mutators/all.inc new file mode 100644 index 000000000..f67ceaee6 --- /dev/null +++ b/qcsrc/server/mutators/all.inc @@ -0,0 +1,41 @@ +#include "mutator/gamemode_assault.qc" +#include "mutator/gamemode_ca.qc" +#include "mutator/gamemode_ctf.qc" +#include "mutator/gamemode_cts.qc" +#include "mutator/gamemode_deathmatch.qc" +#include "mutator/gamemode_domination.qc" +#include "mutator/gamemode_freezetag.qc" +#include "mutator/gamemode_invasion.qc" +#include "mutator/gamemode_keepaway.qc" +#include "mutator/gamemode_keyhunt.qc" +#include "mutator/gamemode_lms.qc" +#include "mutator/gamemode_onslaught.qc" +#include "mutator/gamemode_race.qc" +#include "mutator/gamemode_tdm.qc" + +#include "mutator/mutator_bloodloss.qc" +#include "mutator/mutator_breakablehook.qc" +#include "mutator/mutator_buffs.qc" +#include "mutator/mutator_campcheck.qc" +#include "mutator/mutator_dodging.qc" +#include "mutator/mutator_hook.qc" +#include "mutator/mutator_invincibleproj.qc" +#include "mutator/mutator_melee_only.qc" +#include "mutator/mutator_midair.qc" +#include "mutator/mutator_multijump.qc" +#include "mutator/mutator_nades.qc" +#include "mutator/mutator_new_toys.qc" +#include "mutator/mutator_nix.qc" +#include "mutator/mutator_overkill.qc" +#include "mutator/mutator_physical_items.qc" +#include "mutator/mutator_pinata.qc" +#include "mutator/mutator_random_gravity.qc" +#include "mutator/mutator_rocketflying.qc" +#include "mutator/mutator_rocketminsta.qc" +#include "mutator/mutator_spawn_near_teammate.qc" +#include "mutator/mutator_superspec.qc" +#include "mutator/mutator_touchexplode.qc" +#include "mutator/mutator_vampirehook.qc" +#include "mutator/mutator_vampire.qc" + +#include "mutator/sandbox.qc" diff --git a/qcsrc/server/mutators/mutators_include.qc b/qcsrc/server/mutators/all.qc similarity index 67% rename from qcsrc/server/mutators/mutators_include.qc rename to qcsrc/server/mutators/all.qc index d2ea4688f..7ad372629 100644 --- a/qcsrc/server/mutators/mutators_include.qc +++ b/qcsrc/server/mutators/all.qc @@ -38,7 +38,7 @@ #include "../defs.qh" #include "../../common/notifications.qh" #include "../../common/deathtypes/all.qh" - #include "mutators_include.qh" + #include "all.qh" #include "../../common/turrets/sv_turrets.qh" #include "../../common/vehicles/all.qh" #include "../campaign.qh" @@ -72,46 +72,11 @@ #include "../../common/vehicles/all.qh" #endif -#include "../../common/mutators/base.qh" +#include "all.qh" -#include "gamemode_assault.qc" -#include "gamemode_ca.qc" -#include "gamemode_ctf.qc" -#include "gamemode_cts.qc" -#include "gamemode_deathmatch.qc" -#include "gamemode_domination.qc" -#include "gamemode_freezetag.qc" -#include "gamemode_invasion.qc" -#include "gamemode_keepaway.qc" -#include "gamemode_keyhunt.qc" -#include "gamemode_lms.qc" -#include "gamemode_onslaught.qc" -#include "gamemode_race.qc" -#include "gamemode_tdm.qc" +#include "mutator.qh" +#include "gamemode.qh" -#include "mutator_bloodloss.qc" -#include "mutator_breakablehook.qc" -#include "mutator_buffs.qc" -#include "mutator_campcheck.qc" -#include "mutator_dodging.qc" -#include "mutator_hook.qc" -#include "mutator_invincibleproj.qc" -#include "mutator_melee_only.qc" -#include "mutator_midair.qc" -#include "mutator_multijump.qc" -#include "mutator_nades.qc" -#include "mutator_new_toys.qc" -#include "mutator_nix.qc" -#include "mutator_overkill.qc" -#include "mutator_physical_items.qc" -#include "mutator_pinata.qc" -#include "mutator_random_gravity.qc" -#include "mutator_rocketflying.qc" -#include "mutator_rocketminsta.qc" -#include "mutator_spawn_near_teammate.qc" -#include "mutator_superspec.qc" -#include "mutator_touchexplode.qc" -#include "mutator_vampirehook.qc" -#include "mutator_vampire.qc" - -#include "sandbox.qc" +#define IMPLEMENTATION +#include "all.inc" +#undef IMPLEMENTATION diff --git a/qcsrc/server/mutators/all.qh b/qcsrc/server/mutators/all.qh new file mode 100644 index 000000000..ad4a5b9f5 --- /dev/null +++ b/qcsrc/server/mutators/all.qh @@ -0,0 +1,6 @@ +#ifndef SERVER_MUTATORS_H +#define SERVER_MUTATORS_H + +#include "all.inc" + +#endif diff --git a/qcsrc/server/mutators/gamemode.qh b/qcsrc/server/mutators/gamemode.qh index 5e5675f40..5e2c46357 100644 --- a/qcsrc/server/mutators/gamemode.qh +++ b/qcsrc/server/mutators/gamemode.qh @@ -1,8 +1,6 @@ #ifndef GAMEMODE_H #define GAMEMODE_H -#include "mutator_nades.qh" - #include "../cl_client.qh" #include "../cl_player.qh" #include "../cl_impulse.qh" diff --git a/qcsrc/server/mutators/gamemode_assault.qh b/qcsrc/server/mutators/gamemode_assault.qh deleted file mode 100644 index 1266492ca..000000000 --- a/qcsrc/server/mutators/gamemode_assault.qh +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef GAMEMODE_ASSAULT_H -#define GAMEMODE_ASSAULT_H -// sprites -.entity assault_decreaser; -.entity assault_sprite; - -// legacy bot defs -const int HAVOCBOT_AST_ROLE_NONE = 0; -const int HAVOCBOT_AST_ROLE_DEFENSE = 2; -const int HAVOCBOT_AST_ROLE_OFFENSE = 4; - -.int havocbot_role_flags; -.float havocbot_attack_time; - -.void() havocbot_role; -.void() havocbot_previous_role; - -void() havocbot_role_ast_defense; -void() havocbot_role_ast_offense; -.entity havocbot_ast_target; - -void(entity bot) havocbot_ast_reset_role; - -void(float ratingscale, vector org, float sradius) havocbot_goalrating_items; -void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplayers; - -// scoreboard stuff -const float ST_ASSAULT_OBJECTIVES = 1; -const float SP_ASSAULT_OBJECTIVES = 4; - -// predefined spawnfuncs -void target_objective_decrease_activate(); -#endif diff --git a/qcsrc/server/mutators/gamemode_ca.qh b/qcsrc/server/mutators/gamemode_ca.qh deleted file mode 100644 index bf6686d73..000000000 --- a/qcsrc/server/mutators/gamemode_ca.qh +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef GAMEMODE_CA_H -#define GAMEMODE_CA_H -// should be removed in the future, as other code should not have to care -.float caplayer; // 0.5 if scheduled to join the next round -#endif diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh deleted file mode 100644 index 2a8b4818c..000000000 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ /dev/null @@ -1,168 +0,0 @@ -#ifndef GAMEMODE_CTF_H -#define GAMEMODE_CTF_H -// these are needed since mutators are compiled last - -#ifdef SVQC -// used in cheats.qc -void ctf_RespawnFlag(entity flag); - -// score rule declarations -const int ST_CTF_CAPS = 1; -const int SP_CTF_CAPS = 4; -const int SP_CTF_CAPTIME = 5; -const int SP_CTF_PICKUPS = 6; -const int SP_CTF_DROPS = 7; -const int SP_CTF_FCKILLS = 8; -const int SP_CTF_RETURNS = 9; - -// flag constants // for most of these, there is just one question to be asked: WHYYYYY? -#define FLAG_MIN (PL_MIN_CONST + '0 0 -13') -#define FLAG_MAX (PL_MAX_CONST + '0 0 -13') - -const float FLAG_SCALE = 0.6; - -const float FLAG_THINKRATE = 0.2; -const float FLAG_TOUCHRATE = 0.5; -const float WPFE_THINKRATE = 0.5; - -const vector FLAG_DROP_OFFSET = ('0 0 32'); -const vector FLAG_CARRY_OFFSET = ('-16 0 8'); -#define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13)) -const vector FLAG_WAYPOINT_OFFSET = ('0 0 64'); -const vector FLAG_FLOAT_OFFSET = ('0 0 32'); -const vector FLAG_PASS_ARC_OFFSET = ('0 0 -10'); - -const vector VEHICLE_FLAG_OFFSET = ('0 0 96'); -const float VEHICLE_FLAG_SCALE = 1.0; - -// waypoint colors -#define WPCOLOR_ENEMYFC(t) ((t) ? colormapPaletteColor(t - 1, false) * 0.75 : '1 1 1') -#define WPCOLOR_FLAGCARRIER(t) (WP_FlagCarrier.m_color) -#define WPCOLOR_DROPPEDFLAG(t) ((t) ? ('0.25 0.25 0.25' + colormapPaletteColor(t - 1, false)) * 0.5 : '1 1 1') - -// sounds -#define snd_flag_taken noise -#define snd_flag_returned noise1 -#define snd_flag_capture noise2 -#define snd_flag_respawn noise3 -.string snd_flag_dropped; -.string snd_flag_touch; -.string snd_flag_pass; - -// effects -.string toucheffect; -.string passeffect; -.string capeffect; - -// list of flags on the map -entity ctf_worldflaglist; -.entity ctf_worldflagnext; -.entity ctf_staleflagnext; - -// waypoint sprites -.entity bot_basewaypoint; // flag waypointsprite -.entity wps_helpme; -.entity wps_flagbase; -.entity wps_flagcarrier; -.entity wps_flagdropped; -.entity wps_enemyflagcarrier; -.float wps_helpme_time; -bool wpforenemy_announced; -float wpforenemy_nextthink; - -// statuses -const int FLAG_BASE = 1; -const int FLAG_DROPPED = 2; -const int FLAG_CARRY = 3; -const int FLAG_PASSING = 4; - -const int DROP_NORMAL = 1; -const int DROP_THROW = 2; -const int DROP_PASS = 3; -const int DROP_RESET = 4; - -const int PICKUP_BASE = 1; -const int PICKUP_DROPPED = 2; - -const int CAPTURE_NORMAL = 1; -const int CAPTURE_DROPPED = 2; - -const int RETURN_TIMEOUT = 1; -const int RETURN_DROPPED = 2; -const int RETURN_DAMAGE = 3; -const int RETURN_SPEEDRUN = 4; -const int RETURN_NEEDKILL = 5; - -// flag properties -#define ctf_spawnorigin dropped_origin -bool ctf_stalemate; // indicates that a stalemate is active -float ctf_captimerecord; // record time for capturing the flag -.float ctf_pickuptime; -.float ctf_droptime; -.int ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally) -.entity ctf_dropper; // don't allow spam of dropping the flag -.int max_flag_health; -.float next_take_time; -.bool ctf_flagdamaged; -int ctf_teams; - -// passing/throwing properties -.float pass_distance; -.entity pass_sender; -.entity pass_target; -.float throw_antispam; -.float throw_prevtime; -.int throw_count; - -// CaptureShield: If the player is too bad to be allowed to capture, shield them from taking the flag. -.bool ctf_captureshielded; // set to 1 if the player is too bad to be allowed to capture -float ctf_captureshield_min_negscore; // punish at -20 points -float ctf_captureshield_max_ratio; // punish at most 30% of each team -float ctf_captureshield_force; // push force of the shield - -// 1 flag ctf -bool ctf_oneflag; // indicates whether or not a neutral flag has been found - -// bot player logic -const int HAVOCBOT_CTF_ROLE_NONE = 0; -const int HAVOCBOT_CTF_ROLE_DEFENSE = 2; -const int HAVOCBOT_CTF_ROLE_MIDDLE = 4; -const int HAVOCBOT_CTF_ROLE_OFFENSE = 8; -const int HAVOCBOT_CTF_ROLE_CARRIER = 16; -const int HAVOCBOT_CTF_ROLE_RETRIEVER = 32; -const int HAVOCBOT_CTF_ROLE_ESCORT = 64; - -.bool havocbot_cantfindflag; - -vector havocbot_ctf_middlepoint; -float havocbot_ctf_middlepoint_radius; - -void havocbot_role_ctf_setrole(entity bot, int role); - -// team checking -#define CTF_SAMETEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? DIFF_TEAM(a,b) : SAME_TEAM(a,b)) -#define CTF_DIFFTEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? SAME_TEAM(a,b) : DIFF_TEAM(a,b)) - -// networked flag statuses -.int ctf_flagstatus; -#endif - -const int CTF_RED_FLAG_TAKEN = 1; -const int CTF_RED_FLAG_LOST = 2; -const int CTF_RED_FLAG_CARRYING = 3; -const int CTF_BLUE_FLAG_TAKEN = 4; -const int CTF_BLUE_FLAG_LOST = 8; -const int CTF_BLUE_FLAG_CARRYING = 12; -const int CTF_YELLOW_FLAG_TAKEN = 16; -const int CTF_YELLOW_FLAG_LOST = 32; -const int CTF_YELLOW_FLAG_CARRYING = 48; -const int CTF_PINK_FLAG_TAKEN = 64; -const int CTF_PINK_FLAG_LOST = 128; -const int CTF_PINK_FLAG_CARRYING = 192; -const int CTF_NEUTRAL_FLAG_TAKEN = 256; -const int CTF_NEUTRAL_FLAG_LOST = 512; -const int CTF_NEUTRAL_FLAG_CARRYING = 768; -const int CTF_FLAG_NEUTRAL = 2048; -const int CTF_SHIELDED = 4096; - -#endif diff --git a/qcsrc/server/mutators/gamemode_cts.qh b/qcsrc/server/mutators/gamemode_cts.qh deleted file mode 100644 index fa27fe4fc..000000000 --- a/qcsrc/server/mutators/gamemode_cts.qh +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef GAMEMODE_CTS_H -#define GAMEMODE_CTS_H -//float g_race_qualifying; - -// scores -const float ST_CTS_LAPS = 1; -const float SP_CTS_LAPS = 4; -const float SP_CTS_TIME = 5; -const float SP_CTS_FASTEST = 6; -#endif diff --git a/qcsrc/server/mutators/gamemode_domination.qh b/qcsrc/server/mutators/gamemode_domination.qh deleted file mode 100644 index d017b62a4..000000000 --- a/qcsrc/server/mutators/gamemode_domination.qh +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef GAMEMODE_DOMINATION_H -#define GAMEMODE_DOMINATION_H -// these are needed since mutators are compiled last - -// score rule declarations -const float ST_DOM_TICKS = 1; -const float SP_DOM_TICKS = 4; -const float SP_DOM_TAKES = 5; -const float ST_DOM_CAPS = 1; -const float SP_DOM_CAPS = 4; - -// pps: points per second -.float dom_total_pps; -.float dom_pps_red; -.float dom_pps_blue; -.float dom_pps_yellow; -.float dom_pps_pink; -float total_pps; -float pps_red; -float pps_blue; -float pps_yellow; -float pps_pink; - -// capture declarations -.float enemy_playerid; -.entity sprite; -.float captime; - -// misc globals -float domination_roundbased; -float domination_teams; -#endif diff --git a/qcsrc/server/mutators/gamemode_freezetag.qh b/qcsrc/server/mutators/gamemode_freezetag.qh deleted file mode 100644 index 19489fcfb..000000000 --- a/qcsrc/server/mutators/gamemode_freezetag.qh +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef GAMEMODE_FREEZETAG_H -#define GAMEMODE_FREEZETAG_H -.float freezetag_frozen_time; -.float freezetag_frozen_timeout; -const float ICE_MAX_ALPHA = 1; -const float ICE_MIN_ALPHA = 0.1; -float freezetag_teams; - -.float reviving; // temp var - -#endif diff --git a/qcsrc/server/mutators/gamemode_invasion.qh b/qcsrc/server/mutators/gamemode_invasion.qh deleted file mode 100644 index 191aef9ad..000000000 --- a/qcsrc/server/mutators/gamemode_invasion.qh +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef GAMEMODE_INVASION_H -#define GAMEMODE_INVASION_H - -float inv_numspawned; -float inv_maxspawned; -float inv_roundcnt; -float inv_maxrounds; -float inv_numkilled; -float inv_lastcheck; -float inv_maxcurrent; - -float invasion_teams; -float inv_monsters_perteam[17]; - -float inv_monsterskill; - -const float ST_INV_KILLS = 1; -#endif diff --git a/qcsrc/server/mutators/gamemode_keepaway.qh b/qcsrc/server/mutators/gamemode_keepaway.qh deleted file mode 100644 index 250f2fbc9..000000000 --- a/qcsrc/server/mutators/gamemode_keepaway.qh +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef GAMEMODE_KEEPAWAY_H -#define GAMEMODE_KEEPAWAY_H - -// these are needed since mutators are compiled last - -entity ka_ball; - -const float SP_KEEPAWAY_PICKUPS = 4; -const float SP_KEEPAWAY_CARRIERKILLS = 5; -const float SP_KEEPAWAY_BCTIME = 6; - -void() havocbot_role_ka_carrier; -void() havocbot_role_ka_collector; - -void ka_DropEvent(entity plyr); - -#endif diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qh b/qcsrc/server/mutators/gamemode_keyhunt.qh deleted file mode 100644 index 2d96b2fa2..000000000 --- a/qcsrc/server/mutators/gamemode_keyhunt.qh +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GAMEMODE_KEYHUNT_H -#define GAMEMODE_KEYHUNT_H - -#define FOR_EACH_KH_KEY(v) for(v = kh_worldkeylist; v; v = v.kh_worldkeynext ) - -// ALL OF THESE should be removed in the future, as other code should not have to care - -// used by bots: -float kh_tracking_enabled; -.entity kh_next; -float kh_Key_AllOwnedByWhichTeam(); - -typedef void(void) kh_Think_t; -void kh_StartRound(); -void kh_Controller_SetThink(float t, kh_Think_t func); - -entity kh_worldkeylist; -.entity kh_worldkeynext; - -#endif diff --git a/qcsrc/server/mutators/gamemode_lms.qh b/qcsrc/server/mutators/gamemode_lms.qh deleted file mode 100644 index 474e3e197..000000000 --- a/qcsrc/server/mutators/gamemode_lms.qh +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef GAMEMODE_LMS_H -#define GAMEMODE_LMS_H - -// scoreboard stuff -const float SP_LMS_LIVES = 4; -const float SP_LMS_RANK = 5; - -// lives related defs -float lms_lowest_lives; -float lms_next_place; -float LMS_NewPlayerLives(); -#endif diff --git a/qcsrc/server/mutators/gamemode_onslaught.qh b/qcsrc/server/mutators/gamemode_onslaught.qh deleted file mode 100644 index c6c3d1814..000000000 --- a/qcsrc/server/mutators/gamemode_onslaught.qh +++ /dev/null @@ -1,93 +0,0 @@ -// these are needed since mutators are compiled last - -#ifdef SVQC - -.entity ons_toucher; // player who touched the control point - -// control point / generator constants -const float ONS_CP_THINKRATE = 0.2; -const float GEN_THINKRATE = 1; -#define CPGEN_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13)) -const vector CPGEN_WAYPOINT_OFFSET = ('0 0 128'); -const vector CPICON_OFFSET = ('0 0 96'); - -// list of generators on the map -entity ons_worldgeneratorlist; -.entity ons_worldgeneratornext; -.entity ons_stalegeneratornext; - -// list of control points on the map -entity ons_worldcplist; -.entity ons_worldcpnext; -.entity ons_stalecpnext; - -// list of links on the map -entity ons_worldlinklist; -.entity ons_worldlinknext; -.entity ons_stalelinknext; - -// definitions -.entity sprite; -.string target2; -.int iscaptured; -.int islinked; -.int isshielded; -.float lasthealth; -.int lastteam; -.int lastshielded; -.int lastcaptured; - -.bool waslinked; - -bool ons_stalemate; - -.float teleport_antispam; - -.bool ons_roundlost; - -// waypoint sprites -.entity bot_basewaypoint; // generator waypointsprite - -.bool isgenneighbor[17]; -.bool iscpneighbor[17]; -float ons_notification_time[17]; - -.float ons_overtime_damagedelay; - -.vector ons_deathloc; - -.entity ons_spawn_by; - -// declarations for functions used outside gamemode_onslaught.qc -void ons_Generator_UpdateSprite(entity e); -void ons_ControlPoint_UpdateSprite(entity e); -bool ons_ControlPoint_Attackable(entity cp, int teamnumber); - -// CaptureShield: Prevent capturing or destroying control point/generator if it is not available yet -float ons_captureshield_force; // push force of the shield - -// bot player logic -const int HAVOCBOT_ONS_ROLE_NONE = 0; -const int HAVOCBOT_ONS_ROLE_DEFENSE = 2; -const int HAVOCBOT_ONS_ROLE_ASSISTANT = 4; -const int HAVOCBOT_ONS_ROLE_OFFENSE = 8; - -.entity havocbot_ons_target; - -.int havocbot_role_flags; -.float havocbot_attack_time; - -void havocbot_role_ons_defense(); -void havocbot_role_ons_offense(); -void havocbot_role_ons_assistant(); - -void havocbot_ons_reset_role(entity bot); -void havocbot_goalrating_items(float ratingscale, vector org, float sradius); -void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius); - -// score rule declarations -const int ST_ONS_CAPS = 1; -const int SP_ONS_CAPS = 4; -const int SP_ONS_TAKES = 6; - -#endif diff --git a/qcsrc/server/mutators/gamemode_race.qh b/qcsrc/server/mutators/gamemode_race.qh deleted file mode 100644 index 0e20b9b57..000000000 --- a/qcsrc/server/mutators/gamemode_race.qh +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef GAMEMODE_RACE_H -#define GAMEMODE_RACE_H - -float g_race_qualifying; -float race_teams; - -// scores -const float ST_RACE_LAPS = 1; -const float SP_RACE_LAPS = 4; -const float SP_RACE_TIME = 5; -const float SP_RACE_FASTEST = 6; -#endif diff --git a/qcsrc/server/mutators/mutator.qh b/qcsrc/server/mutators/mutator.qh index 8dde34af3..f883b84b4 100644 --- a/qcsrc/server/mutators/mutator.qh +++ b/qcsrc/server/mutators/mutator.qh @@ -2,7 +2,6 @@ #define MUTATOR_H #include "../../common/mutators/base.qh" -#include "mutator_nades.qh" #include "../cl_client.qh" #include "../cl_player.qh" diff --git a/qcsrc/server/mutators/gamemode_assault.qc b/qcsrc/server/mutators/mutator/gamemode_assault.qc similarity index 94% rename from qcsrc/server/mutators/gamemode_assault.qc rename to qcsrc/server/mutators/mutator/gamemode_assault.qc index 8558faaf0..52fb40fea 100644 --- a/qcsrc/server/mutators/gamemode_assault.qc +++ b/qcsrc/server/mutators/mutator/gamemode_assault.qc @@ -1,7 +1,39 @@ -#include "gamemode_assault.qh" +#ifndef GAMEMODE_ASSAULT_H +#define GAMEMODE_ASSAULT_H -#include "gamemode.qh" +// sprites +.entity assault_decreaser; +.entity assault_sprite; +// legacy bot defs +const int HAVOCBOT_AST_ROLE_NONE = 0; +const int HAVOCBOT_AST_ROLE_DEFENSE = 2; +const int HAVOCBOT_AST_ROLE_OFFENSE = 4; + +.int havocbot_role_flags; +.float havocbot_attack_time; + +.void() havocbot_role; +.void() havocbot_previous_role; + +void() havocbot_role_ast_defense; +void() havocbot_role_ast_offense; +.entity havocbot_ast_target; + +void(entity bot) havocbot_ast_reset_role; + +void(float ratingscale, vector org, float sradius) havocbot_goalrating_items; +void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplayers; + +// scoreboard stuff +const float ST_ASSAULT_OBJECTIVES = 1; +const float SP_ASSAULT_OBJECTIVES = 4; + +// predefined spawnfuncs +void target_objective_decrease_activate(); +#endif + +#ifdef IMPLEMENTATION .entity sprite; // random functions @@ -636,3 +668,4 @@ REGISTER_MUTATOR(as, g_assault) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_ca.qc b/qcsrc/server/mutators/mutator/gamemode_ca.qc similarity index 98% rename from qcsrc/server/mutators/gamemode_ca.qc rename to qcsrc/server/mutators/mutator/gamemode_ca.qc index 1a9b1daa1..20330b757 100644 --- a/qcsrc/server/mutators/gamemode_ca.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ca.qc @@ -1,7 +1,11 @@ -#include "gamemode_ca.qh" +#ifndef GAMEMODE_CA_H +#define GAMEMODE_CA_H -#include "gamemode.qh" +// should be removed in the future, as other code should not have to care +.float caplayer; // 0.5 if scheduled to join the next round +#endif +#ifdef IMPLEMENTATION float autocvar_g_ca_damage2score_multiplier; int autocvar_g_ca_point_leadlimit; int autocvar_g_ca_point_limit; @@ -522,3 +526,4 @@ REGISTER_MUTATOR(ca, g_ca) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc similarity index 93% rename from qcsrc/server/mutators/gamemode_ctf.qc rename to qcsrc/server/mutators/mutator/gamemode_ctf.qc index 016f9bd47..e2eb898ef 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -1,13 +1,178 @@ -#include "gamemode_ctf.qh" +#ifndef GAMEMODE_CTF_H +#define GAMEMODE_CTF_H -#include "gamemode.qh" +#ifdef SVQC +// used in cheats.qc +void ctf_RespawnFlag(entity flag); + +// score rule declarations +const int ST_CTF_CAPS = 1; +const int SP_CTF_CAPS = 4; +const int SP_CTF_CAPTIME = 5; +const int SP_CTF_PICKUPS = 6; +const int SP_CTF_DROPS = 7; +const int SP_CTF_FCKILLS = 8; +const int SP_CTF_RETURNS = 9; + +// flag constants // for most of these, there is just one question to be asked: WHYYYYY? +#define FLAG_MIN (PL_MIN_CONST + '0 0 -13') +#define FLAG_MAX (PL_MAX_CONST + '0 0 -13') + +const float FLAG_SCALE = 0.6; + +const float FLAG_THINKRATE = 0.2; +const float FLAG_TOUCHRATE = 0.5; +const float WPFE_THINKRATE = 0.5; + +const vector FLAG_DROP_OFFSET = ('0 0 32'); +const vector FLAG_CARRY_OFFSET = ('-16 0 8'); +#define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13)) +const vector FLAG_WAYPOINT_OFFSET = ('0 0 64'); +const vector FLAG_FLOAT_OFFSET = ('0 0 32'); +const vector FLAG_PASS_ARC_OFFSET = ('0 0 -10'); + +const vector VEHICLE_FLAG_OFFSET = ('0 0 96'); +const float VEHICLE_FLAG_SCALE = 1.0; + +// waypoint colors +#define WPCOLOR_ENEMYFC(t) ((t) ? colormapPaletteColor(t - 1, false) * 0.75 : '1 1 1') +#define WPCOLOR_FLAGCARRIER(t) (WP_FlagCarrier.m_color) +#define WPCOLOR_DROPPEDFLAG(t) ((t) ? ('0.25 0.25 0.25' + colormapPaletteColor(t - 1, false)) * 0.5 : '1 1 1') + +// sounds +#define snd_flag_taken noise +#define snd_flag_returned noise1 +#define snd_flag_capture noise2 +#define snd_flag_respawn noise3 +.string snd_flag_dropped; +.string snd_flag_touch; +.string snd_flag_pass; + +// effects +.string toucheffect; +.string passeffect; +.string capeffect; + +// list of flags on the map +entity ctf_worldflaglist; +.entity ctf_worldflagnext; +.entity ctf_staleflagnext; + +// waypoint sprites +.entity bot_basewaypoint; // flag waypointsprite +.entity wps_helpme; +.entity wps_flagbase; +.entity wps_flagcarrier; +.entity wps_flagdropped; +.entity wps_enemyflagcarrier; +.float wps_helpme_time; +bool wpforenemy_announced; +float wpforenemy_nextthink; + +// statuses +const int FLAG_BASE = 1; +const int FLAG_DROPPED = 2; +const int FLAG_CARRY = 3; +const int FLAG_PASSING = 4; + +const int DROP_NORMAL = 1; +const int DROP_THROW = 2; +const int DROP_PASS = 3; +const int DROP_RESET = 4; + +const int PICKUP_BASE = 1; +const int PICKUP_DROPPED = 2; + +const int CAPTURE_NORMAL = 1; +const int CAPTURE_DROPPED = 2; + +const int RETURN_TIMEOUT = 1; +const int RETURN_DROPPED = 2; +const int RETURN_DAMAGE = 3; +const int RETURN_SPEEDRUN = 4; +const int RETURN_NEEDKILL = 5; + +// flag properties +#define ctf_spawnorigin dropped_origin +bool ctf_stalemate; // indicates that a stalemate is active +float ctf_captimerecord; // record time for capturing the flag +.float ctf_pickuptime; +.float ctf_droptime; +.int ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally) +.entity ctf_dropper; // don't allow spam of dropping the flag +.int max_flag_health; +.float next_take_time; +.bool ctf_flagdamaged; +int ctf_teams; + +// passing/throwing properties +.float pass_distance; +.entity pass_sender; +.entity pass_target; +.float throw_antispam; +.float throw_prevtime; +.int throw_count; + +// CaptureShield: If the player is too bad to be allowed to capture, shield them from taking the flag. +.bool ctf_captureshielded; // set to 1 if the player is too bad to be allowed to capture +float ctf_captureshield_min_negscore; // punish at -20 points +float ctf_captureshield_max_ratio; // punish at most 30% of each team +float ctf_captureshield_force; // push force of the shield + +// 1 flag ctf +bool ctf_oneflag; // indicates whether or not a neutral flag has been found + +// bot player logic +const int HAVOCBOT_CTF_ROLE_NONE = 0; +const int HAVOCBOT_CTF_ROLE_DEFENSE = 2; +const int HAVOCBOT_CTF_ROLE_MIDDLE = 4; +const int HAVOCBOT_CTF_ROLE_OFFENSE = 8; +const int HAVOCBOT_CTF_ROLE_CARRIER = 16; +const int HAVOCBOT_CTF_ROLE_RETRIEVER = 32; +const int HAVOCBOT_CTF_ROLE_ESCORT = 64; + +.bool havocbot_cantfindflag; + +vector havocbot_ctf_middlepoint; +float havocbot_ctf_middlepoint_radius; + +void havocbot_role_ctf_setrole(entity bot, int role); + +// team checking +#define CTF_SAMETEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? DIFF_TEAM(a,b) : SAME_TEAM(a,b)) +#define CTF_DIFFTEAM(a,b) ((autocvar_g_ctf_reverse || (ctf_oneflag && autocvar_g_ctf_oneflag_reverse)) ? SAME_TEAM(a,b) : DIFF_TEAM(a,b)) + +// networked flag statuses +.int ctf_flagstatus; +#endif + +const int CTF_RED_FLAG_TAKEN = 1; +const int CTF_RED_FLAG_LOST = 2; +const int CTF_RED_FLAG_CARRYING = 3; +const int CTF_BLUE_FLAG_TAKEN = 4; +const int CTF_BLUE_FLAG_LOST = 8; +const int CTF_BLUE_FLAG_CARRYING = 12; +const int CTF_YELLOW_FLAG_TAKEN = 16; +const int CTF_YELLOW_FLAG_LOST = 32; +const int CTF_YELLOW_FLAG_CARRYING = 48; +const int CTF_PINK_FLAG_TAKEN = 64; +const int CTF_PINK_FLAG_LOST = 128; +const int CTF_PINK_FLAG_CARRYING = 192; +const int CTF_NEUTRAL_FLAG_TAKEN = 256; +const int CTF_NEUTRAL_FLAG_LOST = 512; +const int CTF_NEUTRAL_FLAG_CARRYING = 768; +const int CTF_FLAG_NEUTRAL = 2048; +const int CTF_SHIELDED = 4096; +#endif + +#ifdef IMPLEMENTATION #ifdef SVQC -#include "../../common/vehicles/all.qh" -#include "../teamplay.qh" +#include "../../../common/vehicles/all.qh" +#include "../../teamplay.qh" #endif -#include "../../lib/warpzone/common.qh" +#include "../../../lib/warpzone/common.qh" bool autocvar_g_ctf_allow_vehicle_carry; bool autocvar_g_ctf_allow_vehicle_touch; @@ -2604,3 +2769,4 @@ REGISTER_MUTATOR(ctf, g_ctf) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_cts.qc b/qcsrc/server/mutators/mutator/gamemode_cts.qc similarity index 97% rename from qcsrc/server/mutators/gamemode_cts.qc rename to qcsrc/server/mutators/mutator/gamemode_cts.qc index 679bbb094..1414fe065 100644 --- a/qcsrc/server/mutators/gamemode_cts.qc +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qc @@ -1,8 +1,16 @@ -#include "gamemode_cts.qh" +#ifndef GAMEMODE_CTS_H +#define GAMEMODE_CTS_H + +// scores +const float ST_CTS_LAPS = 1; +const float SP_CTS_LAPS = 4; +const float SP_CTS_TIME = 5; +const float SP_CTS_FASTEST = 6; +#endif -#include "gamemode.qh" +#ifdef IMPLEMENTATION -#include "../race.qh" +#include "../../race.qh" float autocvar_g_cts_finish_kill_delay; bool autocvar_g_cts_selfdamage; @@ -434,3 +442,4 @@ REGISTER_MUTATOR(cts, g_cts) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_deathmatch.qc b/qcsrc/server/mutators/mutator/gamemode_deathmatch.qc similarity index 95% rename from qcsrc/server/mutators/gamemode_deathmatch.qc rename to qcsrc/server/mutators/mutator/gamemode_deathmatch.qc index d5f9cbdc6..ac7ea21b2 100644 --- a/qcsrc/server/mutators/gamemode_deathmatch.qc +++ b/qcsrc/server/mutators/mutator/gamemode_deathmatch.qc @@ -1,5 +1,4 @@ -#include "gamemode.qh" - +#ifdef IMPLEMENTATION MUTATOR_HOOKFUNCTION(dm, Scores_CountFragsRemaining) { // announce remaining frags @@ -29,3 +28,4 @@ REGISTER_MUTATOR(dm, IS_GAMETYPE(DEATHMATCH)) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_domination.qc b/qcsrc/server/mutators/mutator/gamemode_domination.qc similarity index 96% rename from qcsrc/server/mutators/gamemode_domination.qc rename to qcsrc/server/mutators/mutator/gamemode_domination.qc index 504f31db0..75d0d7dc3 100644 --- a/qcsrc/server/mutators/gamemode_domination.qc +++ b/qcsrc/server/mutators/mutator/gamemode_domination.qc @@ -1,8 +1,38 @@ -#include "gamemode_domination.qh" - -#include "gamemode.qh" - -#include "../teamplay.qh" +#ifndef GAMEMODE_DOMINATION_H +#define GAMEMODE_DOMINATION_H + +// score rule declarations +const float ST_DOM_TICKS = 1; +const float SP_DOM_TICKS = 4; +const float SP_DOM_TAKES = 5; +const float ST_DOM_CAPS = 1; +const float SP_DOM_CAPS = 4; + +// pps: points per second +.float dom_total_pps; +.float dom_pps_red; +.float dom_pps_blue; +.float dom_pps_yellow; +.float dom_pps_pink; +float total_pps; +float pps_red; +float pps_blue; +float pps_yellow; +float pps_pink; + +// capture declarations +.float enemy_playerid; +.entity sprite; +.float captime; + +// misc globals +float domination_roundbased; +float domination_teams; +#endif + +#ifdef IMPLEMENTATION + +#include "../../teamplay.qh" bool g_domination; @@ -691,3 +721,4 @@ REGISTER_MUTATOR(dom, IS_GAMETYPE(DOMINATION)) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc similarity index 98% rename from qcsrc/server/mutators/gamemode_freezetag.qc rename to qcsrc/server/mutators/mutator/gamemode_freezetag.qc index d6c8d2941..912df1575 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -1,6 +1,16 @@ -#include "gamemode_freezetag.qh" +#ifndef GAMEMODE_FREEZETAG_H +#define GAMEMODE_FREEZETAG_H -#include "gamemode.qh" +.float freezetag_frozen_time; +.float freezetag_frozen_timeout; +const float ICE_MAX_ALPHA = 1; +const float ICE_MIN_ALPHA = 0.1; +float freezetag_teams; + +.float reviving; // temp var +#endif + +#ifdef IMPLEMENTATION float autocvar_g_freezetag_frozen_maxtime; bool autocvar_g_freezetag_revive_nade; @@ -641,3 +651,4 @@ REGISTER_MUTATOR(ft, g_freezetag) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_invasion.qc b/qcsrc/server/mutators/mutator/gamemode_invasion.qc similarity index 96% rename from qcsrc/server/mutators/gamemode_invasion.qc rename to qcsrc/server/mutators/mutator/gamemode_invasion.qc index e752da96e..4dc5ed63a 100644 --- a/qcsrc/server/mutators/gamemode_invasion.qc +++ b/qcsrc/server/mutators/mutator/gamemode_invasion.qc @@ -1,11 +1,28 @@ -#include "gamemode_invasion.qh" +#ifndef GAMEMODE_INVASION_H +#define GAMEMODE_INVASION_H -#include "gamemode.qh" +float inv_numspawned; +float inv_maxspawned; +float inv_roundcnt; +float inv_maxrounds; +float inv_numkilled; +float inv_lastcheck; +float inv_maxcurrent; -#include "../../common/monsters/spawn.qh" -#include "../../common/monsters/sv_monsters.qh" +float invasion_teams; +float inv_monsters_perteam[17]; -#include "../teamplay.qh" +float inv_monsterskill; + +const float ST_INV_KILLS = 1; +#endif + +#ifdef IMPLEMENTATION + +#include "../../../common/monsters/spawn.qh" +#include "../../../common/monsters/sv_monsters.qh" + +#include "../../teamplay.qh" bool g_invasion; @@ -505,3 +522,4 @@ REGISTER_MUTATOR(inv, IS_GAMETYPE(INVASION)) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_keepaway.qc b/qcsrc/server/mutators/mutator/gamemode_keepaway.qc similarity index 97% rename from qcsrc/server/mutators/gamemode_keepaway.qc rename to qcsrc/server/mutators/mutator/gamemode_keepaway.qc index f96aada3e..855b766a9 100644 --- a/qcsrc/server/mutators/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keepaway.qc @@ -1,6 +1,20 @@ -#include "gamemode_keepaway.qh" +#ifndef GAMEMODE_KEEPAWAY_H +#define GAMEMODE_KEEPAWAY_H -#include "gamemode.qh" + +entity ka_ball; + +const float SP_KEEPAWAY_PICKUPS = 4; +const float SP_KEEPAWAY_CARRIERKILLS = 5; +const float SP_KEEPAWAY_BCTIME = 6; + +void() havocbot_role_ka_carrier; +void() havocbot_role_ka_collector; + +void ka_DropEvent(entity plyr); +#endif + +#ifdef IMPLEMENTATION int autocvar_g_keepaway_ballcarrier_effects; float autocvar_g_keepaway_ballcarrier_damage; @@ -483,3 +497,4 @@ REGISTER_MUTATOR(ka, IS_GAMETYPE(KEEPAWAY)) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc similarity index 98% rename from qcsrc/server/mutators/gamemode_keyhunt.qc rename to qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index 8f680ae64..3b86b6641 100644 --- a/qcsrc/server/mutators/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -1,6 +1,24 @@ -#include "gamemode_keyhunt.qh" +#ifndef GAMEMODE_KEYHUNT_H +#define GAMEMODE_KEYHUNT_H -#include "gamemode.qh" +#define FOR_EACH_KH_KEY(v) for(v = kh_worldkeylist; v; v = v.kh_worldkeynext ) + +// ALL OF THESE should be removed in the future, as other code should not have to care + +// used by bots: +float kh_tracking_enabled; +.entity kh_next; +float kh_Key_AllOwnedByWhichTeam(); + +typedef void(void) kh_Think_t; +void kh_StartRound(); +void kh_Controller_SetThink(float t, kh_Think_t func); + +entity kh_worldkeylist; +.entity kh_worldkeynext; +#endif + +#ifdef IMPLEMENTATION float autocvar_g_balance_keyhunt_damageforcescale; float autocvar_g_balance_keyhunt_delay_collect; @@ -1378,3 +1396,4 @@ REGISTER_MUTATOR(kh, IS_GAMETYPE(KEYHUNT)) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_lms.qc b/qcsrc/server/mutators/mutator/gamemode_lms.qc similarity index 95% rename from qcsrc/server/mutators/gamemode_lms.qc rename to qcsrc/server/mutators/mutator/gamemode_lms.qc index 65c85f73a..30789a520 100644 --- a/qcsrc/server/mutators/gamemode_lms.qc +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qc @@ -1,9 +1,21 @@ -#include "gamemode_lms.qh" +#ifndef GAMEMODE_LMS_H +#define GAMEMODE_LMS_H -#include "gamemode.qh" +// scoreboard stuff +const float SP_LMS_LIVES = 4; +const float SP_LMS_RANK = 5; + +// lives related defs +float lms_lowest_lives; +float lms_next_place; +float LMS_NewPlayerLives(); + +#endif + +#ifdef IMPLEMENTATION -#include "../campaign.qh" -#include "../command/cmd.qh" +#include "../../campaign.qh" +#include "../../command/cmd.qh" int autocvar_g_lms_extra_lives; bool autocvar_g_lms_join_anytime; @@ -298,3 +310,4 @@ REGISTER_MUTATOR(lms, IS_GAMETYPE(LMS)) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/mutator/gamemode_onslaught.qc similarity index 96% rename from qcsrc/server/mutators/gamemode_onslaught.qc rename to qcsrc/server/mutators/mutator/gamemode_onslaught.qc index 3ebcb7eac..d01b48ca4 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/mutator/gamemode_onslaught.qc @@ -1,6 +1,103 @@ -#include "gamemode.qh" -#include "../controlpoint.qh" -#include "../generator.qh" +#ifndef GAMEMODE_ONSLAUGHT_H +#define GAMEMODE_ONSLAUGHT_H + +#ifdef SVQC + +.entity ons_toucher; // player who touched the control point + +// control point / generator constants +const float ONS_CP_THINKRATE = 0.2; +const float GEN_THINKRATE = 1; +#define CPGEN_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13)) +const vector CPGEN_WAYPOINT_OFFSET = ('0 0 128'); +const vector CPICON_OFFSET = ('0 0 96'); + +// list of generators on the map +entity ons_worldgeneratorlist; +.entity ons_worldgeneratornext; +.entity ons_stalegeneratornext; + +// list of control points on the map +entity ons_worldcplist; +.entity ons_worldcpnext; +.entity ons_stalecpnext; + +// list of links on the map +entity ons_worldlinklist; +.entity ons_worldlinknext; +.entity ons_stalelinknext; + +// definitions +.entity sprite; +.string target2; +.int iscaptured; +.int islinked; +.int isshielded; +.float lasthealth; +.int lastteam; +.int lastshielded; +.int lastcaptured; + +.bool waslinked; + +bool ons_stalemate; + +.float teleport_antispam; + +.bool ons_roundlost; + +// waypoint sprites +.entity bot_basewaypoint; // generator waypointsprite + +.bool isgenneighbor[17]; +.bool iscpneighbor[17]; +float ons_notification_time[17]; + +.float ons_overtime_damagedelay; + +.vector ons_deathloc; + +.entity ons_spawn_by; + +// declarations for functions used outside gamemode_onslaught.qc +void ons_Generator_UpdateSprite(entity e); +void ons_ControlPoint_UpdateSprite(entity e); +bool ons_ControlPoint_Attackable(entity cp, int teamnumber); + +// CaptureShield: Prevent capturing or destroying control point/generator if it is not available yet +float ons_captureshield_force; // push force of the shield + +// bot player logic +const int HAVOCBOT_ONS_ROLE_NONE = 0; +const int HAVOCBOT_ONS_ROLE_DEFENSE = 2; +const int HAVOCBOT_ONS_ROLE_ASSISTANT = 4; +const int HAVOCBOT_ONS_ROLE_OFFENSE = 8; + +.entity havocbot_ons_target; + +.int havocbot_role_flags; +.float havocbot_attack_time; + +void havocbot_role_ons_defense(); +void havocbot_role_ons_offense(); +void havocbot_role_ons_assistant(); + +void havocbot_ons_reset_role(entity bot); +void havocbot_goalrating_items(float ratingscale, vector org, float sradius); +void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius); + +// score rule declarations +const int ST_ONS_CAPS = 1; +const int SP_ONS_CAPS = 4; +const int SP_ONS_TAKES = 6; + +#endif +#endif + +#ifdef IMPLEMENTATION + +#include "../../controlpoint.qh" +#include "../../generator.qh" bool g_onslaught; @@ -2215,3 +2312,4 @@ REGISTER_MUTATOR(ons, IS_GAMETYPE(ONSLAUGHT)) return false; } +#endif diff --git a/qcsrc/server/mutators/gamemode_race.qc b/qcsrc/server/mutators/mutator/gamemode_race.qc similarity index 97% rename from qcsrc/server/mutators/gamemode_race.qc rename to qcsrc/server/mutators/mutator/gamemode_race.qc index 7a56d7f9d..4b9201d45 100644 --- a/qcsrc/server/mutators/gamemode_race.qc +++ b/qcsrc/server/mutators/mutator/gamemode_race.qc @@ -1,8 +1,19 @@ -#include "gamemode_race.qh" +#ifndef GAMEMODE_RACE_H +#define GAMEMODE_RACE_H -#include "gamemode.qh" +float g_race_qualifying; +float race_teams; -#include "../race.qh" +// scores +const float ST_RACE_LAPS = 1; +const float SP_RACE_LAPS = 4; +const float SP_RACE_TIME = 5; +const float SP_RACE_FASTEST = 6; +#endif + +#ifdef IMPLEMENTATION + +#include "../../race.qh" #define autocvar_g_race_laps_limit cvar("g_race_laps_limit") float autocvar_g_race_qualifying_timelimit; @@ -452,3 +463,4 @@ REGISTER_MUTATOR(rc, g_race) return 0; } +#endif diff --git a/qcsrc/server/mutators/gamemode_tdm.qc b/qcsrc/server/mutators/mutator/gamemode_tdm.qc similarity index 98% rename from qcsrc/server/mutators/gamemode_tdm.qc rename to qcsrc/server/mutators/mutator/gamemode_tdm.qc index 20270b5a2..aaa3d5163 100644 --- a/qcsrc/server/mutators/gamemode_tdm.qc +++ b/qcsrc/server/mutators/mutator/gamemode_tdm.qc @@ -1,5 +1,4 @@ -#include "gamemode.qh" - +#ifdef IMPLEMENTATION bool autocvar_g_tdm_team_spawns; int autocvar_g_tdm_point_limit; int autocvar_g_tdm_point_leadlimit; @@ -89,3 +88,4 @@ REGISTER_MUTATOR(tdm, g_tdm) return 0; } +#endif diff --git a/qcsrc/server/mutators/mutator_bloodloss.qc b/qcsrc/server/mutators/mutator/mutator_bloodloss.qc similarity index 96% rename from qcsrc/server/mutators/mutator_bloodloss.qc rename to qcsrc/server/mutators/mutator/mutator_bloodloss.qc index 5db1f98a0..ca3716669 100644 --- a/qcsrc/server/mutators/mutator_bloodloss.qc +++ b/qcsrc/server/mutators/mutator/mutator_bloodloss.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(bloodloss, cvar("g_bloodloss")); .float bloodloss_timer; @@ -44,3 +42,4 @@ MUTATOR_HOOKFUNCTION(bloodloss, BuildMutatorsPrettyString) ret_string = strcat(ret_string, ", Blood loss"); return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_breakablehook.qc b/qcsrc/server/mutators/mutator/mutator_breakablehook.qc similarity index 87% rename from qcsrc/server/mutators/mutator_breakablehook.qc rename to qcsrc/server/mutators/mutator/mutator_breakablehook.qc index 257937efe..cb9463b86 100644 --- a/qcsrc/server/mutators/mutator_breakablehook.qc +++ b/qcsrc/server/mutators/mutator/mutator_breakablehook.qc @@ -1,5 +1,6 @@ -#include "../../common/deathtypes/all.qh" -#include "../g_hook.qh" +#ifdef IMPLEMENTATION +#include "../../../common/deathtypes/all.qh" +#include "../../g_hook.qh" REGISTER_MUTATOR(breakablehook, cvar("g_breakablehook")); @@ -25,3 +26,4 @@ MUTATOR_HOOKFUNCTION(breakablehook, PlayerDamage_Calculate) return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_buffs.qc b/qcsrc/server/mutators/mutator/mutator_buffs.qc similarity index 96% rename from qcsrc/server/mutators/mutator_buffs.qc rename to qcsrc/server/mutators/mutator/mutator_buffs.qc index 80de63c95..4f0758fa3 100644 --- a/qcsrc/server/mutators/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator/mutator_buffs.qc @@ -1,10 +1,39 @@ -#include "../../common/triggers/target/music.qh" -#include "mutator_buffs.qh" - -#include "mutator.qh" - -#include "../../common/gamemodes/all.qh" -#include "../../common/buffs/all.qh" +#ifndef MUTATOR_BUFFS_H +#define MUTATOR_BUFFS_H + +// ammo +.float buff_ammo_prev_infitems; +.int buff_ammo_prev_clipload; +// invisible +.float buff_invisible_prev_alpha; +// flight +.float buff_flight_prev_gravity; +// disability +.float buff_disability_time; +.float buff_disability_effect_time; +// common buff variables +.float buff_effect_delay; + +// buff definitions +.float buff_active; +.float buff_activetime; +.float buff_activetime_updated; +.entity buff_waypoint; +.int oldbuffs; // for updating effects +.entity buff_model; // controls effects (TODO: make csqc) + +const vector BUFF_MIN = ('-16 -16 -20'); +const vector BUFF_MAX = ('16 16 20'); + +// client side options +.float cvar_cl_buffs_autoreplace; +#endif + +#ifdef IMPLEMENTATION + +#include "../../../common/triggers/target/music.qh" +#include "../../../common/gamemodes/all.qh" +#include "../../../common/buffs/all.qh" .float buff_time; void buffs_DelayedInit(); @@ -968,3 +997,4 @@ void buffs_DelayedInit() } } } +#endif diff --git a/qcsrc/server/mutators/mutator_campcheck.qc b/qcsrc/server/mutators/mutator/mutator_campcheck.qc similarity index 98% rename from qcsrc/server/mutators/mutator_campcheck.qc rename to qcsrc/server/mutators/mutator/mutator_campcheck.qc index 04598edc2..be5bfceb8 100644 --- a/qcsrc/server/mutators/mutator_campcheck.qc +++ b/qcsrc/server/mutators/mutator/mutator_campcheck.qc @@ -1,8 +1,4 @@ - -#include "mutator.qh" - -#include "../campaign.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(campcheck, cvar("g_campcheck")); .float campcheck_nextcheck; @@ -87,3 +83,4 @@ MUTATOR_HOOKFUNCTION(campcheck, BuildMutatorsString) ret_string = strcat(ret_string, ":CampCheck"); return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_dodging.qc b/qcsrc/server/mutators/mutator/mutator_dodging.qc similarity index 96% rename from qcsrc/server/mutators/mutator_dodging.qc rename to qcsrc/server/mutators/mutator/mutator_dodging.qc index e41456ad5..85b9fea61 100644 --- a/qcsrc/server/mutators/mutator_dodging.qc +++ b/qcsrc/server/mutators/mutator/mutator_dodging.qc @@ -1,3 +1,5 @@ +#ifdef IMPLEMENTATION + #ifdef CSQC #define PHYS_DODGING_FRAMETIME (1 / (frametime <= 0 ? 60 : frametime)) #define PHYS_DODGING getstati(STAT_DODGING) @@ -29,12 +31,17 @@ #endif #ifdef SVQC -#include "mutator_dodging.qh" -#include "mutator.qh" +float g_dodging; -#include "../../common/animdecide.qh" -#include "../../common/physics.qh" +// set to 1 to indicate dodging has started.. reset by physics hook after dodge has been done.. +.float dodging_action; + +// the jump part of the dodge cannot be ramped +.float dodging_single_action; + +#include "../../../common/animdecide.qh" +#include "../../../common/physics.qh" .float cvar_cl_dodging_timeout; @@ -312,3 +319,5 @@ MUTATOR_HOOKFUNCTION(dodging, GetPressedKeys) } #endif + +#endif diff --git a/qcsrc/server/mutators/mutator_hook.qc b/qcsrc/server/mutators/mutator/mutator_hook.qc similarity index 97% rename from qcsrc/server/mutators/mutator_hook.qc rename to qcsrc/server/mutators/mutator/mutator_hook.qc index e43848b30..b298e7b2e 100644 --- a/qcsrc/server/mutators/mutator_hook.qc +++ b/qcsrc/server/mutators/mutator/mutator_hook.qc @@ -1,3 +1,4 @@ +#ifdef IMPLEMENTATION AUTOCVAR(g_grappling_hook, bool, false, _("let players spawn with the grappling hook which allows them to pull themselves up")); #ifdef SVQC REGISTER_MUTATOR(hook, autocvar_g_grappling_hook) { @@ -38,3 +39,4 @@ MUTATOR_HOOKFUNCTION(hook, FilterItem) } #endif +#endif diff --git a/qcsrc/server/mutators/mutator_invincibleproj.qc b/qcsrc/server/mutators/mutator/mutator_invincibleproj.qc similarity index 94% rename from qcsrc/server/mutators/mutator_invincibleproj.qc rename to qcsrc/server/mutators/mutator/mutator_invincibleproj.qc index 3f76bf727..5a781a881 100644 --- a/qcsrc/server/mutators/mutator_invincibleproj.qc +++ b/qcsrc/server/mutators/mutator/mutator_invincibleproj.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(invincibleprojectiles, cvar("g_invincible_projectiles")); MUTATOR_HOOKFUNCTION(invincibleprojectiles, EditProjectile) @@ -24,3 +22,4 @@ MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsPrettyString) ret_string = strcat(ret_string, ", Invincible Projectiles"); return 0; } +#endif diff --git a/qcsrc/server/mutators/mutator_melee_only.qc b/qcsrc/server/mutators/mutator/mutator_melee_only.qc similarity index 96% rename from qcsrc/server/mutators/mutator_melee_only.qc rename to qcsrc/server/mutators/mutator/mutator_melee_only.qc index f85260d86..5b03f46ec 100644 --- a/qcsrc/server/mutators/mutator_melee_only.qc +++ b/qcsrc/server/mutators/mutator/mutator_melee_only.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(melee_only, cvar("g_melee_only") && !cvar("g_instagib") && !g_nexball); MUTATOR_HOOKFUNCTION(melee_only, SetStartItems) @@ -39,3 +37,4 @@ MUTATOR_HOOKFUNCTION(melee_only, BuildMutatorsPrettyString) ret_string = strcat(ret_string, ", Melee Only Arena"); return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_midair.qc b/qcsrc/server/mutators/mutator/mutator_midair.qc similarity index 97% rename from qcsrc/server/mutators/mutator_midair.qc rename to qcsrc/server/mutators/mutator/mutator_midair.qc index 4dfb7d5fb..bf3428334 100644 --- a/qcsrc/server/mutators/mutator_midair.qc +++ b/qcsrc/server/mutators/mutator/mutator_midair.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(midair, cvar("g_midair")); .float midair_shieldtime; @@ -46,3 +44,4 @@ MUTATOR_HOOKFUNCTION(midair, BuildMutatorsPrettyString) ret_string = strcat(ret_string, ", Midair"); return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_multijump.qc b/qcsrc/server/mutators/mutator/mutator_multijump.qc similarity index 97% rename from qcsrc/server/mutators/mutator_multijump.qc rename to qcsrc/server/mutators/mutator/mutator_multijump.qc index d36f281a1..f01a801aa 100644 --- a/qcsrc/server/mutators/mutator_multijump.qc +++ b/qcsrc/server/mutators/mutator/mutator_multijump.qc @@ -1,8 +1,8 @@ +#ifdef IMPLEMENTATION #ifdef SVQC - #include "mutator.qh" - #include "../antilag.qh" + #include "../../antilag.qh" #endif -#include "../../common/physics.qh" +#include "../../../common/physics.qh" .int multijump_count; .bool multijump_ready; @@ -179,3 +179,4 @@ MUTATOR_HOOKFUNCTION(multijump, BuildMutatorsPrettyString) } #endif +#endif diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator/mutator_nades.qc similarity index 97% rename from qcsrc/server/mutators/mutator_nades.qc rename to qcsrc/server/mutators/mutator/mutator_nades.qc index 45cc4f9c4..d9fd1c8b6 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator/mutator_nades.qc @@ -1,14 +1,39 @@ -#include "mutator_nades.qh" - -#include "mutator.qh" - -#include "gamemode_keyhunt.qh" -#include "gamemode_freezetag.qh" -#include "../../common/nades/all.qh" -#include "../../common/gamemodes/all.qh" -#include "../../common/monsters/spawn.qh" -#include "../../common/monsters/sv_monsters.qh" -#include "../g_subs.qh" +#ifndef MUTATOR_NADES_H +#define MUTATOR_NADES_H + +.entity nade; +.entity fake_nade; +.float nade_timer; +.float nade_refire; +.float bonus_nades; +.float nade_special_time; +.float bonus_nade_score; +.float nade_type; +.string pokenade_type; +.entity nade_damage_target; +.float cvar_cl_nade_type; +.string cvar_cl_pokenade_type; +.float toss_time; +.float stat_healing_orb; +.float stat_healing_orb_alpha; +.float nade_show_particles; + +// Remove nades that are being thrown +void(entity player) nades_Clear; + +// Give a bonus grenade to a player +void(entity player, float score) nades_GiveBonus; +// Remove all bonus nades from a player +void(entity player) nades_RemoveBonus; + +#endif +#ifdef IMPLEMENTATION + +#include "../../../common/nades/all.qh" +#include "../../../common/gamemodes/all.qh" +#include "../../../common/monsters/spawn.qh" +#include "../../../common/monsters/sv_monsters.qh" +#include "../../g_subs.qh" REGISTER_MUTATOR(nades, cvar("g_nades")) { @@ -1205,3 +1230,4 @@ MUTATOR_HOOKFUNCTION(nades, BuildMutatorsPrettyString) ret_string = strcat(ret_string, ", Nades"); return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_new_toys.qc b/qcsrc/server/mutators/mutator/mutator_new_toys.qc similarity index 99% rename from qcsrc/server/mutators/mutator_new_toys.qc rename to qcsrc/server/mutators/mutator/mutator_new_toys.qc index d7fc5257e..78904ffae 100644 --- a/qcsrc/server/mutators/mutator_new_toys.qc +++ b/qcsrc/server/mutators/mutator/mutator_new_toys.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION /* CORE laser vortex lg rl cry gl elec hagar fireb hook @@ -226,3 +224,4 @@ MUTATOR_HOOKFUNCTION(nt, FilterItem) } return 0; } +#endif diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator/mutator_nix.qc similarity index 99% rename from qcsrc/server/mutators/mutator_nix.qc rename to qcsrc/server/mutators/mutator/mutator_nix.qc index 96e8ca97b..259547a05 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator/mutator_nix.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION float g_nix_with_blaster; // WEAPONTODO int nix_weapon; @@ -266,3 +264,4 @@ MUTATOR_HOOKFUNCTION(nix, SetModname, CBC_ORDER_LAST) modname = "NIX"; return 0; } +#endif diff --git a/qcsrc/server/mutators/mutator_overkill.qc b/qcsrc/server/mutators/mutator/mutator_overkill.qc similarity index 97% rename from qcsrc/server/mutators/mutator_overkill.qc rename to qcsrc/server/mutators/mutator/mutator_overkill.qc index 79607a1aa..ea5adbf5a 100644 --- a/qcsrc/server/mutators/mutator_overkill.qc +++ b/qcsrc/server/mutators/mutator/mutator_overkill.qc @@ -1,6 +1,17 @@ -#include "mutator_overkill.qh" +#ifdef IMPLEMENTATION +.vector ok_deathloc; +.float ok_spawnsys_timer; +.float ok_lastwep; +.float ok_item; -#include "mutator.qh" +.float ok_notice_time; +.float ammo_charge[Weapons_MAX]; +.float ok_use_ammocharge; +.float ok_ammo_charge; + +.float ok_pauseregen_finished; + +void(entity ent, float wep) ok_DecreaseCharge; void ok_Initialize(); @@ -349,3 +360,4 @@ void ok_Initialize() WEP_MACHINEGUN.mdl = "ok_mg"; WEP_VORTEX.mdl = "ok_sniper"; } +#endif diff --git a/qcsrc/server/mutators/mutator_physical_items.qc b/qcsrc/server/mutators/mutator/mutator_physical_items.qc similarity index 99% rename from qcsrc/server/mutators/mutator_physical_items.qc rename to qcsrc/server/mutators/mutator/mutator_physical_items.qc index 4bcf495f7..58a01ca2e 100644 --- a/qcsrc/server/mutators/mutator_physical_items.qc +++ b/qcsrc/server/mutators/mutator/mutator_physical_items.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(physical_items, cvar("g_physical_items")) { // check if we have a physics engine @@ -138,3 +136,4 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn) return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_pinata.qc b/qcsrc/server/mutators/mutator/mutator_pinata.qc similarity index 95% rename from qcsrc/server/mutators/mutator_pinata.qc rename to qcsrc/server/mutators/mutator/mutator_pinata.qc index a531d6bec..a806b2958 100644 --- a/qcsrc/server/mutators/mutator_pinata.qc +++ b/qcsrc/server/mutators/mutator/mutator_pinata.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(pinata, cvar("g_pinata") && !cvar("g_instagib") && !cvar("g_overkill")); MUTATOR_HOOKFUNCTION(pinata, PlayerDies) @@ -26,3 +24,4 @@ MUTATOR_HOOKFUNCTION(pinata, BuildMutatorsPrettyString) return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_random_gravity.qc b/qcsrc/server/mutators/mutator/mutator_random_gravity.qc similarity index 97% rename from qcsrc/server/mutators/mutator_random_gravity.qc rename to qcsrc/server/mutators/mutator/mutator_random_gravity.qc index 1a927648d..1b17c9f69 100644 --- a/qcsrc/server/mutators/mutator_random_gravity.qc +++ b/qcsrc/server/mutators/mutator/mutator_random_gravity.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION // Random Gravity // // Mutator by Mario @@ -48,3 +46,4 @@ MUTATOR_HOOKFUNCTION(random_gravity, BuildMutatorsPrettyString) ret_string = strcat(ret_string, ", Random gravity"); return 0; } +#endif diff --git a/qcsrc/server/mutators/mutator_rocketflying.qc b/qcsrc/server/mutators/mutator/mutator_rocketflying.qc similarity index 94% rename from qcsrc/server/mutators/mutator_rocketflying.qc rename to qcsrc/server/mutators/mutator/mutator_rocketflying.qc index 44ceeaa9e..f23d9918b 100644 --- a/qcsrc/server/mutators/mutator_rocketflying.qc +++ b/qcsrc/server/mutators/mutator/mutator_rocketflying.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(rocketflying, cvar("g_rocket_flying")); MUTATOR_HOOKFUNCTION(rocketflying, EditProjectile) @@ -24,3 +22,4 @@ MUTATOR_HOOKFUNCTION(rocketflying, BuildMutatorsPrettyString) ret_string = strcat(ret_string, ", Rocket Flying"); return 0; } +#endif diff --git a/qcsrc/server/mutators/mutator_rocketminsta.qc b/qcsrc/server/mutators/mutator/mutator_rocketminsta.qc similarity index 88% rename from qcsrc/server/mutators/mutator_rocketminsta.qc rename to qcsrc/server/mutators/mutator/mutator_rocketminsta.qc index b7319cf3e..f8a1709da 100644 --- a/qcsrc/server/mutators/mutator_rocketminsta.qc +++ b/qcsrc/server/mutators/mutator/mutator_rocketminsta.qc @@ -1,5 +1,6 @@ -#include "../../common/deathtypes/all.qh" -#include "../round_handler.qh" +#ifdef IMPLEMENTATION +#include "../../../common/deathtypes/all.qh" +#include "../../round_handler.qh" REGISTER_MUTATOR(rm, cvar("g_instagib")); @@ -31,3 +32,4 @@ MUTATOR_HOOKFUNCTION(rm, PlayerDies) return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_spawn_near_teammate.qc b/qcsrc/server/mutators/mutator/mutator_spawn_near_teammate.qc similarity index 99% rename from qcsrc/server/mutators/mutator_spawn_near_teammate.qc rename to qcsrc/server/mutators/mutator/mutator_spawn_near_teammate.qc index 3bc1f7b3d..24147b279 100644 --- a/qcsrc/server/mutators/mutator_spawn_near_teammate.qc +++ b/qcsrc/server/mutators/mutator/mutator_spawn_near_teammate.qc @@ -1,6 +1,4 @@ - -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(spawn_near_teammate, cvar("g_spawn_near_teammate") && teamplay); .entity msnt_lookat; @@ -166,3 +164,4 @@ MUTATOR_HOOKFUNCTION(spawn_near_teammate, GetCvars) GetCvars_handleFloat(get_cvars_s, get_cvars_f, cvar_cl_spawn_near_teammate, "cl_spawn_near_teammate"); return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_superspec.qc b/qcsrc/server/mutators/mutator/mutator_superspec.qc similarity index 99% rename from qcsrc/server/mutators/mutator_superspec.qc rename to qcsrc/server/mutators/mutator/mutator_superspec.qc index 8f1060371..f24b32335 100644 --- a/qcsrc/server/mutators/mutator_superspec.qc +++ b/qcsrc/server/mutators/mutator/mutator_superspec.qc @@ -1,5 +1,4 @@ -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(superspec, cvar("g_superspectate")); #define _SSMAGIX "SUPERSPEC_OPTIONSFILE_V1" @@ -478,3 +477,4 @@ MUTATOR_HOOKFUNCTION(superspec, ClientDisconnect) superspec_save_client_conf(); return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_touchexplode.qc b/qcsrc/server/mutators/mutator/mutator_touchexplode.qc similarity index 97% rename from qcsrc/server/mutators/mutator_touchexplode.qc rename to qcsrc/server/mutators/mutator/mutator_touchexplode.qc index ba90bedbb..29d9a2c60 100644 --- a/qcsrc/server/mutators/mutator_touchexplode.qc +++ b/qcsrc/server/mutators/mutator/mutator_touchexplode.qc @@ -1,5 +1,4 @@ -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(touchexplode, cvar("g_touchexplode")); .float touchexplode_time; @@ -41,3 +40,4 @@ MUTATOR_HOOKFUNCTION(touchexplode, PlayerPreThink) return false; } +#endif diff --git a/qcsrc/server/mutators/mutator_vampire.qc b/qcsrc/server/mutators/mutator/mutator_vampire.qc similarity index 95% rename from qcsrc/server/mutators/mutator_vampire.qc rename to qcsrc/server/mutators/mutator/mutator_vampire.qc index d06b0eed5..315da7dc6 100644 --- a/qcsrc/server/mutators/mutator_vampire.qc +++ b/qcsrc/server/mutators/mutator/mutator_vampire.qc @@ -1,5 +1,4 @@ -#include "mutator.qh" - +#ifdef IMPLEMENTATION REGISTER_MUTATOR(vampire, cvar("g_vampire") && !cvar("g_instagib")); MUTATOR_HOOKFUNCTION(vampire, PlayerDamage_SplitHealthArmor) @@ -26,3 +25,4 @@ MUTATOR_HOOKFUNCTION(vampire, BuildMutatorsPrettyString) ret_string = strcat(ret_string, ", Vampire"); return 0; } +#endif diff --git a/qcsrc/server/mutators/mutator_vampirehook.qc b/qcsrc/server/mutators/mutator/mutator_vampirehook.qc similarity index 97% rename from qcsrc/server/mutators/mutator_vampirehook.qc rename to qcsrc/server/mutators/mutator/mutator_vampirehook.qc index 3d88a9015..f669f6a96 100644 --- a/qcsrc/server/mutators/mutator_vampirehook.qc +++ b/qcsrc/server/mutators/mutator/mutator_vampirehook.qc @@ -1,3 +1,4 @@ +#ifdef IMPLEMENTATION REGISTER_MUTATOR(vh, cvar("g_vampirehook")); bool autocvar_g_vampirehook_teamheal; @@ -34,3 +35,4 @@ MUTATOR_HOOKFUNCTION(vh, GrappleHookThink) return false; } +#endif diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/mutator/sandbox.qc similarity index 99% rename from qcsrc/server/mutators/sandbox.qc rename to qcsrc/server/mutators/mutator/sandbox.qc index c61199510..caa87a0bb 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/mutator/sandbox.qc @@ -1,5 +1,4 @@ -#include "mutator.qh" - +#ifdef IMPLEMENTATION float autosave_time; void sandbox_Database_Load(); @@ -832,3 +831,4 @@ MUTATOR_HOOKFUNCTION(sandbox, SetModname) modname = "Sandbox"; return true; } +#endif diff --git a/qcsrc/server/mutators/mutator_buffs.qh b/qcsrc/server/mutators/mutator_buffs.qh deleted file mode 100644 index 10d84ef4e..000000000 --- a/qcsrc/server/mutators/mutator_buffs.qh +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef MUTATOR_BUFFS_H -#define MUTATOR_BUFFS_H - -// buff specific variables \\ -// -// ammo -.float buff_ammo_prev_infitems; -.int buff_ammo_prev_clipload; -// invisible -.float buff_invisible_prev_alpha; -// flight -.float buff_flight_prev_gravity; -// disability -.float buff_disability_time; -.float buff_disability_effect_time; -// common buff variables -.float buff_effect_delay; - -// buff definitions -.float buff_active; -.float buff_activetime; -.float buff_activetime_updated; -.entity buff_waypoint; -.int oldbuffs; // for updating effects -.entity buff_model; // controls effects (TODO: make csqc) - -const vector BUFF_MIN = ('-16 -16 -20'); -const vector BUFF_MAX = ('16 16 20'); - -// client side options -.float cvar_cl_buffs_autoreplace; -#endif diff --git a/qcsrc/server/mutators/mutator_dodging.qh b/qcsrc/server/mutators/mutator_dodging.qh deleted file mode 100644 index a8fd66563..000000000 --- a/qcsrc/server/mutators/mutator_dodging.qh +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef MUTATOR_DODGING_H -#define MUTATOR_DODGING_H - -float g_dodging; - -// set to 1 to indicate dodging has started.. reset by physics hook after dodge has been done.. -.float dodging_action; - -// the jump part of the dodge cannot be ramped -.float dodging_single_action; -#endif diff --git a/qcsrc/server/mutators/mutator_nades.qh b/qcsrc/server/mutators/mutator_nades.qh deleted file mode 100644 index 8f571b828..000000000 --- a/qcsrc/server/mutators/mutator_nades.qh +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef MUTATOR_NADES_H -#define MUTATOR_NADES_H - -.entity nade; -.entity fake_nade; -.float nade_timer; -.float nade_refire; -.float bonus_nades; -.float nade_special_time; -.float bonus_nade_score; -.float nade_type; -.string pokenade_type; -.entity nade_damage_target; -.float cvar_cl_nade_type; -.string cvar_cl_pokenade_type; -.float toss_time; -.float stat_healing_orb; -.float stat_healing_orb_alpha; -.float nade_show_particles; - -// Remove nades that are being thrown -void(entity player) nades_Clear; - -// Give a bonus grenade to a player -void(entity player, float score) nades_GiveBonus; -// Remove all bonus nades from a player -void(entity player) nades_RemoveBonus; -#endif diff --git a/qcsrc/server/mutators/mutator_overkill.qh b/qcsrc/server/mutators/mutator_overkill.qh deleted file mode 100644 index 10f89c08e..000000000 --- a/qcsrc/server/mutators/mutator_overkill.qh +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MUTATOR_OVERKILL_H -#define MUTATOR_OVERKILL_H - -.vector ok_deathloc; -.float ok_spawnsys_timer; -.float ok_lastwep; -.float ok_item; - -.float ok_notice_time; -.float ammo_charge[Weapons_MAX]; -.float ok_use_ammocharge; -.float ok_ammo_charge; - -.float ok_pauseregen_finished; - -void(entity ent, float wep) ok_DecreaseCharge; - -#endif diff --git a/qcsrc/server/mutators/mutators_include.qh b/qcsrc/server/mutators/mutators_include.qh deleted file mode 100644 index fa91a83f3..000000000 --- a/qcsrc/server/mutators/mutators_include.qh +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef MUTATORS_INCLUDE_H -#define MUTATORS_INCLUDE_H - -#include "../../common/mutators/base.qh" - -#include "gamemode_assault.qh" -#include "gamemode_ca.qh" -#include "gamemode_ctf.qh" -#include "gamemode_cts.qh" -#include "gamemode_domination.qh" -#include "gamemode_invasion.qh" -#include "gamemode_keepaway.qh" -#include "gamemode_keyhunt.qh" -#include "gamemode_lms.qh" -#include "gamemode_onslaught.qh" -#include "gamemode_race.qh" - -#include "mutator_buffs.qh" -#include "mutator_dodging.qh" -#include "mutator_nades.qh" -#include "mutator_overkill.qh" -#endif diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index ca6442f97..9b1d7194f 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -1,7 +1,7 @@ #include "portals.qh" #include "g_hook.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "../common/constants.qh" #include "../common/deathtypes/all.qh" #include "../common/notifications.qh" diff --git a/qcsrc/server/progs.inc b/qcsrc/server/progs.inc index 37946e38c..ab94c42bd 100644 --- a/qcsrc/server/progs.inc +++ b/qcsrc/server/progs.inc @@ -43,7 +43,7 @@ #include "command/all.qc" -#include "mutators/mutators_include.qc" +#include "mutators/all.qc" #include "pathlib/_all.inc" diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 2279e649d..678baec95 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -1,7 +1,7 @@ #include "scores.qh" #include "command/common.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "../common/playerstats.qh" #include "../common/teams.qh" diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 5ad02707b..a1abfa58f 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -1,6 +1,6 @@ #include "spawnpoints.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "g_world.qh" #include "race.qh" #include "../common/constants.qh" diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 0a9d8f210..5fc3f771a 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -8,7 +8,7 @@ #include "command/common.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "weapons/csqcprojectile.qh" #include "../common/constants.qh" diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index a640cce10..8cde49cbd 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -7,7 +7,7 @@ #include "bot/bot.qh" #include "bot/waypoints.qh" - #include "mutators/mutators_include.qh" + #include "mutators/all.qh" #include "weapons/common.qh" #include "weapons/selection.qh" diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 253697905..2f2bf5454 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -9,7 +9,7 @@ #include "command/vote.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "../common/deathtypes/all.qh" #include "../common/gamemodes/all.qh" diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index baa95c649..7d1633f7f 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -1,6 +1,6 @@ #include "accuracy.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" #include "../../common/constants.qh" #include "../../common/teams.qh" #include "../../common/util.qh" diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index be2ca6b50..995154509 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -1,7 +1,7 @@ #include "spawning.qh" #include "weaponsystem.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" #include "../t_items.qh" #include "../../common/weapons/all.qh" diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 4c6b99a50..9e1b3e4dc 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -1,7 +1,7 @@ #include "throwing.qh" #include "weaponsystem.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" #include "../t_items.qh" #include "../g_damage.qh" #include "../../common/items/item.qh" diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index dd7e2b599..8b0997bec 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -3,7 +3,7 @@ #include "selection.qh" #include "../command/common.qh" -#include "../mutators/mutators_include.qh" +#include "../mutators/all.qh" #include "../round_handler.qh" #include "../t_items.qh" #include "../../common/animdecide.qh" -- 2.39.2