Rift: Speedhack C++ Source Code example

All credit to original author

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

Leave a Reply

Your email address will not be published. Required fields are marked *

css.php
X

Forgot Password?

Join Us