Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage with FF, Ham_TraceAttack not working correctly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bboygrun
CHOMP
Join Date: May 2010
Location: France
Old 07-17-2014 , 07:05   Re: Ham_TakeDamage with FF, Ham_TraceAttack not working correctly
Reply With Quote #1

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 *pevInflictorentvars_t *pevAttacker )
{
    
Vector        vecSpot1;//where blood comes from
    
Vector        vecDir;//direction blood should go
    
TraceResult    tr;

    if ( !
gMultiDamage.pEntity )
        return;

    
gMultiDamage.pEntity->TakeDamage(pevInflictorpevAttackergMultiDamage.amountgMultiDamage.type );

You have to call ClearMultiDamage before & ApplyMultiDamage after TraceAttack

Here are the sig :

PHP Code:
bool HookMemoryFunctions( )
{
#ifdef _WIN32
    
g_pClearMultiDamage_Addr Hooker -> MemorySearchFunc_ClearMultiDamage >( "0x33,*,0xA3,*,*,*,*,0xA3,*,*,*,*,0xA3,*,*,*,*,0xC3", ( void* )MDLL_SpawnFALSE );
    
g_pApplyMultiDamage_Addr Hooker -> MemorySearchFunc_ApplyMultiDamage >( "0x8B,*,*,*,*,*,0x85,*,0x74,*,0x8B,*,*,*,*,*,0x8B,*,0x52", ( void* )MDLL_SpawnFALSE );
#else
    
g_pClearMultiDamage_Addr Hooker -> MemorySearchFunc_ClearMultiDamage >( "_Z16ClearMultiDamagev", ( void* )MDLL_SpawnTRUE );
    
g_pApplyMultiDamage_Addr Hooker -> MemorySearchFunc_ApplyMultiDamage >( "_Z16ApplyMultiDamageP9entvars_sS0_", ( void* )MDLL_SpawnTRUE );
#endif

    
return ( g_pClearMultiDamage_Addr != NULL && g_pApplyMultiDamage_Addr != NULL );

(Take them to make the Orpheu files)
__________________

Last edited by bboygrun; 07-17-2014 at 07:09.
bboygrun is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode