Just a variant of old speed hack
class CGame;
class CEntity;
class CEntityStats;
class CGame
{
public:
inline CEntity* GetLocalEntity( void ) { return m_lpcLocalEntity; }
private:
/* 0x0000 */ BYTE _000[ 0x17C ];
/* 0x017C */ CEntity* m_lpcLocalEntity;
};
class CEntity
{
public:
inline CEntityStats* GetStats( void ) { return m_lpcEntityStats; }
private:
/* 0x0000 */ BYTE _000[ 0x20 ];
/* 0x0020 */ CEntityStats* m_lpcEntityStats;
};
class CEntityStats
{
public:
inline DWORD GetClassId( void ) { return m_dwClassId; }
inline float GetMovementSpeed( void ) { return m_fMovementSpeed; }
private:
/* 0x0000 */ BYTE _000[ 0x04 ];
/* 0x0004 */ DWORD m_dwClassId;
/* 0x0008 */ BYTE _008[ 0xC4 ];
/* 0x00CC */ float m_fMovementSpeed;
};
// --
MakeVar( CGame**, g_lpcGame, 0xE105E8 )
MakeFnc( double, __fastcall, ( CEntity* lpcEntity, DWORD _EDX, DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4 ), CEntity_GetVelocity, 0x1EBEB0 )
// --
double __fastcall New_CEntity_GetVelocity( CEntity* lpcEntity, DWORD _EDX, DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4 )
{
double dVelocity = CEntity_GetVelocity( lpcEntity, _EDX, dwArg1, dwArg2, dwArg3, dwArg4 );
if( dVelocity != 0.0 && (*g_lpcGame) && lpcEntity == (*g_lpcGame)->GetLocalEntity( ) )
{
dVelocity *= CCore::s_lpcCore->GetSpeed( );
}
return dVelocity;
}