-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prehit #146
Comments
I did some tests here and confirmed COMBAT_PREHIT breaks the anim because it will set swing delay = 0.1s, but the swing delay can't be faster than anim delay (0.7s) otherwise it will break the anim anyway, combat swing is composed by: as far I know, the COMBAT_PREHIT was created many yeas ago to avoid an old bug where ppl start the swing to put the target into war mode, then run some steps away to come back and make the target hit first, flagging the target as criminal instead the attacker. COMBAT_PREHIT was created to make the first attack hit instantly and avoid this. But today COMBAT_PREHIT is not needed anymore, you can use AttackingIsaCrime=1 to make the attacker criminal instantly just by starting the attack (even without hit) so COMBAT_PREHIT doesn't cause any big changes on swing delay, doesn't fix nothing and it will also break the animation. Maybe the best solution for this problem is just disable this feature |
COMBAT_PREHIT was added years back as backwards compatibility, at some point the delay check was fucked on some version and people loved that pvp mode when you could charge your swing and land it when you get close (if you think of it, it's something you would do in real life, just have your weapon ready to hit when you approach your enemy), but it was not desired so they fixed it ... and people asked for it since players loved it, hence the flag was added back. |
my fault, I forgot this 2nd functionality of COMBAT_PREHIT to "pre-load" the swing and instantly hit (0.0s delay) when the target comes nearby but anyway doing some quick tests, this 1st hit seems to be the same even with COMBAT_PREHIT enabled or disabled, because the current animation speed (0.7s) is faster than the old anim speed, so it already works like an "native COMBAT_PREHIT" (and its also more realistic give an fast swing instead hit instantly with 0.0s delay and no anim :P) maybe COMBAT_PREHIT made some difference many years ago using the old (slow) anim speed, but today using the new (fast) anim speed I can't see any big difference. Can you do some tests to check this? |
https://youtu.be/Vt_hjda6fXQ |
Will it fix? |
yea as I said on previous post, this issue is confirmed. But the main question is: COMBAT_PREHIT will set the attack delay to 0ms, and setting this 0ms delay will also play the animation and immediatelly call the next swing action in 0ms, which will break the animation being played so maybe the best fix is just disable COMBAT_PREHIT. I tested a quick combat using both COMBAT_PREHIT enabled and disabled, and both seems to be the same thing. So it makes more sense just remove COMBAT_PREHIT from source instead keep using it you can disable COMBAT_PREHIT and get exactly the same 0ms result using this simple trigger:
but as I said, this makes the attack speed/anim too fast and will break the animation. Default value is 7ms, which is already fast and works perfectly. Any value lower than 7 will make the animation incomplete skipping some frames (0 will skip most frames and will break it completely, 6 will just skip some frames) |
Can it work like source X, but it will display an error animation when switching weapons, and it has not been fixed! |
Prehit causes an attack animation error
The text was updated successfully, but these errors were encountered: