I have found that if I do it often enough or too quickly, for some reason I can’t attack with the sword anymore…
What does seem to happen is that the isAttacking
state in the ActiveWeapon
singleton gets stuck…
One solution might be to reset the flag when the weapon is switched, another might be to delay the actual weapon switch until after the cooldown has finished… That might be preferable as it might give a tactical element on when the player can attack again, and more importantly prevent the player spamming attacks at a higher rate by swapping between them all the time…