Raised This Month: $ Target: $400
 0% 

gMultiDamage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jlkj81352
Junior Member
Join Date: Aug 2011
Old 08-09-2011 , 06:54   gMultiDamage
Reply With Quote #1

Is there anyway to trigger gMultiDamage Functions?

Last edited by jlkj81352; 08-09-2011 at 07:02.
jlkj81352 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-09-2011 , 08:47   Re: gMultiDamage
Reply With Quote #2

What is "gMultiDamage Functions"?
__________________
fysiks is offline
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
jlkj81352
Junior Member
Join Date: Aug 2011
Old 08-09-2011 , 09:16   Re: gMultiDamage
Reply With Quote #4

In all half-life based mod?
jlkj81352 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-09-2011 , 09:30   Re: gMultiDamage
Reply With Quote #5

How I could know ? Check yourself in each binary. ^^
__________________
Arkshine is offline
jlkj81352
Junior Member
Join Date: Aug 2011
Old 08-09-2011 , 09:56   Re: gMultiDamage
Reply With Quote #6

thx, i will try it
jlkj81352 is offline
Reply


Thread Tools
Display Modes

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