[Scummvm-git-logs] scummvm master -> 6d7187ed3cbce90346b351bba838ef8f25d35d53
athrxx
noreply at scummvm.org
Sun Jan 14 16:33:29 UTC 2024
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:
6d7187ed3c SCUMM: (DIG) - fix bug no. 14845
Commit: 6d7187ed3cbce90346b351bba838ef8f25d35d53
https://github.com/scummvm/scummvm/commit/6d7187ed3cbce90346b351bba838ef8f25d35d53
Author: athrxx (athrxx at scummvm.org)
Date: 2024-01-14T17:33:11+01:00
Commit Message:
SCUMM: (DIG) - fix bug no. 14845
("SCUMM: DIG: Conversation is stuck mid-cutscene and the game appears soft-locked")
(regression from def4530d)
Changed paths:
engines/scumm/actor.cpp
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index e52169f50ba..8a6c44563f7 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -543,10 +543,13 @@ int Actor::calcMovementFactor(const Common::Point& next) {
_walkdata.deltaXFactor = deltaXFactor;
_walkdata.deltaYFactor = deltaYFactor;
- if (_vm->_game.version >= 7)
+ if (_vm->_game.version >= 7) {
_walkdata.nextDir = ((int)(atan2((double)deltaXFactor, (double)-deltaYFactor) * 180 / M_PI) + 360) % 360;
- else
+ startWalkAnim((_moving & MF_IN_LEG) ? 2 : 1, _walkdata.nextDir);
+ _moving |= MF_IN_LEG;
+ } else {
_targetFacing = (ABS(diffY) * 3 > ABS(diffX)) ? (deltaYFactor > 0 ? 180 : 0) : (deltaXFactor > 0 ? 90 : 270);
+ }
return actorWalkStep();
}
@@ -597,12 +600,13 @@ int Actor_v3::calcMovementFactor(const Common::Point& next) {
int Actor::actorWalkStep() {
_needRedraw = true;
- int nextFacing = (_vm->_game.version < 7) ? updateActorDirection(true) : _walkdata.nextDir;
- if (!(_moving & MF_IN_LEG) || _facing != nextFacing) {
- if (_walkFrame != _frame || _facing != nextFacing) {
- startWalkAnim(_vm->_game.version >= 7 && (_moving & MF_IN_LEG) ? 2 : 1, nextFacing);
+ if (_vm->_game.version < 7) {
+ int nextFacing = updateActorDirection(true);
+ if (!(_moving & MF_IN_LEG) || _facing != nextFacing) {
+ if (_walkFrame != _frame || _facing != nextFacing)
+ startWalkAnim(1, nextFacing);
+ _moving |= MF_IN_LEG;
}
- _moving |= MF_IN_LEG;
}
if (_walkbox != _walkdata.curbox && _vm->checkXYInBoxBounds(_walkdata.curbox, _pos.x, _pos.y))
More information about the Scummvm-git-logs
mailing list