mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:23:54 +00:00
Fix CharacterController::setAttackTypeBasedOnMovement
This commit is contained in:
parent
bd6b984022
commit
6a75942907
1 changed files with 2 additions and 3 deletions
|
@ -2737,10 +2737,9 @@ void CharacterController::setVisibility(float visibility)
|
|||
void CharacterController::setAttackTypeBasedOnMovement()
|
||||
{
|
||||
float *move = mPtr.getClass().getMovementSettings(mPtr).mPosition;
|
||||
|
||||
if (move[1] && !move[0]) // forward-backward
|
||||
if (std::abs(move[1]) > std::abs(move[0]) + 0.2f) // forward-backward
|
||||
mAttackType = "thrust";
|
||||
else if (move[0] && !move[1]) //sideway
|
||||
else if (std::abs(move[0]) > std::abs(move[1]) + 0.2f) // sideway
|
||||
mAttackType = "slash";
|
||||
else
|
||||
mAttackType = "chop";
|
||||
|
|
Loading…
Reference in a new issue