Purge client/defs.qh
authorMario <mario.mario@y7mail.com>
Sun, 2 Aug 2020 10:29:13 +0000 (20:29 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 2 Aug 2020 10:29:13 +0000 (20:29 +1000)
43 files changed:
qcsrc/client/bgmscript.qc
qcsrc/client/bgmscript.qh
qcsrc/client/commands/cl_cmd.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/csqcmodel_hooks.qh
qcsrc/client/defs.qh [deleted file]
qcsrc/client/hud/crosshair.qh
qcsrc/client/hud/hud.qc
qcsrc/client/hud/hud_config.qc
qcsrc/client/hud/panel/ammo.qc
qcsrc/client/hud/panel/centerprint.qc
qcsrc/client/hud/panel/chat.qc
qcsrc/client/hud/panel/healtharmor.qc
qcsrc/client/hud/panel/infomessages.qc
qcsrc/client/hud/panel/physics.qc
qcsrc/client/hud/panel/powerups.qc
qcsrc/client/hud/panel/pressedkeys.qc
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/client/hud/panel/racetimer.qc
qcsrc/client/hud/panel/radar.qc
qcsrc/client/hud/panel/score.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/hud/panel/timer.qc
qcsrc/client/hud/panel/vote.qc
qcsrc/client/hud/panel/vote.qh
qcsrc/client/hud/panel/weapons.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/shownames.qc
qcsrc/client/teamradar.qc
qcsrc/client/view.qc
qcsrc/client/view.qh
qcsrc/client/weapons/projectile.qc
qcsrc/common/effects/qc/damageeffects.qc
qcsrc/common/effects/qc/damageeffects.qh
qcsrc/common/effects/qc/globalsound.qc
qcsrc/common/ent_cs.qh
qcsrc/common/mapinfo.qc
qcsrc/common/viewloc.qc
qcsrc/common/weapons/all.qc
qcsrc/lib/draw.qh

index 0273919..c864f0d 100644 (file)
@@ -2,7 +2,6 @@
 
 #include <common/util.qh>
 #include <client/autocvars.qh>
-#include <client/defs.qh>
 #include <client/main.qh>
 
 #define CONSTANT_SPEED_DECAY
index e1be9c8..18679eb 100644 (file)
@@ -4,5 +4,7 @@
 
 classfield(BGMScript) .float just_toggled;
 
+float bgmtime;
+
 void BGMScript_InitEntity(entity e);
 float doBGMScript(entity e);
index c21de46..127f404 100644 (file)
@@ -8,14 +8,15 @@
 #include "cl_cmd.qh"
 
 #include "../autocvars.qh"
-#include "../defs.qh"
 #include <client/hud/_mod.qh>
 #include <client/hud/panel/quickmenu.qh>
 #include <client/hud/panel/radar.qh>
 #include <client/hud/panel/scoreboard.qh>
+#include <client/hud/panel/vote.qh>
 #include "../main.qh"
 #include "../mapvoting.qh"
 #include "../miscfunctions.qh"
+#include <client/view.qh>
 
 #include <client/mutators/_mod.qh>
 
index c73b3ff..10287ce 100644 (file)
@@ -1,5 +1,6 @@
 #include "csqcmodel_hooks.qh"
 #include "autocvars.qh"
+#include "main.qh"
 #include "miscfunctions.qh"
 #include <client/mutators/_mod.qh>
 #include <client/main.qh>
index f952d0b..14b171b 100644 (file)
@@ -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 (file)
index 0625c31..0000000
+++ /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)
index f485628..8de5e5a 100644 (file)
@@ -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);
index c8191ba..114b448 100644 (file)
@@ -1,6 +1,5 @@
 #include "hud.qh"
 
-#include <client/defs.qh>
 #include <client/items/items.qh>
 #include <client/miscfunctions.qh>
 #include <client/view.qh>
index 9b768e0..32c7889 100644 (file)
@@ -3,7 +3,6 @@
 #include "hud.qh"
 #include "panel/scoreboard.qh"
 #include <client/autocvars.qh>
-#include <client/defs.qh>
 #include <client/miscfunctions.qh>
 #include <client/view.qh>
 
index 69a42f4..b75c3eb 100644 (file)
@@ -1,8 +1,8 @@
 #include "ammo.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
 #include <client/items/items.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include <client/view.qh>
 #include <common/wepent.qh>
index 0ddf5f3..2fcf130 100644 (file)
@@ -2,7 +2,6 @@
 
 #include "scoreboard.qh"
 #include <common/notifications/all.qh>
-#include <client/defs.qh>
 #include <client/miscfunctions.qh>
 
 // CenterPrint (#16)
index 78cc6a0..d46aa81 100644 (file)
@@ -1,7 +1,6 @@
 #include "chat.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
 #include <client/miscfunctions.qh>
 
 // Chat (#12)
index d6bf99f..48b852b 100644 (file)
@@ -1,6 +1,6 @@
 #include "healtharmor.qh"
 
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 
 #include <common/deathtypes/all.qh>
index 83897df..03465cc 100644 (file)
@@ -1,6 +1,7 @@
 #include "infomessages.qh"
 
 #include <client/autocvars.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 
 #include <common/ent_cs.qh>
index 139f29c..a608219 100644 (file)
@@ -1,7 +1,6 @@
 #include "physics.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
 #include <client/miscfunctions.qh>
 #include <client/main.qh>
 #include <lib/csqcmodel/cl_player.qh>
index fe591ff..75fb0c2 100644 (file)
@@ -1,7 +1,7 @@
 #include "powerups.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include <common/items/_mod.qh>
 #include <common/util.qh>
index 73bd583..f29978c 100644 (file)
@@ -1,7 +1,7 @@
 #include "pressedkeys.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 
 // Pressed keys (#11)
index 66ee555..6e3c185 100644 (file)
@@ -1,7 +1,7 @@
 #include "quickmenu.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include <common/ent_cs.qh>
 #include <common/minigames/cl_minigames.qh>
index a0a971c..0703c4f 100644 (file)
@@ -1,7 +1,7 @@
 #include "racetimer.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 
 // Race timer (#8)
index 59bfa1a..6666549 100644 (file)
@@ -1,7 +1,7 @@
 #include "radar.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include <common/ent_cs.qh>
 #include <client/mapvoting.qh>
index a6ec774..553283e 100644 (file)
@@ -1,7 +1,7 @@
 #include "score.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include "scoreboard.qh"
 #include <common/ent_cs.qh>
index 59e8b10..05715bd 100644 (file)
@@ -1,7 +1,6 @@
 #include "scoreboard.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
 #include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include <client/hud/panel/racetimer.qh>
index 8bb4ade..e49c777 100644 (file)
@@ -1,8 +1,8 @@
 #include "timer.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
 #include <client/miscfunctions.qh>
+#include <client/view.qh>
 
 // Timer (#5)
 
index 60f8394..2b2c7fa 100644 (file)
@@ -1,7 +1,7 @@
 #include "vote.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 
 // Vote (#9)
index 6db88c6..3a6f45f 100644 (file)
@@ -1,2 +1,4 @@
 #pragma once
 #include "../panel.qh"
+
+float uid2name_dialog;
index 633e37b..03be211 100644 (file)
@@ -1,7 +1,7 @@
 #include "weapons.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
+#include <client/main.qh>
 #include <client/miscfunctions.qh>
 #include <client/view.qh>
 #include <common/wepent.qh>
index dd3b62b..2540301 100644 (file)
@@ -1,6 +1,5 @@
 #include "main.qh"
 
-#include "defs.qh"
 #include <client/items/items.qh>
 #include <common/ent_cs.qh>
 #include "miscfunctions.qh"
index 73359e7..784ecb9 100644 (file)
@@ -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;
index 91b076b..a38bb76 100644 (file)
@@ -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"
 
index e6f0368..a653f4b 100644 (file)
@@ -1,8 +1,8 @@
 #include "miscfunctions.qh"
 
 #include "autocvars.qh"
-#include "defs.qh"
 #include "hud/_mod.qh"
+#include "main.qh"
 
 #include <common/command/_mod.qh>
 
index d4a221c..bee9a2b 100644 (file)
@@ -1,6 +1,7 @@
 #include "shownames.qh"
 
 #include "autocvars.qh"
+#include "main.qh"
 #include "miscfunctions.qh"
 #include "resources.qh"
 #include "hud/_mod.qh"
index cdb8894..2e6ddba 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "autocvars.qh"
 #include "hud/_mod.qh"
+#include <client/main.qh>
 
 #include <common/mutators/mutator/waypoints/all.qh>
 
index c9ad52e..d54dea8 100644 (file)
@@ -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"
index cb6302f..7b73e5a 100644 (file)
@@ -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;
index fcdac11..cb5b424 100644 (file)
@@ -1,7 +1,6 @@
 #include "projectile.qh"
 
 #include "../autocvars.qh"
-#include "../defs.qh"
 #include "../main.qh"
 #include <client/mutators/_mod.qh>
 
index 17f4813..c532e6a 100644 (file)
@@ -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
index 68b43b1..3629639 100644 (file)
@@ -6,4 +6,14 @@
 #include <client/mutators/_mod.qh>
 #include <common/vehicles/all.qh>
 #include <common/weapons/_all.qh>
+
+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
index 06b8baa..afc366b 100644 (file)
@@ -7,6 +7,9 @@
        #ifdef SVQC
                #include <server/player.qh>
        #endif
+       #ifdef CSQC
+               #include <client/main.qh>
+       #endif
 
        REGISTER_NET_TEMP(globalsound)
        REGISTER_NET_TEMP(playersound)
index f38473b..8ae89fd 100644 (file)
@@ -1,7 +1,7 @@
 #pragma once
 
 #ifdef CSQC
-#include <client/defs.qh>
+#include <client/csqcmodel_hooks.qh>
 #endif
 
 REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
index dce55aa..b8071fa 100644 (file)
@@ -1,6 +1,5 @@
 #include "mapinfo.qh"
 #if defined(CSQC)
-    #include "../client/defs.qh"
     #include "util.qh"
     #include <common/weapons/_all.qh>
 #elif defined(MENUQC)
index d4f1a54..b2d518b 100644 (file)
@@ -2,7 +2,7 @@
 #include "util.qh"
 
 #if defined(CSQC)
-    #include "../client/defs.qh"
+    #include <client/main.qh>
     #include "constants.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
index 092ef4d..62e4ff0 100644 (file)
@@ -3,7 +3,6 @@
 #define WEAPONS_ALL_C
 
 #if defined(CSQC)
-       #include <client/defs.qh>
        #include "../constants.qh"
        #include "../stats.qh"
        #include <lib/warpzone/anglestransform.qh>
index dbac8b8..82ae7c5 100644 (file)
@@ -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)
        {