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
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viña del Mar, Chile
Old 07-17-2014 , 15:13   Re: Ham_TakeDamage with FF, Ham_TraceAttack not working correctly
Reply With Quote #8

2 things.

1) https://github.com/Arkshine/CSSDK/bl.../wpn_knife.cpp
2)
PHP Code:
        ClearMultiDamage();

        if( 
m_flNextPrimaryAttack 0.4 UTIL_WeaponTimeBase() )
            
pEntity->TraceAttackm_pPlayer->pev20gpGlobals->v_forward, &trDMG_NEVERGIB DMG_BULLET );
        else
            
pEntity->TraceAttackm_pPlayer->pev15gpGlobals->v_forward, &trDMG_NEVERGIB DMG_BULLET );

        
ApplyMultiDamagem_pPlayer->pevm_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)
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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