Incorrect damage calculation on rapid melee weapon swap.

Version
2.6 Stable
Platform
Windows
While playing with a hammer, I discovered a bug. I usually use a knife first to apply bleeding to zombies, then switch weapons.

This time, I switched too quickly: when I attacked with a knife using a strong attack and immediately switched to a hammer, the damage applied came from the hammer strong attack, effectively shortening the attack animation.

This also works with light attacks. I also tested it with spears, and it behaves the same way. It is very likely that this occurs with all melee weapons, not only when starting with a knife for example, using a hammer first and then switching to a knife produces the same effect, with the knife’s damage being applied.

I hope this can be seen in the video, although the quality isn’t the best. I have no mods installed.
 
Reproduction Steps
1. Equip a knife.
2. Attack with a knife (light or strong).
3. Switch to another melee weapon during the attack.
4. Damage is applied from the weapon you switched to.
Link to Logs
https://justpaste.it/memed
Link to Screenshot/Video
https://www.youtube.com/watch?v=1jOnS-3rglY
Back
Top