From: Mario Date: Sun, 2 Aug 2020 09:12:13 +0000 (+1000) Subject: Purge server/defs.qh X-Git-Tag: xonotic-v0.8.5~799 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=76afe6b4bb64b3f349bcf8aeadd04d0b319a7d01;p=xonotic%2Fxonotic-data.pk3dir.git Purge server/defs.qh --- diff --git a/qcsrc/common/animdecide.qc b/qcsrc/common/animdecide.qc index 69fe45826..136e4d436 100644 --- a/qcsrc/common/animdecide.qc +++ b/qcsrc/common/animdecide.qc @@ -4,7 +4,8 @@ #if defined(SVQC) #include "util.qh" - #include "../server/defs.qh" + #include + #include #endif bool monsters_animoverride(entity this) diff --git a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc index 09d93edf0..3915429d6 100644 --- a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc +++ b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc b/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc index 34c7b26c2..22d021cf5 100644 --- a/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc +++ b/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc @@ -5,6 +5,7 @@ #include #include #include +#include #include float autocvar_g_cts_finish_kill_delay; diff --git a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc index 2825bbcce..410d07e8f 100644 --- a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc +++ b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc b/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc index 9bccb31a1..09be394fb 100644 --- a/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc +++ b/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc index 63f1d24d6..6ce13f2e9 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc @@ -4,6 +4,7 @@ #include #include #include +#include .entity ballcarried; diff --git a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc index dd702cb5f..5e098c67c 100644 --- a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc +++ b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc @@ -3,6 +3,7 @@ #include #include #include +#include #include float autocvar_g_balance_keyhunt_damageforcescale; diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index ece18a32e..6bb2387dd 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -2,6 +2,7 @@ #include "sv_controlpoint.qh" #include "sv_generator.qh" +#include #include #include #include diff --git a/qcsrc/common/mapobjects/func/ladder.qh b/qcsrc/common/mapobjects/func/ladder.qh index e087ba841..73542ae45 100644 --- a/qcsrc/common/mapobjects/func/ladder.qh +++ b/qcsrc/common/mapobjects/func/ladder.qh @@ -3,4 +3,9 @@ IntrusiveList g_ladderents; STATIC_INIT(g_ladderents) { g_ladderents = IL_NEW(); } +#ifdef SVQC +IntrusiveList g_ladders; +STATIC_INIT(g_ladders) { g_ladders = IL_NEW(); } +#endif + .entity ladder_entity; diff --git a/qcsrc/common/mapobjects/misc/dynlight.qc b/qcsrc/common/mapobjects/misc/dynlight.qc index 6e9f02b87..96d99b592 100644 --- a/qcsrc/common/mapobjects/misc/dynlight.qc +++ b/qcsrc/common/mapobjects/misc/dynlight.qc @@ -1,7 +1,8 @@ #include "dynlight.qh" #ifdef SVQC -#include +#include +#include #include const float LOOP = 1; diff --git a/qcsrc/common/mapobjects/models.qc b/qcsrc/common/mapobjects/models.qc index c70effedb..6b272d1b1 100644 --- a/qcsrc/common/mapobjects/models.qc +++ b/qcsrc/common/mapobjects/models.qc @@ -1,7 +1,8 @@ #include "models.qh" #ifdef SVQC -#include +#include +#include #include #include #include "subs.qh" diff --git a/qcsrc/common/mapobjects/target/location.qh b/qcsrc/common/mapobjects/target/location.qh index 6f70f09be..4388ad6db 100644 --- a/qcsrc/common/mapobjects/target/location.qh +++ b/qcsrc/common/mapobjects/target/location.qh @@ -1 +1,6 @@ #pragma once + +#ifdef SVQC +IntrusiveList g_locations; +STATIC_INIT(g_locations) { g_locations = IL_NEW(); } +#endif diff --git a/qcsrc/common/mapobjects/target/music.qc b/qcsrc/common/mapobjects/target/music.qc index 55ccf41fb..37ec30d64 100644 --- a/qcsrc/common/mapobjects/target/music.qc +++ b/qcsrc/common/mapobjects/target/music.qc @@ -5,7 +5,8 @@ #include #include #include - #include + #include + #include #endif REGISTER_NET_TEMP(TE_CSQC_TARGET_MUSIC) diff --git a/qcsrc/common/mapobjects/target/spawn.qc b/qcsrc/common/mapobjects/target/spawn.qc index 8eaab68ba..0c607934c 100644 --- a/qcsrc/common/mapobjects/target/spawn.qc +++ b/qcsrc/common/mapobjects/target/spawn.qc @@ -3,7 +3,8 @@ #elif defined(MENUQC) #elif defined(SVQC) #include - #include + #include + #include #include #endif diff --git a/qcsrc/common/mapobjects/teleporters.qc b/qcsrc/common/mapobjects/teleporters.qc index 11cdf3bdd..24b7fb99c 100644 --- a/qcsrc/common/mapobjects/teleporters.qc +++ b/qcsrc/common/mapobjects/teleporters.qc @@ -12,7 +12,8 @@ #include #include #include - #include + #include + #include #include "../deathtypes/all.qh" #include #include "../turrets/sv_turrets.qh" diff --git a/qcsrc/common/mapobjects/trigger/secret.qc b/qcsrc/common/mapobjects/trigger/secret.qc index e1b1e5531..d1277c87b 100644 --- a/qcsrc/common/mapobjects/trigger/secret.qc +++ b/qcsrc/common/mapobjects/trigger/secret.qc @@ -3,7 +3,8 @@ #elif defined(MENUQC) #elif defined(SVQC) #include - #include + #include + #include #endif #ifdef SVQC diff --git a/qcsrc/common/mapobjects/trigger/swamp.qc b/qcsrc/common/mapobjects/trigger/swamp.qc index 495deb798..3aa6134a9 100644 --- a/qcsrc/common/mapobjects/trigger/swamp.qc +++ b/qcsrc/common/mapobjects/trigger/swamp.qc @@ -4,7 +4,8 @@ #elif defined(SVQC) #include #include - #include + #include + #include #include #endif diff --git a/qcsrc/common/mapobjects/trigger/viewloc.qc b/qcsrc/common/mapobjects/trigger/viewloc.qc index b9b63b823..c8c083611 100644 --- a/qcsrc/common/mapobjects/trigger/viewloc.qc +++ b/qcsrc/common/mapobjects/trigger/viewloc.qc @@ -4,7 +4,8 @@ #elif defined(SVQC) #include #include - #include + #include + #include #endif REGISTER_NET_LINKED(ENT_CLIENT_VIEWLOC) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 768e94b83..46bb1593a 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -8,7 +8,8 @@ #include "../physics/movelib.qh" #include "../weapons/_mod.qh" #include -#include +#include +#include #include #include "../deathtypes/all.qh" #include diff --git a/qcsrc/common/monsters/sv_monsters.qh b/qcsrc/common/monsters/sv_monsters.qh index 755abaaf2..b6cab12b6 100644 --- a/qcsrc/common/monsters/sv_monsters.qh +++ b/qcsrc/common/monsters/sv_monsters.qh @@ -1,5 +1,7 @@ #pragma once +#include "all.qh" + // stats networking int monsters_total; int monsters_killed; @@ -110,3 +112,9 @@ ALLMONSTERSOUNDS #undef _MSOUND float GetMonsterSoundSampleField_notFound; + +IntrusiveList g_monsters; +STATIC_INIT(g_monsters) { g_monsters = IL_NEW(); } + +IntrusiveList g_monster_targets; +STATIC_INIT(g_monster_targets) { g_monster_targets = IL_NEW(); } diff --git a/qcsrc/common/monsters/sv_spawn.qc b/qcsrc/common/monsters/sv_spawn.qc index 5b4e9a206..4cdfb24e4 100644 --- a/qcsrc/common/monsters/sv_spawn.qc +++ b/qcsrc/common/monsters/sv_spawn.qc @@ -6,7 +6,8 @@ #include "all.qh" #include "sv_monsters.qh" #include - #include + #include + #include #include #endif entity spawnmonster (entity e, string monster, Monster monster_id, entity spawnedby, entity own, vector orig, bool respwn, bool removeifinvalid, int moveflag) diff --git a/qcsrc/common/monsters/sv_spawner.qc b/qcsrc/common/monsters/sv_spawner.qc index d12ee2bc6..98222f6ac 100644 --- a/qcsrc/common/monsters/sv_spawner.qc +++ b/qcsrc/common/monsters/sv_spawner.qc @@ -1,3 +1,4 @@ +#include "sv_monsters.qh" #include "sv_spawner.qh" #include "sv_spawn.qh" diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index 0eda60661..29828a094 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -2,6 +2,7 @@ #include #include +#include #include void buffs_DelayedInit(entity this); diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 129c42d47..d91e16f47 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -7,7 +7,7 @@ #include #include #include "../server/anticheat.qh" - #include "../server/defs.qh" + #include #include "../server/scores.qh" #include #include "../server/weapons/accuracy.qh" diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index 20af4197c..84b0c8249 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -1,6 +1,7 @@ #include "sv_turrets.qh" #ifdef SVQC #include +#include #include #include #include diff --git a/qcsrc/common/turrets/sv_turrets.qh b/qcsrc/common/turrets/sv_turrets.qh index f7b14b0a6..5191940b1 100644 --- a/qcsrc/common/turrets/sv_turrets.qh +++ b/qcsrc/common/turrets/sv_turrets.qh @@ -103,3 +103,6 @@ vector tvt_thadv; // turret head angle diff vector, updated by a successful call vector tvt_tadv; // turret angle diff vector, updated by a successful call to turret_validate_target float tvt_thadf; // turret head angle diff float, updated by a successful call to turret_validate_target float tvt_dist; // turret distance, updated by a successful call to turret_validate_target + +IntrusiveList g_turrets; +STATIC_INIT(g_turrets) { g_turrets = IL_NEW(); } diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index ed3947b53..590aba88a 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -1,5 +1,6 @@ #include "sv_vehicles.qh" +#include #include #include #include @@ -1217,10 +1218,7 @@ bool vehicle_initialize(entity this, Vehicle info, bool nodrop) return false; if(!this.tur_head) - { info.vr_precache(info); - IL_PUSH(g_vehicles, this); - } if(this.targetname && this.targetname != "") { diff --git a/qcsrc/common/viewloc.qc b/qcsrc/common/viewloc.qc index c3d70fc50..d4f1a54a8 100644 --- a/qcsrc/common/viewloc.qc +++ b/qcsrc/common/viewloc.qc @@ -6,7 +6,8 @@ #include "constants.qh" #elif defined(MENUQC) #elif defined(SVQC) - #include "../server/defs.qh" + #include + #include #endif // client movement diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 8d6bb9d01..092ef4d1e 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -35,7 +35,6 @@ #include #include #include - #include #include "../notifications/all.qh" #include "../deathtypes/all.qh" #include diff --git a/qcsrc/common/weapons/weapon/minelayer.qh b/qcsrc/common/weapons/weapon/minelayer.qh index b822eee68..dc79d74ac 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qh +++ b/qcsrc/common/weapons/weapon/minelayer.qh @@ -63,4 +63,7 @@ void W_MineLayer_Think(entity this); .float minelayer_detonate, mine_explodeanyway; .float mine_time; .vector mine_orientation; + +IntrusiveList g_mines; +STATIC_INIT(g_mines) { g_mines = IL_NEW(); } #endif diff --git a/qcsrc/lib/warpzone/server.qc b/qcsrc/lib/warpzone/server.qc index 0487c6176..ee70983f8 100644 --- a/qcsrc/lib/warpzone/server.qc +++ b/qcsrc/lib/warpzone/server.qc @@ -10,7 +10,8 @@ #include #include #include - #include + #include + #include #include #endif diff --git a/qcsrc/server/anticheat.qc b/qcsrc/server/anticheat.qc index be517fe23..c0d1cc10e 100644 --- a/qcsrc/server/anticheat.qc +++ b/qcsrc/server/anticheat.qc @@ -2,7 +2,8 @@ #include "antilag.qh" #include "autocvars.qh" -#include "defs.qh" +#include +#include #include #include #include diff --git a/qcsrc/server/antilag.qc b/qcsrc/server/antilag.qc index 93ca6acf9..d116bc109 100644 --- a/qcsrc/server/antilag.qc +++ b/qcsrc/server/antilag.qc @@ -2,8 +2,11 @@ #if defined(CSQC) #elif defined(MENUQC) #elif defined(SVQC) - #include + #include + #include + #include #include + #include #include #include #include "antilag.qh" diff --git a/qcsrc/server/bot/api.qh b/qcsrc/server/bot/api.qh index 873c2ac62..5ee3963cb 100644 --- a/qcsrc/server/bot/api.qh +++ b/qcsrc/server/bot/api.qh @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include #include @@ -143,3 +144,13 @@ void waypoint_lock(entity pl); void waypoint_getSymmetricalOrigin_cmd(entity caller, bool save, int arg_idx); void waypoint_getSymmetricalAxis_cmd(entity caller, bool save, int arg_idx); + +IntrusiveList g_waypoints; +IntrusiveList g_bot_targets; +IntrusiveList g_bot_dodge; +STATIC_INIT(botapi) +{ + g_waypoints = IL_NEW(); + g_bot_targets = IL_NEW(); + g_bot_dodge = IL_NEW(); +} diff --git a/qcsrc/server/bot/default/aim.qc b/qcsrc/server/bot/default/aim.qc index 21506d075..fc6755fb0 100644 --- a/qcsrc/server/bot/default/aim.qc +++ b/qcsrc/server/bot/default/aim.qc @@ -1,6 +1,7 @@ #include "aim.qh" -#include +#include +#include #include "cvars.qh" diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 9462339a2..9d526b74d 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -17,7 +17,7 @@ #include "../../campaign.qh" #include "../../client.qh" #include "../../constants.qh" -#include "../../defs.qh" +#include #include #include #include "../../race.qh" diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 341ba7ac6..f6917bdb4 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -2,9 +2,12 @@ #include "roles.qh" +#include #include -#include +#include +#include #include +#include #include #include #include diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index 33d6ec1e7..9c95fb87b 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -1,6 +1,7 @@ #include "roles.qh" -#include +#include +#include #include #include #include diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 4b65a69cc..cf7cd99c2 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -1,6 +1,8 @@ #include "navigation.qh" -#include +#include +#include +#include #include #include "cvars.qh" diff --git a/qcsrc/server/bot/default/scripting.qc b/qcsrc/server/bot/default/scripting.qc index 65935cd68..94c849650 100644 --- a/qcsrc/server/bot/default/scripting.qc +++ b/qcsrc/server/bot/default/scripting.qc @@ -1,6 +1,7 @@ #include "scripting.qh" -#include +#include +#include #include #include #include diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index b4e6df09c..a9069a0b1 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -1,7 +1,10 @@ #include "waypoints.qh" -#include +#include +#include +#include #include +#include #include "cvars.qh" #include "bot.qh" diff --git a/qcsrc/server/campaign.qc b/qcsrc/server/campaign.qc index 784288a6e..92d183a45 100644 --- a/qcsrc/server/campaign.qc +++ b/qcsrc/server/campaign.qc @@ -1,6 +1,7 @@ #include "campaign.qh" -#include "defs.qh" +#include +#include #include "cheats.qh" #include "miscfunctions.qh" diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 1c9d0b880..dc41fac73 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -1,6 +1,7 @@ #include "cheats.qh" -#include +#include +#include #include #include #include diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 5c8baee6d..3707c9e48 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1,6 +1,7 @@ #include "client.qh" -#include +#include +#include #include #include #include "anticheat.qh" diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 0961e01fa..8d4afe4ba 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -356,6 +356,9 @@ void FixClientCvars(entity e); // called when a client connects, useful for updating sounds and such of static objects .void(entity this, entity player) init_for_player; +IntrusiveList g_initforplayer; +STATIC_INIT(g_initforplayer) { g_initforplayer = IL_NEW(); } + /// \brief Print the string to the client's chat. /// \param[in] client Client to print to. /// \param[in] text Text to print. diff --git a/qcsrc/server/clientkill.qc b/qcsrc/server/clientkill.qc index f3e7b52d6..600faed5a 100644 --- a/qcsrc/server/clientkill.qc +++ b/qcsrc/server/clientkill.qc @@ -1,7 +1,9 @@ #include "clientkill.qh" -#include +#include +#include #include +#include #include "g_damage.qh" #include "teamplay.qh" diff --git a/qcsrc/server/command/banning.qc b/qcsrc/server/command/banning.qc index 42de51882..962a8a1a8 100644 --- a/qcsrc/server/command/banning.qc +++ b/qcsrc/server/command/banning.qc @@ -1,6 +1,7 @@ #include "banning.qh" -#include +#include +#include #include #include #include diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 8fd39070f..48f1cd168 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -1,7 +1,8 @@ #include "common.qh" #include -#include +#include +#include #include #include diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc index 215920f24..c5a26e8c9 100644 --- a/qcsrc/server/command/getreplies.qc +++ b/qcsrc/server/command/getreplies.qc @@ -1,6 +1,7 @@ #include "getreplies.qh" -#include +#include +#include #include #include diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index b31b4ed0d..2ad5c0510 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -1,7 +1,8 @@ #include "vote.qh" #include -#include +#include +#include #include #include diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index 99f0acb3e..55068ab46 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -58,3 +58,6 @@ void ReadyCount(); void ReadyRestart_force(); void VoteCount(float first_count); void Nagger_Init(); + +IntrusiveList g_saved_team; +STATIC_INIT(g_saved_team) { g_saved_team = IL_NEW(); } diff --git a/qcsrc/server/compat/quake.qc b/qcsrc/server/compat/quake.qc index c80da0af3..d2eb785b5 100644 --- a/qcsrc/server/compat/quake.qc +++ b/qcsrc/server/compat/quake.qc @@ -1,6 +1,7 @@ #include "quake.qh" -#include +#include +#include #include #include diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 0433636d6..de97cba56 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -1,7 +1,8 @@ #include "quake3.qh" #include -#include +#include +#include #include #include #include diff --git a/qcsrc/server/compat/wop.qc b/qcsrc/server/compat/wop.qc index bd399bffd..4b7a6d31b 100644 --- a/qcsrc/server/compat/wop.qc +++ b/qcsrc/server/compat/wop.qc @@ -1,6 +1,7 @@ #include "wop.qh" -#include +#include +#include #include #include #include diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh deleted file mode 100644 index 9931513da..000000000 --- a/qcsrc/server/defs.qh +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once - -#include -#include - -//// - -IntrusiveList g_monsters; -IntrusiveList g_waypoints; -IntrusiveList g_vehicles; -IntrusiveList g_turrets; -IntrusiveList g_mines; -IntrusiveList g_projectiles; -IntrusiveList g_items; -IntrusiveList g_initforplayer; -IntrusiveList g_clones; -IntrusiveList g_spawnpoints; -IntrusiveList g_bot_targets; -IntrusiveList g_bot_dodge; -IntrusiveList g_damagedbycontents; -IntrusiveList g_railgunhit; -IntrusiveList g_ladders; -IntrusiveList g_locations; -IntrusiveList g_saved_team; -IntrusiveList g_monster_targets; -IntrusiveList g_pathlib_nodes; -IntrusiveList g_moveables; -STATIC_INIT(defs) -{ - g_monsters = IL_NEW(); - g_waypoints = IL_NEW(); - g_vehicles = IL_NEW(); - g_turrets = IL_NEW(); - g_mines = IL_NEW(); - g_projectiles = IL_NEW(); - g_items = IL_NEW(); - g_initforplayer = IL_NEW(); - g_clones = IL_NEW(); - g_spawnpoints = IL_NEW(); - g_bot_targets = IL_NEW(); - g_bot_dodge = IL_NEW(); - g_damagedbycontents = IL_NEW(); - g_railgunhit = IL_NEW(); - g_ladders = IL_NEW(); - g_locations = IL_NEW(); - g_saved_team = IL_NEW(); - g_monster_targets = IL_NEW(); - g_pathlib_nodes = IL_NEW(); - g_moveables = IL_NEW(); -} diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index fb2120db1..2348c7ad6 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -3,7 +3,8 @@ #if defined(CSQC) #elif defined(MENUQC) #elif defined(SVQC) - #include + #include + #include #include #include #include @@ -16,7 +17,6 @@ #include "weapons/selection.qh" #include "autocvars.qh" #include "constants.qh" - #include "defs.qh" #include #include #include @@ -158,3 +158,6 @@ float Fire_AddDamage(entity e, entity o, float d, float t, float dt); void Fire_ApplyDamage(entity e); void Fire_ApplyEffect(entity e); + +IntrusiveList g_damagedbycontents; +STATIC_INIT(g_damagedbycontents) { g_damagedbycontents = IL_NEW(); } diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 79572f63b..57947200a 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -1,6 +1,8 @@ #include "g_hook.qh" -#include +#include +#include +#include #include #include #include diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 9f78b6750..e258e351a 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -22,6 +22,7 @@ #include "spawnpoints.qh" #include "teamplay.qh" #include "weapons/weaponstats.qh" +#include #include "../common/constants.qh" #include #include "../common/deathtypes/all.qh" diff --git a/qcsrc/server/g_world.qh b/qcsrc/server/g_world.qh index f99619208..3bbaad682 100644 --- a/qcsrc/server/g_world.qh +++ b/qcsrc/server/g_world.qh @@ -60,3 +60,6 @@ void Map_MarkAsRecent(string m); float DoNextMapOverride(float reinit); void CheckRules_World(); float RedirectionThink(); + +IntrusiveList g_moveables; +STATIC_INIT(g_moveables) { g_moveables = IL_NEW(); } diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index a7786f6b6..bb19b0c70 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -1,10 +1,10 @@ #include "ipban.qh" -#include +#include +#include #include #include "autocvars.qh" #include "command/banning.qh" -#include "defs.qh" #include "../common/constants.qh" #include "../common/util.qh" diff --git a/qcsrc/server/items/items.qh b/qcsrc/server/items/items.qh index 41d901f0d..8dbb47283 100644 --- a/qcsrc/server/items/items.qh +++ b/qcsrc/server/items/items.qh @@ -109,3 +109,6 @@ spawnfunc(target_items); #define POSTGIVE_VALUE_ROT(e,f,t,rotfield,rottime,regenfield,regentime,snd_incr,snd_decr) GiveRot((e), save_##f, (e).f, rotfield, rottime, regenfield, regentime); GiveSound((e), save_##f, (e).f, t, snd_incr, snd_decr) float GiveItems(entity e, float beginarg, float endarg); + +IntrusiveList g_items; +STATIC_INIT(g_items) { g_items = IL_NEW(); } diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index 8d747e254..2286b60a4 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -1,7 +1,8 @@ #include "mapvoting.qh" #include -#include +#include +#include #include #include #include "g_world.qh" diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index a2409290f..45cb058d8 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -11,6 +11,7 @@ #include "ipban.qh" #include #include +#include #include #include "mapvoting.qh" #include "resources.qh" @@ -31,6 +32,7 @@ #include "../common/teams.qh" #include "../common/mapobjects/subs.qh" #include +#include #include "../common/util.qh" #include "../common/turrets/sv_turrets.qh" #include diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index aab5081d5..6d317a71c 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include #include diff --git a/qcsrc/server/mutators/loader.qc b/qcsrc/server/mutators/loader.qc index 7c20b3729..f15098766 100644 --- a/qcsrc/server/mutators/loader.qc +++ b/qcsrc/server/mutators/loader.qc @@ -1,6 +1,7 @@ #include "loader.qh" -#include +#include +#include #include STATIC_INIT_LATE(Gametype) { diff --git a/qcsrc/server/pathlib/main.qc b/qcsrc/server/pathlib/main.qc index 4cb8a3806..b42e5ef68 100644 --- a/qcsrc/server/pathlib/main.qc +++ b/qcsrc/server/pathlib/main.qc @@ -1,6 +1,7 @@ #include "main.qh" -#include +#include +#include #include #include "pathlib.qh" #include "utility.qh" diff --git a/qcsrc/server/pathlib/movenode.qc b/qcsrc/server/pathlib/movenode.qc index 796581767..06568ae0d 100644 --- a/qcsrc/server/pathlib/movenode.qc +++ b/qcsrc/server/pathlib/movenode.qc @@ -1,7 +1,8 @@ #include "movenode.qh" #include -#include +#include +#include #include #include "pathlib.qh" #include "utility.qh" diff --git a/qcsrc/server/pathlib/pathlib.qh b/qcsrc/server/pathlib/pathlib.qh index da07e93aa..edfb98b2a 100644 --- a/qcsrc/server/pathlib/pathlib.qh +++ b/qcsrc/server/pathlib/pathlib.qh @@ -105,3 +105,6 @@ var bool pathlib_makenode(entity parent,vector start, vector to, vector goal,fl var bool buildpath_nodefilter(vector n,vector c,vector p); var float pathlib_wpp_waypointcallback(entity wp, entity wp_prev); + +IntrusiveList g_pathlib_nodes; +STATIC_INIT(g_pathlib_nodes) { g_pathlib_nodes = IL_NEW(); } diff --git a/qcsrc/server/pathlib/utility.qc b/qcsrc/server/pathlib/utility.qc index 151fb44b5..51d3f65c9 100644 --- a/qcsrc/server/pathlib/utility.qc +++ b/qcsrc/server/pathlib/utility.qc @@ -1,6 +1,7 @@ #include "utility.qh" -#include +#include +#include #include #include "pathlib.qh" diff --git a/qcsrc/server/player.qh b/qcsrc/server/player.qh index aa1f6dcf2..86433d456 100644 --- a/qcsrc/server/player.qh +++ b/qcsrc/server/player.qh @@ -20,3 +20,6 @@ void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float da void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force); bool PlayerHeal(entity targ, entity inflictor, float amount, float limit); + +IntrusiveList g_clones; +STATIC_INIT(g_clones) { g_clones = IL_NEW(); } diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 4190c208e..7b99d916a 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -1,6 +1,7 @@ #include "race.qh" -#include +#include +#include #include #include #include diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index d9cea92db..18bb5f76c 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -1,7 +1,7 @@ #include "scores.qh" #include "command/common.qh" -#include "defs.qh" +#include #include "client.qh" #include #include diff --git a/qcsrc/server/scores_rules.qc b/qcsrc/server/scores_rules.qc index 39dbd49a3..7511162aa 100644 --- a/qcsrc/server/scores_rules.qc +++ b/qcsrc/server/scores_rules.qc @@ -1,6 +1,7 @@ #include "scores_rules.qh" -#include +#include +#include #include #include "client.qh" #include "scores.qh" diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index b81cb590a..9884ec75e 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -4,7 +4,8 @@ #include "g_world.qh" #include "miscfunctions.qh" #include "race.qh" -#include "defs.qh" +#include +#include #include "../common/constants.qh" #include #include "../common/teams.qh" diff --git a/qcsrc/server/spawnpoints.qh b/qcsrc/server/spawnpoints.qh index 1221db6b2..39b5492c5 100644 --- a/qcsrc/server/spawnpoints.qh +++ b/qcsrc/server/spawnpoints.qh @@ -22,3 +22,6 @@ USING(spawn_evalfunc_t, vector(entity this, entity player, entity spot, vector c .spawn_evalfunc_t spawn_evalfunc; .int restriction; + +IntrusiveList g_spawnpoints; +STATIC_INIT(g_spawnpoints) { g_spawnpoints = IL_NEW(); } diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index e43eb5320..4969c5105 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -13,6 +13,7 @@ #include #include "weapons/csqcprojectile.qh" +#include #include #include "../common/constants.qh" diff --git a/qcsrc/server/tests.qh b/qcsrc/server/tests.qh index ecd6bc57a..7124b1895 100644 --- a/qcsrc/server/tests.qh +++ b/qcsrc/server/tests.qh @@ -1,6 +1,5 @@ #pragma once -#include "defs.qh" #include "miscfunctions.qh" #include "autocvars.qh" #include "client.qh" diff --git a/qcsrc/server/weapons/accuracy.qh b/qcsrc/server/weapons/accuracy.qh index 5d10e85bd..d1665b2bd 100644 --- a/qcsrc/server/weapons/accuracy.qh +++ b/qcsrc/server/weapons/accuracy.qh @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include .bool cvar_cl_accuracy_data_share; diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index 465900e0b..4c9f78422 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -1,6 +1,7 @@ #include "common.qh" -#include +#include +#include #include #include #include diff --git a/qcsrc/server/weapons/common.qh b/qcsrc/server/weapons/common.qh index 840e6e54d..83df91eaa 100644 --- a/qcsrc/server/weapons/common.qh +++ b/qcsrc/server/weapons/common.qh @@ -33,3 +33,6 @@ const int MIF_GUIDED_TAG = BIT(7); const int MIF_GUIDED_ALL = MIF_GUIDED_MANUAL | MIF_GUIDED_HEAT | MIF_GUIDED_LASER | MIF_GUIDED_AI | MIF_GUIDED_TAG; const int MIF_GUIDED_TRACKING = MIF_GUIDED_HEAT | MIF_GUIDED_LASER | MIF_GUIDED_AI | MIF_GUIDED_TAG; const int MIF_GUIDED_CONFUSABLE = MIF_GUIDED_HEAT | MIF_GUIDED_AI; + +IntrusiveList g_projectiles; +STATIC_INIT(g_projectiles) { g_projectiles = IL_NEW(); } diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index 504bbd451..758cd51ab 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -1,6 +1,7 @@ #include "csqcprojectile.qh" -#include +#include +#include #include #include diff --git a/qcsrc/server/weapons/hitplot.qc b/qcsrc/server/weapons/hitplot.qc index a6c9da66c..eca09ebaa 100644 --- a/qcsrc/server/weapons/hitplot.qc +++ b/qcsrc/server/weapons/hitplot.qc @@ -1,7 +1,8 @@ #include "hitplot.qh" #include -#include +#include +#include #include #include #include "../antilag.qh" diff --git a/qcsrc/server/weapons/selection.qh b/qcsrc/server/weapons/selection.qh index 94987d20a..03c203f4e 100644 --- a/qcsrc/server/weapons/selection.qh +++ b/qcsrc/server/weapons/selection.qh @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include .int selectweapon; // last selected weapon of the player diff --git a/qcsrc/server/weapons/spawning.qh b/qcsrc/server/weapons/spawning.qh index d435002ad..eb40bfc40 100644 --- a/qcsrc/server/weapons/spawning.qh +++ b/qcsrc/server/weapons/spawning.qh @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include string W_Apply_Weaponreplace(string in); diff --git a/qcsrc/server/weapons/throwing.qh b/qcsrc/server/weapons/throwing.qh index 20732753e..8ebd4080c 100644 --- a/qcsrc/server/weapons/throwing.qh +++ b/qcsrc/server/weapons/throwing.qh @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include .float savenextthink; diff --git a/qcsrc/server/weapons/tracing.qh b/qcsrc/server/weapons/tracing.qh index c786798ac..67246859c 100644 --- a/qcsrc/server/weapons/tracing.qh +++ b/qcsrc/server/weapons/tracing.qh @@ -1,6 +1,7 @@ #pragma once -#include +#include +#include #include vector w_shotorg; @@ -69,6 +70,9 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p .float railgunhitsolidbackup; .vector railgunhitloc; +IntrusiveList g_railgunhit; +STATIC_INIT(g_railgunhit) { g_railgunhit = IL_NEW(); } + .float railgundistance; .vector railgunforce; void FireRailgunBullet (entity this, .entity weaponentity, vector start, vector end, float bdamage, bool headshot_notify, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype); diff --git a/qcsrc/server/weapons/weaponstats.qc b/qcsrc/server/weapons/weaponstats.qc index 296d10fa6..eadd6f4bc 100644 --- a/qcsrc/server/weapons/weaponstats.qc +++ b/qcsrc/server/weapons/weaponstats.qc @@ -1,6 +1,7 @@ #include "weaponstats.qh" -#include +#include +#include #include #include "../g_world.qh"