mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-20 23:09:42 +00:00
Fixed wrong mUse wrapping
This commit is contained in:
parent
13918e3b70
commit
3eadb84142
1 changed files with 2 additions and 1 deletions
|
@ -378,7 +378,8 @@ namespace MWMechanics
|
|||
stats.setMovementFlag(MWMechanics::CreatureStats::Flag_Sneak, controls.mSneak);
|
||||
|
||||
// Same as mUse % max AttackType int value
|
||||
AttackType attackType = static_cast<AttackType>(controls.mUse % static_cast<int>(AttackType::Thrust));
|
||||
AttackType attackType
|
||||
= static_cast<AttackType>(controls.mUse % (static_cast<int>(AttackType::Thrust) + 1));
|
||||
|
||||
stats.setAttackingOrSpell(attackType != AttackType::NoAttack);
|
||||
stats.setAttackType(attackTypeName(attackType));
|
||||
|
|
Loading…
Reference in a new issue