Raised This Month: $ Target: $400
 0% 

Player should evade all bullets


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-22-2009 , 16:03   Re: Player should evade all bullets
Reply With Quote #7

Quote:
Originally Posted by SchlumPF* View Post
you can traceline but its inefficient, also traceattack and takedmg shouldnt make any difference since you have to check the dmgtype and supercede the hook if the player evaded.
But TakeDamage and TraceBleed are called from TraceAttack.

PHP Code:
//=========================================================
// TraceAttack
//=========================================================
void CBasePlayer :: TraceAttackentvars_t *pevAttackerfloat flDamageVector vecDirTraceResult *ptrint bitsDamageType)
{
    if ( 
pev->takedamage )
    {
        
m_LastHitGroup ptr->iHitgroup;

        switch ( 
ptr->iHitgroup )
        {
        case 
HITGROUP_GENERIC:
            break;
        case 
HITGROUP_HEAD:
            
flDamage *= gSkillData.plrHead;
            break;
        case 
HITGROUP_CHEST:
            
flDamage *= gSkillData.plrChest;
            break;
        case 
HITGROUP_STOMACH:
            
flDamage *= gSkillData.plrStomach;
            break;
        case 
HITGROUP_LEFTARM:
        case 
HITGROUP_RIGHTARM:
            
flDamage *= gSkillData.plrArm;
            break;
        case 
HITGROUP_LEFTLEG:
        case 
HITGROUP_RIGHTLEG:
            
flDamage *= gSkillData.plrLeg;
            break;
        default:
            break;
        }

        
SpawnBlood(ptr->vecEndPosBloodColor(), flDamage);// a little surface blood.
        
TraceBleedflDamagevecDirptrbitsDamageType );
        
AddMultiDamagepevAttackerthisflDamagebitsDamageType );
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 15:32.


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