From c748bbf4e1e998c3b5bcee24d8e1bd526a41522b Mon Sep 17 00:00:00 2001 From: otta8634 Date: Tue, 24 Sep 2024 17:03:30 +0800 Subject: [PATCH] Fix missing includes in common/physics/player.qh 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 | 4 ---- qcsrc/client/hud/panel/strafehud.qc | 4 ---- qcsrc/common/physics/player.qh | 7 ++++++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/qcsrc/client/hud/panel/physics.qc b/qcsrc/client/hud/panel/physics.qc index 8855ac3ee..4aaf1407e 100644 --- a/qcsrc/client/hud/panel/physics.qc +++ b/qcsrc/client/hud/panel/physics.qc @@ -5,10 +5,6 @@ #include #include -// jump speed -#include // for IS_PLAYER() macro -#include // IS_DEAD() macro - // Physics (#15) void HUD_Physics_Export(int fh) diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index f81ef075e..6164a4897 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -17,10 +17,6 @@ // start speed #include // checkpoint information (race_*) -// jump height -#include // for IS_PLAYER() macro -#include // IS_DEAD() macro - // StrafeHUD (#25) void HUD_StrafeHUD_Export(int fh) diff --git a/qcsrc/common/physics/player.qh b/qcsrc/common/physics/player.qh index ea827f4fe..3c14bea6d 100644 --- a/qcsrc/common/physics/player.qh +++ b/qcsrc/common/physics/player.qh @@ -2,6 +2,12 @@ // Client/server mappings +#ifdef CSQC + #include // for .isplayermodel, .csqcmodel_isdead + #include // for GetResource + #include // for ISPLAYER_CLIENT, ISPLAYER_PLAYER +#endif + #ifdef SVQC // TODO: get rid of this random dumb include! #include @@ -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; -- 2.39.2