From 5bdb97c26c58ed1555eb1c45c62e3dad0e80d276 Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 3 Aug 2016 21:21:37 +0000 Subject: [PATCH 1/2] Fix cl_movespeedkey multiplied twice --- cl_dll/input_xash3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl_dll/input_xash3d.cpp b/cl_dll/input_xash3d.cpp index 128d6fa4..a1b8d8c1 100644 --- a/cl_dll/input_xash3d.cpp +++ b/cl_dll/input_xash3d.cpp @@ -221,7 +221,7 @@ void IN_Move( float frametime, usercmd_t *cmd ) IN_ToggleButtons( ac_forwardmove / ac_movecount, ac_sidemove / ac_movecount ); if( ac_forwardmove ) cmd->forwardmove = ac_forwardmove * cl_forwardspeed->value / ac_movecount; if( ac_sidemove ) cmd->sidemove = ac_sidemove * cl_sidespeed->value / ac_movecount; - if (in_speed.state & 1) + if( (in_speed.state & 1) && ( ac_sidemove || ac_forwardmove ) ) { cmd->forwardmove *= cl_movespeedkey->value; cmd->sidemove *= cl_movespeedkey->value; From 6c7d89ea76e35c86d068c3d04b82790088e7f4d4 Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 3 Aug 2016 22:36:50 +0000 Subject: [PATCH 2/2] Fix win64 build --- cl_dll/in_defs.h | 2 ++ dlls/extdll.h | 2 ++ dlls/util.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cl_dll/in_defs.h b/cl_dll/in_defs.h index c48cf373..e04cc18c 100644 --- a/cl_dll/in_defs.h +++ b/cl_dll/in_defs.h @@ -17,7 +17,9 @@ #define ROLL 2 #ifdef _WIN32 +#define HSPRITE HSPRITE_win32 #include +#undef HSPRITE #else typedef struct point_s{ int x; diff --git a/dlls/extdll.h b/dlls/extdll.h index 659f9a0a..0f5f33c2 100644 --- a/dlls/extdll.h +++ b/dlls/extdll.h @@ -39,7 +39,9 @@ #define NOSERVICE #define NOMCX #define NOIME +#define HSPRITE HSPRITE_win32 #include "windows.h" +#undef HSPRITE #else // _WIN32 #define FALSE 0 #define TRUE (!FALSE) diff --git a/dlls/util.h b/dlls/util.h index b478b781..39e281b5 100644 --- a/dlls/util.h +++ b/dlls/util.h @@ -38,7 +38,7 @@ extern globalvars_t *gpGlobals; #define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset) #if !defined __amd64__ || defined(CLIENT_DLL) -#define MAKE_STRING(str) ((int)str - (int)STRING(0)) +#define MAKE_STRING(str) ((int)(size_t)str - (int)(size_t)STRING(0)) #else #define MAKE_STRING ALLOC_STRING #endif