[Scummvm-git-logs] scummvm master -> 51cea7fcce1f5e90e3d47b1d8137a8cd5c478b87
OMGPizzaGuy
48367439+OMGPizzaGuy at users.noreply.github.com
Sun Aug 23 16:02:06 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
51cea7fcce ULTIMA8: Fix avatar idle animations
Commit: 51cea7fcce1f5e90e3d47b1d8137a8cd5c478b87
https://github.com/scummvm/scummvm/commit/51cea7fcce1f5e90e3d47b1d8137a8cd5c478b87
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2020-08-23T11:01:38-05:00
Commit Message:
ULTIMA8: Fix avatar idle animations
Changed paths:
engines/ultima/ultima8/world/actors/avatar_mover_process.cpp
diff --git a/engines/ultima/ultima8/world/actors/avatar_mover_process.cpp b/engines/ultima/ultima8/world/actors/avatar_mover_process.cpp
index 0c23356543..a05ec2a842 100644
--- a/engines/ultima/ultima8/world/actors/avatar_mover_process.cpp
+++ b/engines/ultima/ultima8/world/actors/avatar_mover_process.cpp
@@ -690,6 +690,18 @@ void AvatarMoverProcess::handleNormalMode() {
if (Kernel::get_instance()->getNumProcesses(1, ActorAnimProcess::ACTOR_ANIM_PROC_TYPE))
return;
+ // if we were running, slow to a walk before stopping
+ if (lastanim == Animation::run) {
+ waitFor(avatar->doAnim(Animation::walk, direction));
+ return;
+ }
+
+ // not doing anything in particular? stand
+ if (lastanim != Animation::stand && currentIdleTime == 0) {
+ waitFor(avatar->doAnim(Animation::stand, direction));
+ return;
+ }
+
// idle
_idleTime = currentIdleTime + 1;
@@ -698,7 +710,7 @@ void AvatarMoverProcess::handleNormalMode() {
if ((getRandom() % 1500) + 30 < _idleTime) {
_lastHeadShakeAnim = lastanim;
waitFor(avatar->doAnim(Animation::stand, direction));
- _idleTime = 0;
+ _idleTime = 1;
return;
}
} else {
@@ -710,20 +722,10 @@ void AvatarMoverProcess::handleNormalMode() {
else
nextanim = Animation::lookLeft;
waitFor(avatar->doAnim(nextanim, direction));
- _idleTime = 0;
+ _idleTime = 1;
return;
}
}
-
- // if we were running, slow to a walk before stopping
- if (lastanim == Animation::run) {
- waitFor(avatar->doAnim(Animation::walk, direction));
- }
-
- // not doing anything in particular? stand
- if (lastanim != Animation::stand) {
- waitFor(avatar->doAnim(Animation::stand, direction));
- }
}
void AvatarMoverProcess::step(Animation::Sequence action, Direction direction,
More information about the Scummvm-git-logs
mailing list