Raised This Month: $ Target: $400
 0% 

gMultiDamage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-09-2011 , 09:03   Re: gMultiDamage
Reply With Quote #3

That :

PHP Code:
/*
==============================================================================

MULTI-DAMAGE

Collects multiple small damages into a single damage

==============================================================================
*/

//
// ClearMultiDamage - resets the global multi damage accumulator
//
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 );
}


// GLOBALS USED:
//        gMultiDamage

void AddMultiDamageentvars_t *pevInflictorCBaseEntity *pEntityfloat flDamageint bitsDamageType)
{
    if ( !
pEntity )
        return;
    
    
gMultiDamage.type |= bitsDamageType;

    if ( 
pEntity != gMultiDamage.pEntity )
    {
        
ApplyMultiDamage(pevInflictor,pevInflictor); // UNDONE: wrong attacker!
        
gMultiDamage.pEntity    pEntity;
        
gMultiDamage.amount        0;
    }

    
gMultiDamage.amount += flDamage;



At the end of TraceAttack, for example you have : AddMultiDamage( pevAttacker, this, flDamage, bitsDamageType );

To answer to the question, with Orpheu, you can yes.
__________________
Arkshine is offline
 



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 03:23.


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