Unexpected TraceAttack
TraceAttack deal damage for no reason. (It shouldn't deal any).
I want to show the result video. It is only a few seconds but you will see. Link: https://drive.google.com/file/d/1tTm...ew?usp=sharing P1 is me and P2 is my helper. 1. I hit him with "att" command. Working fine. (do nothing) Expected prints. 2. I say start then he hits me with his knife or anything. (do nothing) Expected prints. 3. I hit him again with "att" command. I take the damage from the 2. point and it wasn't expected. I had a bind to "att" so that's why you can't see I writed to console. Same results with multiple players. If you traceattack someone. Then anybody else he will receive the first one's damage. Same results with different team members. As I know the TraceAttack should deal any damage. It's only for the blood and directions. If I use TraceAttack as a CT on a T the result should be the same (with no damage) just with bloods. Here is the code: PHP Code:
|
Re: Unexpected TraceAttack
show the test code.
|
Re: Unexpected TraceAttack
Tested with AMXX 1.8 and 1.9, on HLDS and ReHLDS, on Linux and Windows, with players and bots. The results are the same.
I detected when mystery damage has taken it says 15.0 that is actually not true cause after I repeat the last damage on myself it multipled by 1/3 so 5.0. Edit: Updated source code in comment one. That is generating the following logs: Code:
L 01/11/2021 - 08:22:14: CMD ATT! FROM Johan as Corn TO [POD]Headshot Deluxe (96) WITH 50.00Edit: As I see the damage receiver will be te prev attack's target and not the sender. In this example it is me both but can be anybody else. |
Re: Unexpected TraceAttack
Well, technically we can just block every damage from before the trace attack to after the trace attack. This solve the problem. (To make sure I will check this in more situations.)
After all this still be a problem or a bug. I think something is wrong in the general amxmodx. As soon as I can I will check the cpp files to find solution but i don't promise. My view is that the bug should be connected to the global trace attack. For some unknow reason the addon can't empty the trace puffer or something like that. Maybe it is all bullsh*t but who knows? Here is the code: PHP Code:
|
Re: Unexpected TraceAttack
Before and after calling TraceAttack you need to call "ClearMultiDamage" and "ApplyMultiDamage" respectively.
In reapi you can use rg_multidmg_clear and rg_multidmg_apply, in amxx you will need orpheu. |
Re: Unexpected TraceAttack
TraceAttack calls TakeDamage, it should do damage. However, what you describe is likely because you are missing ClearMultiDamage/ApplyMultiDamage, like CrazY mentioned. You can find orpheu signatures around. This way the damage will be properly applied.
If, for some reasons, you don't want the damage, you have to block it manually. |
Re: Unexpected TraceAttack
Wow. Good to know. Now I can mark this topic as solved. Thank you guys! :)
|
| All times are GMT -4. The time now is 14:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.