mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
Fix CharacterController::setAttackTypeBasedOnMovement
This commit is contained in:
parent
bd6b984022
commit
6a75942907
@ -2737,10 +2737,9 @@ void CharacterController::setVisibility(float visibility)
|
|||||||
void CharacterController::setAttackTypeBasedOnMovement()
|
void CharacterController::setAttackTypeBasedOnMovement()
|
||||||
{
|
{
|
||||||
float *move = mPtr.getClass().getMovementSettings(mPtr).mPosition;
|
float *move = mPtr.getClass().getMovementSettings(mPtr).mPosition;
|
||||||
|
if (std::abs(move[1]) > std::abs(move[0]) + 0.2f) // forward-backward
|
||||||
if (move[1] && !move[0]) // forward-backward
|
|
||||||
mAttackType = "thrust";
|
mAttackType = "thrust";
|
||||||
else if (move[0] && !move[1]) //sideway
|
else if (std::abs(move[0]) > std::abs(move[1]) + 0.2f) // sideway
|
||||||
mAttackType = "slash";
|
mAttackType = "slash";
|
||||||
else
|
else
|
||||||
mAttackType = "chop";
|
mAttackType = "chop";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user