From c16d00c170cffbf984eb218434568b86868487d8 Mon Sep 17 00:00:00 2001 From: a1batross Date: Sat, 2 Apr 2016 19:24:11 +0300 Subject: [PATCH 1/4] Remove prop.cpp from Android.mk, because we need a clean Half-Life in master branch --- dlls/Android.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/Android.mk b/dlls/Android.mk index 81b15c1e..38e6a019 100644 --- a/dlls/Android.mk +++ b/dlls/Android.mk @@ -124,7 +124,6 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \ world.cpp \ xen.cpp \ zombie.cpp \ - prop.cpp \ ../pm_shared/pm_debug.c \ ../pm_shared/pm_math.c \ ../pm_shared/pm_shared.c \ From 5d96c43c65f4e26dbcbbcaffeb265a6353a245b4 Mon Sep 17 00:00:00 2001 From: mittorn Date: Tue, 5 Apr 2016 15:39:01 +0000 Subject: [PATCH 2/4] Fix crash --- cl_dll/view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl_dll/view.cpp b/cl_dll/view.cpp index d547496e..2af0f8c9 100644 --- a/cl_dll/view.cpp +++ b/cl_dll/view.cpp @@ -1333,7 +1333,7 @@ int V_FindViewModelByWeaponModel(int weaponindex) int len = strlen( weaponModel->name ); int i = 0; - while ( modelmap[i] != NULL ) + while ( modelmap[i][0] != NULL ) { if ( !strnicmp( weaponModel->name, modelmap[i][0], len ) ) { From 3348f5d21431578f401c0684fb031d964c2ad580 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 17 Apr 2016 14:31:24 +0000 Subject: [PATCH 3/4] Check +speed value --- cl_dll/Android.mk | 2 +- cl_dll/input_xash3d.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cl_dll/Android.mk b/cl_dll/Android.mk index 83417047..b5f3f311 100755 --- a/cl_dll/Android.mk +++ b/cl_dll/Android.mk @@ -21,7 +21,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard) LOCAL_MODULE_FILENAME = libclient_hardfp endif -LOCAL_CFLAGS += -fsigned-char -DCLIENT_DLL=1 +LOCAL_CFLAGS += -DCLIENT_DLL=1 SRCS= SRCS_C= diff --git a/cl_dll/input_xash3d.cpp b/cl_dll/input_xash3d.cpp index 69980a39..dd621d19 100644 --- a/cl_dll/input_xash3d.cpp +++ b/cl_dll/input_xash3d.cpp @@ -201,6 +201,12 @@ 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) + { + cmd->forwardmove *= cl_movespeedkey->value; + cmd->sidemove *= cl_movespeedkey->value; + } + } ac_sidemove = ac_forwardmove = rel_pitch = rel_yaw = 0; From d287ed446332e615ab5fb25ca81b99fa14d18a73 Mon Sep 17 00:00:00 2001 From: mittorn Date: Fri, 22 Apr 2016 14:27:54 +0000 Subject: [PATCH 4/4] 64 bit support --- cl_dll/StudioModelRenderer.cpp | 2 +- dlls/nodes.cpp | 8 ++++---- dlls/util.cpp | 6 +++--- dlls/util.h | 5 ++++- engine/studio.h | 4 +++- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/cl_dll/StudioModelRenderer.cpp b/cl_dll/StudioModelRenderer.cpp index e0845c29..cbda63cd 100644 --- a/cl_dll/StudioModelRenderer.cpp +++ b/cl_dll/StudioModelRenderer.cpp @@ -377,7 +377,7 @@ mstudioanim_t *CStudioModelRenderer::StudioGetAnim( model_t *m_pSubModel, mstudi if (pseqdesc->seqgroup == 0) { - return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqgroup->data + pseqdesc->animindex); + return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqdesc->animindex); } paSequences = (cache_user_t *)m_pSubModel->submodels; diff --git a/dlls/nodes.cpp b/dlls/nodes.cpp index 1a55cd43..80bcc33e 100644 --- a/dlls/nodes.cpp +++ b/dlls/nodes.cpp @@ -3312,10 +3312,10 @@ void CGraph :: ComputeStaticRoutingTables( void ) } ALERT( at_aiconsole, "Size of Routes = %d\n", nTotalCompressedSize); } - if (Routes) delete Routes; - if (BestNextNodes) delete BestNextNodes; - if (pRoute) delete pRoute; - if (pMyPath) delete pMyPath; + if (Routes) delete[] Routes; + if (BestNextNodes) delete[] BestNextNodes; + if (pRoute) delete[] pRoute; + if (pMyPath) delete[] pMyPath; Routes = 0; BestNextNodes = 0; pRoute = 0; diff --git a/dlls/util.cpp b/dlls/util.cpp index 867bb3e1..f4408e06 100644 --- a/dlls/util.cpp +++ b/dlls/util.cpp @@ -2372,13 +2372,13 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou break; case FIELD_POINTER: - *((int *)pOutputData) = *( int *)pInputData; + *((void**)pOutputData) = *( void **)pInputData; break; case FIELD_FUNCTION: if ( strlen( (char *)pInputData ) == 0 ) - *((int *)pOutputData) = 0; + *((void**)pOutputData) = 0; else - *((int *)pOutputData) = FUNCTION_FROM_NAME( (char *)pInputData ); + *((void**)pOutputData) = FUNCTION_FROM_NAME( (char *)pInputData ); break; default: diff --git a/dlls/util.h b/dlls/util.h index 1edc0411..2de039fc 100644 --- a/dlls/util.h +++ b/dlls/util.h @@ -36,8 +36,11 @@ extern globalvars_t *gpGlobals; // Use this instead of ALLOC_STRING on constant strings #define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset) +#if !defined __amd64__ || defined(CLIENT_DLL) #define MAKE_STRING(str) ((int)str - (int)STRING(0)) - +#else +#define MAKE_STRING ALLOC_STRING +#endif inline edict_t *FIND_ENTITY_BY_CLASSNAME(edict_t *entStart, const char *pszName) { return FIND_ENTITY_BY_STRING(entStart, "classname", pszName); diff --git a/engine/studio.h b/engine/studio.h index 8cffc27a..3d4f3d87 100644 --- a/engine/studio.h +++ b/engine/studio.h @@ -215,7 +215,9 @@ typedef struct char label[32]; // textual name char name[64]; // file name cache_user_t cache; // cache index pointer +#ifndef __amd64 int data; // hack for group 0 +#endif } mstudioseqgroup_t; // sequence descriptions @@ -366,4 +368,4 @@ typedef struct short s,t; // s,t position on skin } mstudiotrivert_t; -#endif//STUDIO_H \ No newline at end of file +#endif//STUDIO_H