GRIM: Don't run the stop_talk chore looping. Fix #295

This commit is contained in:
Giulio Camuffo 2011-07-28 14:46:51 +02:00
parent 8eaa2a38a0
commit 7a8354d429
2 changed files with 12 additions and 5 deletions

View File

@ -948,12 +948,10 @@ void Actor::shutUp() {
if (_talkAnim != -1 && _talkChore[_talkAnim] >= 0)
_talkCostume[_talkAnim]->stopChore(_talkChore[_talkAnim]);
_lipSync = NULL;
stopTalking();
} else if (_mumbleChore >= 0 && _mumbleCostume->isChoring(_mumbleChore, false) >= 0) {
_mumbleCostume->stopChore(_mumbleChore);
}
if (_talkChore[0] >= 0 && _talkCostume[0]->isChoring(_talkChore[0], true) < 0) {
// _talkChore[0] is *_stop_talk
_talkCostume[0]->playChoreLooping(_talkChore[0]);
stopTalking();
}
if (_sayLineText) {
@ -1216,7 +1214,7 @@ void Actor::update() {
if (_talkAnim != -1 && _talkChore[_talkAnim] >= 0)
_talkCostume[_talkAnim]->stopChore(_talkChore[_talkAnim]);
_talkCostume[0]->playChore(_talkChore[0]);
stopTalking();
}
}
}
@ -1430,6 +1428,14 @@ void Actor::freeCostumeChore(Costume *toFree, Costume *&cost, int &chore) {
}
}
void Actor::stopTalking() {
if (_talkChore[0] >= 0 && _talkCostume[0]->isChoring(_talkChore[0], true) < 0) {
// _talkChore[0] is *_stop_talk
// Don't playLooping it, or else manny's mouth will flicker when he smokes.
_talkCostume[0]->playChore(_talkChore[0]);
}
}
extern int refSystemTable;
void Actor::costumeMarkerCallback(Footstep step)

View File

@ -184,6 +184,7 @@ private:
void updateWalk();
void addShadowPlane(const char *n, Scene *scene, int shadowId);
bool shouldDrawShadow(int shadowId);
void stopTalking();
Common::String _name;
Common::String _setName; // The actual current set