Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage with FF, Ham_TraceAttack not working correctly


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-17-2014 , 17:31   Re: Ham_TakeDamage with FF, Ham_TraceAttack not working correctly
Reply With Quote #10

Well, you are also being stubborn. Plus, I see nothing rude from him (though what you quoted was unnecessary), he's actually helping you... Maybe you should calm down a bit, and trying to review how work things.

Anyway, what he said should be correct. You may not see at first glance any problems, but at some point you are not going to have reliable damage. By calling TraceAttack, you accumulate damage for a same entity. If you call TakeDamage wihtout clearing global multi-damage, once TraceAttack is called again but with another entity, The previous entity will take most likely and again the accumulated damage with different inflictor.
This is not for nothing you have such code for the knife for example:

Code:
		ClearMultiDamage();
		pEntity->TraceAttack(m_pPlayer->pev, flDamage, gpGlobals->v_forward, &tr, DMG_NEVERGIB | DMG_BULLET);
		ApplyMultiDamage(m_pPlayer->pev, m_pPlayer->pev);
__________________

Last edited by Arkshine; 07-17-2014 at 17:32.
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 13:02.


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