From: Mario Date: Sun, 2 Aug 2020 08:28:02 +0000 (+1000) Subject: Further cleanup of defs.qh X-Git-Tag: xonotic-v0.8.5~800 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=258867c634125e1d048869b4a5d8ef279e8b8228;p=xonotic%2Fxonotic-data.pk3dir.git Further cleanup of defs.qh --- diff --git a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc index ca92bc622..09d93edf0 100644 --- a/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc +++ b/qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc @@ -2,7 +2,9 @@ #include #include +#include #include +#include #include .entity sprite; diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index e4256c68f..ec296a9c9 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -2,8 +2,10 @@ #include #include +#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 991423a49..34c7b26c2 100644 --- a/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc +++ b/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc @@ -1,9 +1,11 @@ #include "sv_cts.qh" +#include #include #include #include #include +#include float autocvar_g_cts_finish_kill_delay; bool autocvar_g_cts_selfdamage; diff --git a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc index 88e20af00..2825bbcce 100644 --- a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc +++ b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc @@ -1,9 +1,12 @@ #include "sv_domination.qh" +#include #include +#include #include #include #include +#include bool g_domination; diff --git a/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc b/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc index a21504050..9bccb31a1 100644 --- a/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc +++ b/qcsrc/common/gamemodes/gamemode/invasion/sv_invasion.qc @@ -1,9 +1,11 @@ #include "sv_invasion.qh" +#include #include #include #include +#include #include IntrusiveList g_invasion_roundends; diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc index 0066af451..63f1d24d6 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc @@ -1,6 +1,7 @@ #include "sv_keepaway.qh" #include +#include #include #include diff --git a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc index df538cbe4..dd702cb5f 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 float autocvar_g_balance_keyhunt_damageforcescale; float autocvar_g_balance_keyhunt_delay_collect; diff --git a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc index 5af604433..a206fcbde 100644 --- a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc +++ b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc @@ -3,6 +3,7 @@ #include #include #include +#include #include int autocvar_g_lms_extra_lives; diff --git a/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qc index 2144a0008..ba5911272 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qc @@ -1,8 +1,10 @@ #include "sv_nexball.qh" +#include #include #include #include +#include .entity ballcarried; diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index 975c1192f..ece18a32e 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -6,6 +6,7 @@ #include #include #include +#include bool g_onslaught; diff --git a/qcsrc/common/gamemodes/gamemode/race/sv_race.qc b/qcsrc/common/gamemodes/gamemode/race/sv_race.qc index 8761e26f7..f56353d01 100644 --- a/qcsrc/common/gamemodes/gamemode/race/sv_race.qc +++ b/qcsrc/common/gamemodes/gamemode/race/sv_race.qc @@ -1,9 +1,11 @@ #include "sv_race.qh" +#include #include #include #include #include +#include #define autocvar_g_race_laps_limit cvar("g_race_laps_limit") float autocvar_g_race_qualifying_timelimit; diff --git a/qcsrc/common/items/item.qh b/qcsrc/common/items/item.qh index 02151e307..5c6ec494a 100644 --- a/qcsrc/common/items/item.qh +++ b/qcsrc/common/items/item.qh @@ -56,6 +56,8 @@ const int ITS_GLOW = BIT(6); .float fade_start; .float fade_end; + +.string mdl; #endif #ifdef SVQC diff --git a/qcsrc/common/mapobjects/trigger/viewloc.qc b/qcsrc/common/mapobjects/trigger/viewloc.qc index 354d36cb7..b9b63b823 100644 --- a/qcsrc/common/mapobjects/trigger/viewloc.qc +++ b/qcsrc/common/mapobjects/trigger/viewloc.qc @@ -3,6 +3,7 @@ #elif defined(MENUQC) #elif defined(SVQC) #include + #include #include #endif diff --git a/qcsrc/common/mapobjects/triggers.qh b/qcsrc/common/mapobjects/triggers.qh index 2ca91a09b..1fac7907a 100644 --- a/qcsrc/common/mapobjects/triggers.qh +++ b/qcsrc/common/mapobjects/triggers.qh @@ -10,6 +10,10 @@ .float lip; +// handy fields used by a lot of the codebase, but more importantly used by map objects +.float cnt; +.float count; + // used elsewhere (will fix) #ifdef SVQC .string message2; diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 974f69e5b..768e94b83 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "../mapobjects/triggers.qh" #include diff --git a/qcsrc/common/monsters/sv_spawn.qc b/qcsrc/common/monsters/sv_spawn.qc index f4ae76df8..5b4e9a206 100644 --- a/qcsrc/common/monsters/sv_spawn.qc +++ b/qcsrc/common/monsters/sv_spawn.qc @@ -7,6 +7,7 @@ #include "sv_monsters.qh" #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/physics/player.qc b/qcsrc/common/physics/player.qc index f1b155029..af1ae0ad1 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -4,6 +4,7 @@ #ifdef SVQC +#include #include #include #include "../mapobjects/trigger/viewloc.qh" diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 08ee5524e..129c42d47 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -5,6 +5,7 @@ #include "constants.qh" #include "util.qh" #include + #include #include "../server/anticheat.qh" #include "../server/defs.qh" #include "../server/scores.qh" diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 46a604ae2..ed3947b53 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -1,9 +1,12 @@ #include "sv_vehicles.qh" #include +#include #include +#include #include #include +#include #include #include diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 92727b4c0..8d6bb9d01 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -29,6 +29,7 @@ #include #include "../monsters/_mod.qh" #include "config.qh" + #include #include #include #include diff --git a/qcsrc/server/anticheat.qc b/qcsrc/server/anticheat.qc index 7637424c1..be517fe23 100644 --- a/qcsrc/server/anticheat.qc +++ b/qcsrc/server/anticheat.qc @@ -3,6 +3,7 @@ #include "antilag.qh" #include "autocvars.qh" #include "defs.qh" +#include #include #include #include "miscfunctions.qh" diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 9167ca5e7..1c9d0b880 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -24,6 +24,8 @@ #include "../common/monsters/_mod.qh" +#include + #include #include "../common/mapobjects/subs.qh" diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 0823e9214..0961e01fa 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -52,6 +52,11 @@ .int pressedkeys; +.int playerid; + +.string playermodel; +.string playerskin; + void ClientState_attach(entity this); IntrusiveList g_players; @@ -307,6 +312,8 @@ bool independent_players; float blockSpectators; // if set, new or existing spectators or observers will be removed unless they become a player within g_maxplayers_spectator_blocktime seconds .float spectatortime; // point in time since the client is spectating or observing +.bool player_blocked; + // TODO: standardise resource regeneration .float pauseregen_finished; .float pauserothealth_finished; diff --git a/qcsrc/server/clientkill.qc b/qcsrc/server/clientkill.qc index 51b133636..f3e7b52d6 100644 --- a/qcsrc/server/clientkill.qc +++ b/qcsrc/server/clientkill.qc @@ -1,11 +1,13 @@ #include "clientkill.qh" #include +#include #include "g_damage.qh" #include "teamplay.qh" #include +#include #include #include diff --git a/qcsrc/server/command/radarmap.qc b/qcsrc/server/command/radarmap.qc index e3dbf795f..7ec8eb6ea 100644 --- a/qcsrc/server/command/radarmap.qc +++ b/qcsrc/server/command/radarmap.qc @@ -2,6 +2,7 @@ #ifdef RADARMAP #include +#include #include "../g_world.qh" diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index d65ebf2a5..9931513da 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -3,39 +3,6 @@ #include #include -// Fields - -.float pain_finished; //Added by Supajoe - -.float cnt; // used in too many places -.float count; - -.float fade_time; -.float fade_rate; - -.string mdl; - -.string playermodel; -.string playerskin; - -.float species; - -// string overrides entity -.string item_pickupsound; -.entity item_pickupsound_ent; -.entity item_model_ent; - -.float winning; - -.int playerid; - -float default_player_alpha; -float default_weapon_alpha; - -.entity realowner; - -.bool player_blocked; - //// IntrusiveList g_monsters; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 30e8d51ae..f5d5f91bc 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -25,6 +25,7 @@ #include "../common/constants.qh" #include "../common/deathtypes/all.qh" #include +#include #include "../common/notifications/all.qh" #include "../common/physics/movetypes/movetypes.qh" #include "../common/playerstats.qh" diff --git a/qcsrc/server/g_damage.qh b/qcsrc/server/g_damage.qh index f6ae1d5e0..fb2120db1 100644 --- a/qcsrc/server/g_damage.qh +++ b/qcsrc/server/g_damage.qh @@ -51,6 +51,8 @@ float yoda; float damage_goodhits; float damage_gooddamage; +.float pain_finished; // Added by Supajoe + .float dmg_team; .float teamkill_complain; .float teamkill_soundtime; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 00ee7205b..9f78b6750 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -36,6 +36,7 @@ #include "../common/playerstats.qh" #include "../common/stats.qh" #include "../common/teams.qh" +#include #include "../common/mapobjects/trigger/secret.qh" #include "../common/mapobjects/target/music.qh" #include "../common/util.qh" diff --git a/qcsrc/server/g_world.qh b/qcsrc/server/g_world.qh index ceb7a4a4b..f99619208 100644 --- a/qcsrc/server/g_world.qh +++ b/qcsrc/server/g_world.qh @@ -29,10 +29,14 @@ float alreadychangedlevel; string cache_mutatormsg; string cache_lastmutatormsg; +float default_player_alpha; +float default_weapon_alpha; + // database float ServerProgsDB; float TemporaryDB; +.float winning; const int WINNING_NO = 0; // no winner, but time limits may terminate the game const int WINNING_YES = 1; // winner found const int WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached diff --git a/qcsrc/server/items/items.qh b/qcsrc/server/items/items.qh index 0fbfab3ec..41d901f0d 100644 --- a/qcsrc/server/items/items.qh +++ b/qcsrc/server/items/items.qh @@ -13,6 +13,11 @@ bool have_pickup_item(entity this); const float ITEM_RESPAWN_TICKS = 10; +// string overrides entity +.string item_pickupsound; +.entity item_pickupsound_ent; +.entity item_model_ent; + .float max_armorvalue; .float pickup_anyway; diff --git a/qcsrc/server/pathlib/movenode.qc b/qcsrc/server/pathlib/movenode.qc index cbcfe3d4c..796581767 100644 --- a/qcsrc/server/pathlib/movenode.qc +++ b/qcsrc/server/pathlib/movenode.qc @@ -1,5 +1,6 @@ #include "movenode.qh" +#include #include #include #include "pathlib.qh" diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 3795066fe..ba19f16a7 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -6,11 +6,13 @@ #include "client.qh" #include "clientkill.qh" #include "g_damage.qh" +#include "g_world.qh" #include "handicap.qh" #include "miscfunctions.qh" #include "portals.qh" #include "teamplay.qh" #include +#include "weapons/common.qh" #include "weapons/throwing.qh" #include "command/common.qh" #include "command/vote.qh" diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 6e997d6b3..7edbc6f99 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -4,10 +4,12 @@ #include "g_hook.qh" #include "mutators/_mod.qh" #include +#include #include "../common/constants.qh" #include "../common/deathtypes/all.qh" #include "../common/notifications/all.qh" #include "../common/mapobjects/teleporters.qh" +#include #include "../common/mapobjects/subs.qh" #include "../common/util.qh" #include diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index d2eeecbb4..4190c208e 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -4,6 +4,7 @@ #include #include #include +#include #include "client.qh" #include "cheats.qh" #include "portals.qh" diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index e5a8b3007..aab069cba 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -4,6 +4,7 @@ #include #include "campaign.qh" #include "command/vote.qh" +#include #include "../common/util.qh" void round_handler_Think(entity this) diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 12c0a6b3c..b81cb590a 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -11,6 +11,7 @@ #include #include "../common/mapobjects/subs.qh" #include "../common/mapobjects/target/spawnpoint.qh" +#include #include "../common/util.qh" #include "../lib/warpzone/common.qh" #include "../lib/warpzone/util_server.qh" diff --git a/qcsrc/server/sv_main.qh b/qcsrc/server/sv_main.qh index 628684585..dc3d80dbe 100644 --- a/qcsrc/server/sv_main.qh +++ b/qcsrc/server/sv_main.qh @@ -14,6 +14,7 @@ float servertime, serverprevtime, serverframetime; .float watersound_finished; .bool iscreature; +.float species; .float contents_damagetime; diff --git a/qcsrc/server/weapons/common.qh b/qcsrc/server/weapons/common.qh index d26eb5cb8..840e6e54d 100644 --- a/qcsrc/server/weapons/common.qh +++ b/qcsrc/server/weapons/common.qh @@ -12,6 +12,11 @@ void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) .int projectiledeathtype; +.float fade_time; +.float fade_rate; + +.entity realowner; + #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE // when doing this, hagar can go through clones // #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX diff --git a/qcsrc/server/weapons/hitplot.qc b/qcsrc/server/weapons/hitplot.qc index b90a855e1..a6c9da66c 100644 --- a/qcsrc/server/weapons/hitplot.qc +++ b/qcsrc/server/weapons/hitplot.qc @@ -1,5 +1,6 @@ #include "hitplot.qh" +#include #include #include #include diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index 3f362016d..17fd9e0e0 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index ef1b6bd68..2d9972551 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -8,6 +8,7 @@ #include "weaponsystem.qh" #include "../g_damage.qh" +#include #include "../antilag.qh" #include diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index cbfba4c9f..81b25e845 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -3,7 +3,9 @@ #include "selection.qh" #include "../command/common.qh" +#include #include +#include #include #include #include "../round_handler.qh" @@ -11,6 +13,7 @@ #include #include #include +#include #include #include #include