From: Rudolf Polzer Date: Thu, 22 Nov 2012 15:49:49 +0000 (+0100) Subject: fix compile X-Git-Tag: xonotic-v0.7.0~99^2~33 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3a4e3d5beab3df1cd94329c81cb8d3ed56abe82d;p=xonotic%2Fxonotic-data.pk3dir.git fix compile --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index aafa68670..ae63e86a6 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -594,8 +594,8 @@ void CSQCModel_Hook_PreDraw(float isplayer) { if(self.pmove_flags & PMF_ONGROUND) flg |= FL_ONGROUND; - if(!(self.pmove_flags & PMF_JUMPRELEASED)) - if(self.anim_prev_pmove_flags & PMF_JUMPRELEASED) + if(self.pmove_flags & PMF_JUMP_HELD) + if(!(self.anim_prev_pmove_flags & PMF_JUMP_HELD)) animdecide_setaction(self, ANIMACTION_JUMP, TRUE); self.anim_prev_pmove_flags = self.pmove_flags; } diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index 4aa8fdf92..ac9373989 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -23,13 +23,9 @@ var float autocvar_cl_movement_errorcompensation = 0; // engine stuff -.float pmove_flags; -float pmove_onground; // weird engine flag we shouldn't really use but have to for now -#define PMF_JUMP_HELD 1 -#define PMF_DUCKED 4 -#define PMF_ONGROUND 8 #define REFDEFFLAG_TELEPORTED 1 #define REFDEFFLAG_JUMPING 2 +float pmove_onground; // weird engine flag we shouldn't really use but have to for now vector csqcplayer_origin, csqcplayer_velocity; float csqcplayer_sequence, player_pmflags; diff --git a/qcsrc/csqcmodellib/cl_player.qh b/qcsrc/csqcmodellib/cl_player.qh index 881ad3b32..1cb42f2a5 100644 --- a/qcsrc/csqcmodellib/cl_player.qh +++ b/qcsrc/csqcmodellib/cl_player.qh @@ -26,6 +26,12 @@ float csqcplayer_status; #define CSQCPLAYERSTATUS_FROMSERVER 1 #define CSQCPLAYERSTATUS_PREDICTED 2 +// only ever READ these! +.float pmove_flags; +#define PMF_JUMP_HELD 1 +#define PMF_DUCKED 4 +#define PMF_ONGROUND 8 + void CSQCPlayer_SetCamera(); float CSQCPlayer_PreUpdate(); float CSQCPlayer_PostUpdate();