From: Mario Date: Sun, 2 Aug 2020 10:29:13 +0000 (+1000) Subject: Purge client/defs.qh X-Git-Tag: xonotic-v0.8.5~797 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7069dc3f41678554d089db582ccf16da1f8874a5;p=xonotic%2Fxonotic-data.pk3dir.git Purge client/defs.qh --- diff --git a/qcsrc/client/bgmscript.qc b/qcsrc/client/bgmscript.qc index 02739194a..c864f0d6a 100644 --- a/qcsrc/client/bgmscript.qc +++ b/qcsrc/client/bgmscript.qc @@ -2,7 +2,6 @@ #include #include -#include #include #define CONSTANT_SPEED_DECAY diff --git a/qcsrc/client/bgmscript.qh b/qcsrc/client/bgmscript.qh index e1be9c805..18679ebb8 100644 --- a/qcsrc/client/bgmscript.qh +++ b/qcsrc/client/bgmscript.qh @@ -4,5 +4,7 @@ classfield(BGMScript) .float just_toggled; +float bgmtime; + void BGMScript_InitEntity(entity e); float doBGMScript(entity e); diff --git a/qcsrc/client/commands/cl_cmd.qc b/qcsrc/client/commands/cl_cmd.qc index c21de4696..127f404e7 100644 --- a/qcsrc/client/commands/cl_cmd.qc +++ b/qcsrc/client/commands/cl_cmd.qc @@ -8,14 +8,15 @@ #include "cl_cmd.qh" #include "../autocvars.qh" -#include "../defs.qh" #include #include #include #include +#include #include "../main.qh" #include "../mapvoting.qh" #include "../miscfunctions.qh" +#include #include diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index c73b3ff42..10287ce6e 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -1,5 +1,6 @@ #include "csqcmodel_hooks.qh" #include "autocvars.qh" +#include "main.qh" #include "miscfunctions.qh" #include #include diff --git a/qcsrc/client/csqcmodel_hooks.qh b/qcsrc/client/csqcmodel_hooks.qh index f952d0b0a..14b171b6c 100644 --- a/qcsrc/client/csqcmodel_hooks.qh +++ b/qcsrc/client/csqcmodel_hooks.qh @@ -23,6 +23,8 @@ const int MF_TRACER3 = BIT(7); // purple trail .int csqcmodel_modelflags; .int csqcmodel_traileffect; +.bool csqcmodel_isdead; // used by shownames and miscfunctions (entcs_IsDead) to know when a player is dead + .int isplayermodel; void CSQCModel_Effects_Apply(entity this); diff --git a/qcsrc/client/defs.qh b/qcsrc/client/defs.qh deleted file mode 100644 index 0625c31ef..000000000 --- a/qcsrc/client/defs.qh +++ /dev/null @@ -1,78 +0,0 @@ -#pragma once - -// Additional OPTIONAL Fields and Globals -//float intermission; -// float coop; -// float deathmatch; - -float dmg_take; -// float dmg_save; -// vector dmg_origin; - -// Darkplaces Render Modifications -#if 0 -.float alpha; -.vector colormod; -.float scale; -#endif - -// Basic variables -.int enttype; // entity type sent from server -.int sv_entnum; // entity number sent from server -.int team; -.int team_size; - -float vid_conheight; -int binddb; - -// Spectating -// -1 - observing -// 0 - playing -// >0 - id of spectated player -float spectatee_status; -float spectatee_status_changed_time; - -// short mapname -string shortmapname; - -// database for misc stuff -int tempdb; -int ClientProgsDB; -vector hook_shotorigin[4]; -vector lightning_shotorigin[4]; - - -#ifdef BLURTEST -float blurtest_time0, blurtest_time1, blurtest_radius, blurtest_power; -#endif - -float serverprevtime, serverdeltatime; - -float ticrate; - -.float damageforcescale; -const float MIN_DAMAGEEXTRARADIUS = 2; -const float MAX_DAMAGEEXTRARADIUS = 16; -.float damageextraradius; -.void(entity this, float thisdmg, int hittype, vector org, vector thisforce) event_damage; - -// weapons -.bool silent; - -int w_deathtype; -float w_issilent, w_random; -vector w_org, w_backoff; - -float bgmtime; - -float vortex_charge_movingavg; - -int serverflags; - -float uid2name_dialog; - -float intermission_time; - -.bool csqcmodel_isdead; // used by shownames and miscfunctions (entcs_IsDead) to know when a player is dead - -#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1) diff --git a/qcsrc/client/hud/crosshair.qh b/qcsrc/client/hud/crosshair.qh index f48562828..8de5e5a38 100644 --- a/qcsrc/client/hud/crosshair.qh +++ b/qcsrc/client/hud/crosshair.qh @@ -1,5 +1,7 @@ #pragma once +float vortex_charge_movingavg; // WEAPONTODO + vector crosshair_getcolor(entity this, float health_stat); void TrueAim_Init(); void HUD_Crosshair(entity this); diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index c8191ba9e..114b44823 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -1,6 +1,5 @@ #include "hud.qh" -#include #include #include #include diff --git a/qcsrc/client/hud/hud_config.qc b/qcsrc/client/hud/hud_config.qc index 9b768e025..32c7889ca 100644 --- a/qcsrc/client/hud/hud_config.qc +++ b/qcsrc/client/hud/hud_config.qc @@ -3,7 +3,6 @@ #include "hud.qh" #include "panel/scoreboard.qh" #include -#include #include #include diff --git a/qcsrc/client/hud/panel/ammo.qc b/qcsrc/client/hud/panel/ammo.qc index 69a42f426..b75c3ebab 100644 --- a/qcsrc/client/hud/panel/ammo.qc +++ b/qcsrc/client/hud/panel/ammo.qc @@ -1,8 +1,8 @@ #include "ammo.qh" #include -#include #include +#include #include #include #include diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index 0ddf5f347..2fcf130fa 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -2,7 +2,6 @@ #include "scoreboard.qh" #include -#include #include // CenterPrint (#16) diff --git a/qcsrc/client/hud/panel/chat.qc b/qcsrc/client/hud/panel/chat.qc index 78cc6a0ef..d46aa81b8 100644 --- a/qcsrc/client/hud/panel/chat.qc +++ b/qcsrc/client/hud/panel/chat.qc @@ -1,7 +1,6 @@ #include "chat.qh" #include -#include #include // Chat (#12) diff --git a/qcsrc/client/hud/panel/healtharmor.qc b/qcsrc/client/hud/panel/healtharmor.qc index d6bf99fd6..48b852bf9 100644 --- a/qcsrc/client/hud/panel/healtharmor.qc +++ b/qcsrc/client/hud/panel/healtharmor.qc @@ -1,6 +1,6 @@ #include "healtharmor.qh" -#include +#include #include #include diff --git a/qcsrc/client/hud/panel/infomessages.qc b/qcsrc/client/hud/panel/infomessages.qc index 83897dfd3..03465cce5 100644 --- a/qcsrc/client/hud/panel/infomessages.qc +++ b/qcsrc/client/hud/panel/infomessages.qc @@ -1,6 +1,7 @@ #include "infomessages.qh" #include +#include #include #include diff --git a/qcsrc/client/hud/panel/physics.qc b/qcsrc/client/hud/panel/physics.qc index 139f29c30..a60821909 100644 --- a/qcsrc/client/hud/panel/physics.qc +++ b/qcsrc/client/hud/panel/physics.qc @@ -1,7 +1,6 @@ #include "physics.qh" #include -#include #include #include #include diff --git a/qcsrc/client/hud/panel/powerups.qc b/qcsrc/client/hud/panel/powerups.qc index fe591ff53..75fb0c2aa 100644 --- a/qcsrc/client/hud/panel/powerups.qc +++ b/qcsrc/client/hud/panel/powerups.qc @@ -1,7 +1,7 @@ #include "powerups.qh" #include -#include +#include #include #include #include diff --git a/qcsrc/client/hud/panel/pressedkeys.qc b/qcsrc/client/hud/panel/pressedkeys.qc index 73bd583bc..f29978c2d 100644 --- a/qcsrc/client/hud/panel/pressedkeys.qc +++ b/qcsrc/client/hud/panel/pressedkeys.qc @@ -1,7 +1,7 @@ #include "pressedkeys.qh" #include -#include +#include #include // Pressed keys (#11) diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index 66ee555b4..6e3c185c8 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -1,7 +1,7 @@ #include "quickmenu.qh" #include -#include +#include #include #include #include diff --git a/qcsrc/client/hud/panel/racetimer.qc b/qcsrc/client/hud/panel/racetimer.qc index a0a971cb1..0703c4f2d 100644 --- a/qcsrc/client/hud/panel/racetimer.qc +++ b/qcsrc/client/hud/panel/racetimer.qc @@ -1,7 +1,7 @@ #include "racetimer.qh" #include -#include +#include #include // Race timer (#8) diff --git a/qcsrc/client/hud/panel/radar.qc b/qcsrc/client/hud/panel/radar.qc index 59bfa1a95..66665498e 100644 --- a/qcsrc/client/hud/panel/radar.qc +++ b/qcsrc/client/hud/panel/radar.qc @@ -1,7 +1,7 @@ #include "radar.qh" #include -#include +#include #include #include #include diff --git a/qcsrc/client/hud/panel/score.qc b/qcsrc/client/hud/panel/score.qc index a6ec774b8..553283e5b 100644 --- a/qcsrc/client/hud/panel/score.qc +++ b/qcsrc/client/hud/panel/score.qc @@ -1,7 +1,7 @@ #include "score.qh" #include -#include +#include #include #include "scoreboard.qh" #include diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 59e8b101a..05715bd6c 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1,7 +1,6 @@ #include "scoreboard.qh" #include -#include #include #include #include diff --git a/qcsrc/client/hud/panel/timer.qc b/qcsrc/client/hud/panel/timer.qc index 8bb4ade6a..e49c777db 100644 --- a/qcsrc/client/hud/panel/timer.qc +++ b/qcsrc/client/hud/panel/timer.qc @@ -1,8 +1,8 @@ #include "timer.qh" #include -#include #include +#include // Timer (#5) diff --git a/qcsrc/client/hud/panel/vote.qc b/qcsrc/client/hud/panel/vote.qc index 60f839490..2b2c7fa96 100644 --- a/qcsrc/client/hud/panel/vote.qc +++ b/qcsrc/client/hud/panel/vote.qc @@ -1,7 +1,7 @@ #include "vote.qh" #include -#include +#include #include // Vote (#9) diff --git a/qcsrc/client/hud/panel/vote.qh b/qcsrc/client/hud/panel/vote.qh index 6db88c68b..3a6f45f80 100644 --- a/qcsrc/client/hud/panel/vote.qh +++ b/qcsrc/client/hud/panel/vote.qh @@ -1,2 +1,4 @@ #pragma once #include "../panel.qh" + +float uid2name_dialog; diff --git a/qcsrc/client/hud/panel/weapons.qc b/qcsrc/client/hud/panel/weapons.qc index 633e37b55..03be211a2 100644 --- a/qcsrc/client/hud/panel/weapons.qc +++ b/qcsrc/client/hud/panel/weapons.qc @@ -1,7 +1,7 @@ #include "weapons.qh" #include -#include +#include #include #include #include diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index dd3b62b1d..25403017b 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -1,6 +1,5 @@ #include "main.qh" -#include "defs.qh" #include #include #include "miscfunctions.qh" diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 73359e7e1..784ecb9c9 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -115,3 +115,35 @@ int framecount; float GetSpeedUnitFactor(int speed_unit); string GetSpeedUnit(int speed_unit); + +.int enttype; // entity type sent from server +.int sv_entnum; // entity number sent from server + +.int team; +.int team_size; + +int binddb; + +// Spectating +// -1 - observing +// 0 - playing +// >0 - id of spectated player +float spectatee_status; +float spectatee_status_changed_time; + +#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1) + +// short mapname +string shortmapname; + +// database for misc stuff +int tempdb; +int ClientProgsDB; +vector hook_shotorigin[4]; // WEAPONTODO +vector lightning_shotorigin[4]; // TODO: unused + +float serverprevtime, serverdeltatime; + +float ticrate; + +int serverflags; diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 91b076b25..a38bb76cf 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -1,8 +1,8 @@ #include "mapvoting.qh" #include "autocvars.qh" +#include "main.qh" #include "miscfunctions.qh" -#include "defs.qh" #include "hud/_mod.qh" #include "hud/panel/scoreboard.qh" diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index e6f036842..a653f4bf1 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -1,8 +1,8 @@ #include "miscfunctions.qh" #include "autocvars.qh" -#include "defs.qh" #include "hud/_mod.qh" +#include "main.qh" #include diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index d4a221cbc..bee9a2b45 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -1,6 +1,7 @@ #include "shownames.qh" #include "autocvars.qh" +#include "main.qh" #include "miscfunctions.qh" #include "resources.qh" #include "hud/_mod.qh" diff --git a/qcsrc/client/teamradar.qc b/qcsrc/client/teamradar.qc index cdb8894a8..2e6ddba22 100644 --- a/qcsrc/client/teamradar.qc +++ b/qcsrc/client/teamradar.qc @@ -2,6 +2,7 @@ #include "autocvars.qh" #include "hud/_mod.qh" +#include #include diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index c9ad52ef9..d54dea8f7 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -4,6 +4,7 @@ #include "miscfunctions.qh" #include "announcer.qh" #include "hud/_mod.qh" +#include "main.qh" #include "mapvoting.qh" #include "shownames.qh" #include "hud/panel/scoreboard.qh" diff --git a/qcsrc/client/view.qh b/qcsrc/client/view.qh index cb6302f1f..7b73e5ae4 100644 --- a/qcsrc/client/view.qh +++ b/qcsrc/client/view.qh @@ -20,3 +20,13 @@ const int CURSOR_RESIZE2 = 3; float drawtime; float unaccounted_damage = 0; float zoomscript_caught; + +float dmg_take; +// float dmg_save; +// vector dmg_origin; + +#ifdef BLURTEST +float blurtest_time0, blurtest_time1, blurtest_radius, blurtest_power; +#endif + +float intermission_time; diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index fcdac111e..cb5b4240c 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -1,7 +1,6 @@ #include "projectile.qh" #include "../autocvars.qh" -#include "../defs.qh" #include "../main.qh" #include diff --git a/qcsrc/common/effects/qc/damageeffects.qc b/qcsrc/common/effects/qc/damageeffects.qc index 17f48136a..c532e6a29 100644 --- a/qcsrc/common/effects/qc/damageeffects.qc +++ b/qcsrc/common/effects/qc/damageeffects.qc @@ -54,6 +54,8 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad .float cnt; .int state; +.bool silent; + void DamageEffect_Think(entity this) { // if particle distribution is enabled, slow ticrate by total number of damages diff --git a/qcsrc/common/effects/qc/damageeffects.qh b/qcsrc/common/effects/qc/damageeffects.qh index 68b43b176..3629639c2 100644 --- a/qcsrc/common/effects/qc/damageeffects.qh +++ b/qcsrc/common/effects/qc/damageeffects.qh @@ -6,4 +6,14 @@ #include #include #include + +int w_deathtype; +float w_issilent, w_random; +vector w_org, w_backoff; + +.float damageforcescale; +const float MIN_DAMAGEEXTRARADIUS = 2; +const float MAX_DAMAGEEXTRARADIUS = 16; +.float damageextraradius; +.void(entity this, float thisdmg, int hittype, vector org, vector thisforce) event_damage; #endif diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index 06b8baa1a..afc366ba0 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -7,6 +7,9 @@ #ifdef SVQC #include #endif + #ifdef CSQC + #include + #endif REGISTER_NET_TEMP(globalsound) REGISTER_NET_TEMP(playersound) diff --git a/qcsrc/common/ent_cs.qh b/qcsrc/common/ent_cs.qh index f38473b40..8ae89fd3b 100644 --- a/qcsrc/common/ent_cs.qh +++ b/qcsrc/common/ent_cs.qh @@ -1,7 +1,7 @@ #pragma once #ifdef CSQC -#include +#include #endif REGISTER_NET_LINKED(ENT_CLIENT_ENTCS) diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index dce55aa86..b8071fab6 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -1,6 +1,5 @@ #include "mapinfo.qh" #if defined(CSQC) - #include "../client/defs.qh" #include "util.qh" #include #elif defined(MENUQC) diff --git a/qcsrc/common/viewloc.qc b/qcsrc/common/viewloc.qc index d4f1a54a8..b2d518bcc 100644 --- a/qcsrc/common/viewloc.qc +++ b/qcsrc/common/viewloc.qc @@ -2,7 +2,7 @@ #include "util.qh" #if defined(CSQC) - #include "../client/defs.qh" + #include #include "constants.qh" #elif defined(MENUQC) #elif defined(SVQC) diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 092ef4d1e..62e4ff0e0 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -3,7 +3,6 @@ #define WEAPONS_ALL_C #if defined(CSQC) - #include #include "../constants.qh" #include "../stats.qh" #include diff --git a/qcsrc/lib/draw.qh b/qcsrc/lib/draw.qh index dbac8b8b1..82ae7c58d 100644 --- a/qcsrc/lib/draw.qh +++ b/qcsrc/lib/draw.qh @@ -5,7 +5,8 @@ #include "i18n.qh" #include "vector.qh" - float vid_conwidth; + noref float vid_conwidth; + noref float vid_conheight; void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg) {