From fb504e06ec51cb767242b2bdb32690f583cc35a5 Mon Sep 17 00:00:00 2001 From: Matthew Jimenez Date: Wed, 11 Oct 2023 20:30:04 -0500 Subject: [PATCH] ULTIMA8: Slow down to walk or step if animation ends off land. This fixes most cases of running down stairs causing a jump. The original game tries harder to not end off land, but controls worse due to that. --- .../ultima8/world/actors/u8_avatar_mover_process.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp b/engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp index 535c3bf0d8b..5beb7e097e4 100644 --- a/engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp +++ b/engines/ultima/ultima8/world/actors/u8_avatar_mover_process.cpp @@ -691,6 +691,13 @@ void U8AvatarMoverProcess::step(Animation::Sequence action, Direction direction, action = Animation::stand; } + if (action == Animation::walk && res == Animation::END_OFF_LAND) { + action = Animation::step; + } + + if (action == Animation::run && res == Animation::END_OFF_LAND) { + action = Animation::walk; + } bool moving = (action == Animation::run || action == Animation::walk);