Skip to content

Commit

Permalink
Fix xash version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Velaron committed Nov 21, 2023
1 parent 5f29cc8 commit 2f8619b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cl_dll/cdll_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion )

gEngfuncs = *pEnginefuncs;

g_iXash = (int)CVAR_GET_FLOAT("buildnum");
sscanf( CVAR_GET_STRING( "host_ver" ), "%d", &g_iXash );

Game_HookEvents();

Expand Down Expand Up @@ -322,9 +322,9 @@ int DLLEXPORT HUD_GetRenderInterface( int version, render_api_t *renderfuncs, re
// *callback = renderInterface;

// we have here a Host_Error, so check Xash for version
if( g_iXash < 3366 )
if( g_iXash < MIN_XASH_VERSION )
{
gRenderAPI.Host_Error("Xash3D Android version check failed!\nPlease update your Xash3D Android!\n");
gRenderAPI.Host_Error("Xash3D version check failed!\nPlease update your Xash3D!\n");
}

return true;
Expand Down
2 changes: 2 additions & 0 deletions cl_dll/include/cl_dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ typedef unsigned short word;
typedef float vec_t;
typedef int (*pfnUserMsgHook)(const char *pszName, int iSize, void *pbuf);

#define MIN_XASH_VERSION 3137

#include <stdint.h>

#include "util_vector.h"
Expand Down

0 comments on commit 2f8619b

Please sign in to comment.