mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
GRIM: The rest chore must always play. Fix #291
This commit is contained in:
+5
-32
@@ -1132,21 +1132,9 @@ void Actor::update() {
|
||||
_walkCostume->playChoreLooping(_walkChore);
|
||||
_walkCostume->fadeChoreIn(_walkChore, 150);
|
||||
}
|
||||
|
||||
if (_restChore >= 0) {
|
||||
_restCostume->fadeChoreOut(_restChore, 150);
|
||||
_restCostume->stopChore(_restChore);
|
||||
}
|
||||
} else {
|
||||
if (_walkedLast && _walkCostume->isChoring(_walkChore, false) >= 0) {
|
||||
_walkCostume->fadeChoreOut(_walkChore, 150);
|
||||
_walkCostume->stopChore(_walkChore);
|
||||
|
||||
if (_restChore >= 0) {
|
||||
_restCostume->playChoreLooping(_restChore);
|
||||
_restCostume->fadeChoreIn(_restChore, 150);
|
||||
}
|
||||
}
|
||||
} else if (_walkedLast && _walkCostume->isChoring(_walkChore, false) >= 0) {
|
||||
_walkCostume->fadeChoreOut(_walkChore, 150);
|
||||
_walkCostume->stopChore(_walkChore);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1154,21 +1142,6 @@ void Actor::update() {
|
||||
if (_walkedCur || _walkedLast)
|
||||
_currTurnDir = 0;
|
||||
|
||||
if (_restChore >= 0) {
|
||||
if (_currTurnDir != 0) {
|
||||
if (_turnCostume->isChoring(getTurnChore(_currTurnDir), false) >= 0) {
|
||||
_restCostume->fadeChoreOut(_restChore, 500);
|
||||
_restCostume->stopChore(_restChore);
|
||||
}
|
||||
}
|
||||
else if (_lastTurnDir != 0) {
|
||||
if (!_walkedCur && _turnCostume->isChoring(getTurnChore(_lastTurnDir), false) >= 0) {
|
||||
_restCostume->playChoreLooping(_restChore);
|
||||
_restCostume->fadeChoreIn(_restChore, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_lastTurnDir != 0 && _lastTurnDir != _currTurnDir) {
|
||||
_turnCostume->fadeChoreOut(getTurnChore(_lastTurnDir), 150);
|
||||
_turnCostume->stopChore(getTurnChore(_lastTurnDir));
|
||||
@@ -1182,7 +1155,7 @@ void Actor::update() {
|
||||
|
||||
// The rest chore might have been stopped because of a
|
||||
// StopActorChore(nil). Restart it if so.
|
||||
if (!_walkedCur && _currTurnDir == 0 && _restChore >= 0 && _restCostume->isChoring(_restChore, false) < 0)
|
||||
if (_restChore >= 0 && _restCostume->isChoring(_restChore, false) < 0)
|
||||
_restCostume->playChoreLooping(_restChore);
|
||||
|
||||
_walkedLast = _walkedCur;
|
||||
@@ -1215,7 +1188,7 @@ void Actor::update() {
|
||||
if (_talkAnim != -1 && _talkChore[_talkAnim] >= 0)
|
||||
_talkCostume[_talkAnim]->stopChore(_talkChore[_talkAnim]);
|
||||
|
||||
_talkCostume[0]->playChore(_talkChore[0]);
|
||||
_talkCostume[0]->playChoreLooping(_talkChore[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user