PHP Code:
void ClearMultiDamage(void)
{
gMultiDamage.pEntity = NULL;
gMultiDamage.amount = 0;
gMultiDamage.type = 0;
}
//
// ApplyMultiDamage - inflicts contents of global multi damage register on gMultiDamage.pEntity
//
// GLOBALS USED:
// gMultiDamage
void ApplyMultiDamage(entvars_t *pevInflictor, entvars_t *pevAttacker )
{
Vector vecSpot1;//where blood comes from
Vector vecDir;//direction blood should go
TraceResult tr;
if ( !gMultiDamage.pEntity )
return;
gMultiDamage.pEntity->TakeDamage(pevInflictor, pevAttacker, gMultiDamage.amount, gMultiDamage.type );
}
You have to call ClearMultiDamage before & ApplyMultiDamage after TraceAttack
Here are the sig :
PHP Code:
bool HookMemoryFunctions( )
{
#ifdef _WIN32
g_pClearMultiDamage_Addr = Hooker -> MemorySearch< Func_ClearMultiDamage >( "0x33,*,0xA3,*,*,*,*,0xA3,*,*,*,*,0xA3,*,*,*,*,0xC3", ( void* )MDLL_Spawn, FALSE );
g_pApplyMultiDamage_Addr = Hooker -> MemorySearch< Func_ApplyMultiDamage >( "0x8B,*,*,*,*,*,0x85,*,0x74,*,0x8B,*,*,*,*,*,0x8B,*,0x52", ( void* )MDLL_Spawn, FALSE );
#else
g_pClearMultiDamage_Addr = Hooker -> MemorySearch< Func_ClearMultiDamage >( "_Z16ClearMultiDamagev", ( void* )MDLL_Spawn, TRUE );
g_pApplyMultiDamage_Addr = Hooker -> MemorySearch< Func_ApplyMultiDamage >( "_Z16ApplyMultiDamageP9entvars_sS0_", ( void* )MDLL_Spawn, TRUE );
#endif
return ( g_pClearMultiDamage_Addr != NULL && g_pApplyMultiDamage_Addr != NULL );
}
(Take them to make the Orpheu files)
__________________