]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix missing includes in common/physics/player.qh
authorotta8634 <k9wolf@pm.me>
Tue, 24 Sep 2024 09:03:30 +0000 (17:03 +0800)
committerotta8634 <k9wolf@pm.me>
Tue, 24 Sep 2024 09:45:50 +0000 (17:45 +0800)
common/physics/player.qh didn't include client/csqcmodel_hooks.qh, common/resources/cl_resources.qh,
nor lib/csqcmodel/common.qh when CSQC is defined, but all were needed.
These includes were previously added to strafehud and physics hud just so it'd compile.
Relocated to proper place now

qcsrc/client/hud/panel/physics.qc
qcsrc/client/hud/panel/strafehud.qc
qcsrc/common/physics/player.qh

index 8855ac3ee12477e3ab13e5a9192cabd8706ace22..4aaf1407e22287dd07159c4153123aee2fe8a1e9 100644 (file)
@@ -5,10 +5,6 @@
 #include <common/physics/player.qh>
 #include <common/physics/movetypes/movetypes.qh>
 
-// jump speed
-#include <lib/csqcmodel/common.qh> // for IS_PLAYER() macro
-#include <common/resources/cl_resources.qh> // IS_DEAD() macro
-
 // Physics (#15)
 
 void HUD_Physics_Export(int fh)
index f81ef075e6842aa344297eaf25bdb65ffe2f94cf..6164a48970986d4d1b43cbe621455874e9f786fc 100644 (file)
 // start speed
 #include <client/hud/panel/racetimer.qh> // checkpoint information (race_*)
 
-// jump height
-#include <lib/csqcmodel/common.qh> // for IS_PLAYER() macro
-#include <common/resources/cl_resources.qh> // IS_DEAD() macro
-
 // StrafeHUD (#25)
 
 void HUD_StrafeHUD_Export(int fh)
index ea827f4fedb168523b15691f60ece620d66a77ab..3c14bea6dc0d0793f3962340d53867c5cfb4a8a9 100644 (file)
@@ -2,6 +2,12 @@
 
 // Client/server mappings
 
+#ifdef CSQC
+       #include <client/csqcmodel_hooks.qh> // for .isplayermodel, .csqcmodel_isdead
+       #include <common/resources/cl_resources.qh> // for GetResource
+       #include <lib/csqcmodel/common.qh> // for ISPLAYER_CLIENT, ISPLAYER_PLAYER
+#endif
+
 #ifdef SVQC
 // TODO: get rid of this random dumb include!
        #include <common/state.qh>
@@ -208,7 +214,6 @@ STATIC_INIT(PHYS_INPUT_BUTTON)
 .float teleport_time;
 
 #ifdef CSQC
-
        #define PHYS_FIXANGLE(s) ('0 0 0')
 
        string autocvar_cl_jumpspeedcap_min;