ULTIMA8: Allow turning while retreating in Crusader

The original game allows you to turn while retreating, but that was not
previously possible.

To make the turn always possible, step() now does not wait for the movement
animation.  This should work as AvatarMoverProcess::run terminates early if the
Avatar is busy.
This commit is contained in:
Matthew Duggan
2021-09-11 13:58:13 +09:00
parent e91dda10ff
commit e4ece2a62c
@@ -67,7 +67,7 @@ void CruAvatarMoverProcess::run() {
if (_avatarAngle < 0) {
_avatarAngle = Direction_ToCentidegrees(avatar->getDir());
}
if (!hasMovementFlags(MOVE_FORWARD | MOVE_BACK | MOVE_JUMP | MOVE_STEP)) {
if (!hasMovementFlags(MOVE_FORWARD | MOVE_JUMP | MOVE_STEP)) {
// See comment on _avatarAngle in header about these constants
if (hasMovementFlags(MOVE_TURN_LEFT)) {
if (hasMovementFlags(MOVE_RUN))
@@ -509,7 +509,7 @@ void CruAvatarMoverProcess::step(Animation::Sequence action, Direction direction
return;
//debug(6, "Cru avatar step: picked action %d dir %d (test result %d)", action, direction, res);
waitFor(avatar->doAnim(action, direction));
avatar->doAnim(action, direction);
}
void CruAvatarMoverProcess::tryAttack() {