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 02739194a858b799752f06dca40e36b8aade1bae..c864f0d6a15af48299e9387afa24a07f1a5fe31a 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 e1be9c805ca69e4512c7b9038ccaa88a9eb617a7..18679ebb86dc9a744a92a54c38e1ea1cfd35b277 100644 (file)
@@ -4,5 +4,7 @@
 
 classfield(BGMScript) .float just_toggled;
 
+float bgmtime;
+
 void BGMScript_InitEntity(entity e);
 float doBGMScript(entity e);
index c21de4696d19af9dc8a56e9735a49f8aa530f1b8..127f404e7f6b8e2dc591fb7879a0ed8b7fba0855 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 c73b3ff421a90c9c477c5a16b2ef98ef009d8507..10287ce6e69f96c3206a147bde1db00f071cc3f0 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 f952d0b0a02dcc652482733f72d2debff38c919a..14b171b6c2a53bbc318c88963e48b9b97d5e0563 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 f485628280dfa6e45151ade24e5401e37335df6a..8de5e5a38bc59f85fc04d44e80561d307443f360 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 c8191ba9e3bdf6ae039f52b7f8ed40cfcdac3a82..114b44823201041dacda11b18eb1d8367bbe69a5 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 9b768e0258ddcfe566b60b456cca7c119f84b1bd..32c7889cac866ef5266d8a3d11cf7300ff1483eb 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 69a42f426d705cfbb398c0f5377726ea6040e3ee..b75c3ebabdb5fa0a154f6cf239911390f4d9d819 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 0ddf5f347dbeb11e23c834c12cd3f79c8bfe2e3e..2fcf130fadadb920a7ca9f0b656efc47355b8c59 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 78cc6a0ef9066ae8291d52d3f0ea7f34a49b0c34..d46aa81b8269a29960a4b6a5b475b3fc44d4b6b4 100644 (file)
@@ -1,7 +1,6 @@
 #include "chat.qh"
 
 #include <client/autocvars.qh>
-#include <client/defs.qh>
 #include <client/miscfunctions.qh>
 
 // Chat (#12)
index d6bf99fd60494d31670feee9dff583e02920c0cb..48b852bf95a1f79d538f42829f580c31be410d91 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 83897dfd3f250541e3f2d56e67f9cf391698faa2..03465cce56185d26267368b5c6043f57a435fc0d 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 139f29c3099f83ec00c969c7c8e59436929e91de..a60821909b04512c92bedf4e7816639d691979ea 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 fe591ff53c44dff1f652889c8b90ee111b472b5b..75fb0c2aaaf4009c80647750de6cbc8013413592 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 73bd583bcd5b44b85d62c3dc45b6f1457c299346..f29978c2d0da0527dc2a3112510bfe1cad5c8c74 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 66ee555b43910b1472ba1b59555741972c90f176..6e3c185c8d29383043264a444007a7cb0d65e696 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 a0a971cb1f1732b95ddafae8b136303b6f1db0f5..0703c4f2dcb9eaecd29a70f49213f091f08591d3 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 59bfa1a95ae9c256319b26b04518583ade31e31a..66665498e07c6ced0a88d11371c4567c7aea4eee 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 a6ec774b870a1cf85623115e79927e7f39289ca7..553283e5bc4ab3bc2e15de5fde1eca5f9f94914f 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 59e8b101a04cfc20e714587390aa9d3e4358214f..05715bd6cf78dd3ae6dd9f6aa3d283a1064eca68 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 8bb4ade6a17f49aca0f69be10c5ffa303069af2f..e49c777db2491eeb25e0fa81bfa4d88ef001e1aa 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 60f8394900203204be439257a509e5f46cc7af8c..2b2c7fa969c90f087b33bb086a97cbf78cb243ff 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 6db88c68b39ee50fce1f8acce9c778465a3223ae..3a6f45f80d7b230dd0471175a7e70eb4595b8e76 100644 (file)
@@ -1,2 +1,4 @@
 #pragma once
 #include "../panel.qh"
+
+float uid2name_dialog;
index 633e37b55d6181daf041a37c1cea40a38ea3308f..03be211a23b82277d35575bab89baef212bc99d1 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 dd3b62b1d0998e36475a47133b992ebc91a1edfa..25403017b352b30a3239f946312280e52e1e3bc7 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 73359e7e127637cfcd3c23b77bccd97a76fad8ff..784ecb9c99edf37d308a6e3aa14e8a9cc74d2e3b 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 91b076b25ccb9b17b8aee2614452cf391907e8ec..a38bb76cfc5b4bd4300bbcd5a3405f5f765e5c30 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 e6f036842c0fe81c723ebdb5988cc74b3b18d0d2..a653f4bf1e5ca0af486b06dd58d6f61aafd143a1 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 d4a221cbc8a09c238faa5d44b4b7930fd8c2239a..bee9a2b454880597402cfcc09145f62e53c7c501 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 cdb8894a8dab6dab3872e191c7340afeb48206dc..2e6ddba229d8ff46cc0228251df2ed8ad41a881c 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 c9ad52ef93bf66cdd64ee0a04c2065bd244af937..d54dea8f70028c564ab5f0b6caa1e906182c04cd 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 cb6302f1f0930cd71fad5c31c45c11680380a1e2..7b73e5ae4994e9f9c720b4a5eca7c49eb38fb473 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 fcdac111e401aedbbd01c54a14a82bf294179385..cb5b4240c956795910a50596ee69fbd21e30b0e0 100644 (file)
@@ -1,7 +1,6 @@
 #include "projectile.qh"
 
 #include "../autocvars.qh"
-#include "../defs.qh"
 #include "../main.qh"
 #include <client/mutators/_mod.qh>
 
index 17f48136a6c0a4126f1ae96bf172c89fc63b9d4d..c532e6a29a7cc9392f62d5695cff3087e71c2896 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 68b43b17608094c8cdddcd2725a3f607765940e4..3629639c21b4a4ac4941126f02a689d6f9ccd7a3 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 06b8baa1a325999039f6ebe76da88534d82f63c2..afc366ba0c2796bba55a73860224bf8c420a861c 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 f38473b40b23a92a45d56fd454558a6e0467269d..8ae89fd3b6c49707e06a958ea31ae1700159a8b6 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 dce55aa86e07c9b9c1cb4135d36c8acdbd508005..b8071fab64b23e7469b47f8fa71b233643ead94e 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 d4f1a54a8fd38fd70b061d5e6b52f7581bcc7a1b..b2d518bcc6134ae4e20018ccf93a412a527cbd63 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 092ef4d1ed7e1a2262f1fe4f15d43604278aa82d..62e4ff0e014d9f48fdfcfebfdb5724ca5c17b809 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 dbac8b8b190f90a6923ee30239ba4a9b7429c185..82ae7c58dde6383faf684a1796d17a0a5f49215b 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)
        {