2 things.
1)
https://github.com/Arkshine/CSSDK/bl.../wpn_knife.cpp
2)
PHP Code:
ClearMultiDamage();
if( m_flNextPrimaryAttack + 0.4 < UTIL_WeaponTimeBase() )
pEntity->TraceAttack( m_pPlayer->pev, 20, gpGlobals->v_forward, &tr, DMG_NEVERGIB | DMG_BULLET );
else
pEntity->TraceAttack( m_pPlayer->pev, 15, gpGlobals->v_forward, &tr, DMG_NEVERGIB | DMG_BULLET );
ApplyMultiDamage( m_pPlayer->pev, m_pPlayer->pev );
Will go step by step.
First:
Quote:
|
Like I said, all ApplyMultiDamage does is call TakeDamage.
|
No I wont, you're not reseting ClearMultiDamage variables, so what about if you were the last attacker? The last AddMultiDamage will set your index as the last attacker, and this condition:
PHP Code:
if ( pEntity != gMultiDamage.pEntity )
Will throw false.
Second:
Quote:
|
I'm doing pretty much the exactly same thing TraceAttack does.
|
No lol, again... see above
Third:
Quote:
|
I'm not sure what Arkshine's comment means, is it bugged in the CSSDK itself?
|
It's not Arkshine's comment. As a plugin approver you must at least know some HLSDK basic coding.
dlls/weapons.cpp
PHP Code:
ApplyMultiDamage(pevInflictor,pevInflictor); // UNDONE: wrong attacker!
*MultiDamage functions were created firstly for handling shotgun shots and any other kind of multi-fire weapon. TraceAttack
won't work without these functions, or it will work buggy.
In conclusion, you'll have to use them. I use Orpheu for hooking ApplyMultiDamage and ClearMultiDamage, nothing is wrong with them, about your "dependency" it's something.
Also, if you want to make fool TakeDamage when mp_friendlyfire is 0, you'll have to done a code like FFA does. (changing m_iTeam offset)
__________________