mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-05 11:34:41 +00:00
Fix build with cheatprotection.
This commit is contained in:
parent
968ba1be98
commit
3931dc55e7
@ -23,6 +23,7 @@
|
||||
#else
|
||||
#include <limits.h>
|
||||
#define MAX_PATH PATH_MAX
|
||||
#define _MAX_PATH MAX_PATH
|
||||
#endif
|
||||
#define _bool_h 1
|
||||
#include <ministl/string>
|
||||
|
@ -244,10 +244,9 @@ int AgHudGlobal::MsgFunc_CheatCheck(const char *pszName, int iSize, void *pbuf)
|
||||
AgCRC32EnforceFiles();
|
||||
|
||||
g_VariableChecker.Activate();
|
||||
|
||||
#ifdef _DEBUG
|
||||
DWORD dwTime = GetTickCount();
|
||||
|
||||
#ifdef _DEBUG
|
||||
AgLog( "Checking for spikes\n" );
|
||||
#endif //_DEBUG
|
||||
if (!g_ModelCheck.Check())
|
||||
@ -255,7 +254,7 @@ int AgHudGlobal::MsgFunc_CheatCheck(const char *pszName, int iSize, void *pbuf)
|
||||
|
||||
if (s_iCheckWallhack)
|
||||
{
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
#if defined(AG_USE_CHEATPROTECTION) && defined(_WIN32)
|
||||
#ifdef _DEBUG
|
||||
AgLog( "Checking for wallhack\n" );
|
||||
#endif //_DEBUG
|
||||
@ -280,7 +279,7 @@ int AgHudGlobal::MsgFunc_CheatCheck(const char *pszName, int iSize, void *pbuf)
|
||||
int AgHudGlobal::MsgFunc_WhString(const char *pszName, int iSize, void *pbuf)
|
||||
{
|
||||
BEGIN_READ( pbuf, iSize );
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
#if defined(AG_USE_CHEATPROTECTION) && defined(_WIN32)
|
||||
g_Wallhack.AddBadStrings(READ_STRING());
|
||||
#else
|
||||
READ_STRING();
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "com_model.h"
|
||||
#include "studio.h"
|
||||
#include "com_weapons.h"
|
||||
#include "AgModel.h"
|
||||
#include "agmodel.h"
|
||||
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
|
||||
#include "AgGlobal.h"
|
||||
#include "agglobal.h"
|
||||
|
||||
class AgModel
|
||||
{
|
||||
|
@ -11,8 +11,8 @@
|
||||
#include "triangleapi.h"
|
||||
#include "studio_util.h"
|
||||
#include "r_studioint.h"
|
||||
#include "AgVariableChecker.h"
|
||||
#include "AgModelCheck.h"
|
||||
#include "agvariablechecker.h"
|
||||
#include "agmodelcheck.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -8,6 +8,17 @@
|
||||
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/times.h>
|
||||
typedef unsigned long DWORD;
|
||||
|
||||
static inline DWORD GetTickCount( void )
|
||||
{
|
||||
tms tm;
|
||||
return times( &tm );
|
||||
}
|
||||
#endif
|
||||
|
||||
class AgVariableChecker
|
||||
{
|
||||
bool m_bActive;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
#if defined(AG_USE_CHEATPROTECTION) && defined(_WIN32)
|
||||
|
||||
#include "AgGlobal.h"
|
||||
#include "AgVersionInfo.h"
|
||||
@ -195,4 +195,4 @@ BOOL AgVersionInfo::IsRequiredVersion(int iReqMajor, int iReqMinor, int iReqMicr
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif //AG_USE_CHEATPROTECTION
|
||||
#endif //AG_USE_CHEATPROTECTION
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "hud.h"
|
||||
#include "cl_util.h"
|
||||
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
#if defined(AG_USE_CHEATPROTECTION) && defined(_WIN32)
|
||||
|
||||
#include "AgWallhack.h"
|
||||
#include "AgVersionInfo.h"
|
||||
|
@ -141,7 +141,7 @@ void DLLEXPORT HUD_PlayerMove( struct playermove_s *ppmove, int server )
|
||||
PM_Move( ppmove, server );
|
||||
}
|
||||
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
#if defined(AG_USE_CHEATPROTECTION) && defined(_WIN32)
|
||||
void* pFromModuleAddress = 0;
|
||||
int DLLEXPORT Initialize_Body( cl_enginefunc_t *pEnginefuncs, int iVersion )
|
||||
#else
|
||||
@ -160,7 +160,7 @@ int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion )
|
||||
//++ BulliT
|
||||
AgInitClientDll();
|
||||
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
#if defined(AG_USE_CHEATPROTECTION) && defined(_WIN32)
|
||||
g_Wallhack.SetHLAddressToValidate( (DWORD)pFromModuleAddress );
|
||||
#endif
|
||||
//-- Martin Webrant
|
||||
@ -168,7 +168,7 @@ int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion )
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef AG_USE_CHEATPROTECTION
|
||||
#if defined(AG_USE_CHEATPROTECTION) && defined(_WIN32)
|
||||
__declspec(naked) int Initialize( cl_enginefunc_t *pEnginefuncs, int Version )
|
||||
{
|
||||
__asm pop pFromModuleAddress;
|
||||
|
Loading…
x
Reference in New Issue
Block a user