GRIM: Stop the actors from walking when chaning set. Fix #289

This commit is contained in:
Giulio Camuffo 2011-07-26 16:07:38 +02:00
parent 3223e3d621
commit 341658ec87

View File

@ -1526,6 +1526,15 @@ void GrimEngine::setScene(const char *name) {
void GrimEngine::setScene(Scene *scene) {
if (scene == _currScene)
return;
// Stop the actors. This fixes bug #289 (https://github.com/residual/residual/issues/289)
// and it makes sense too, since when changing set the directions
// and coords change too.
for (ActorListType::iterator i = _actors.begin(); i != _actors.end(); ++i) {
Actor *a = i->_value;
a->stopWalking();
}
Scene *lastScene = _currScene;
_currScene = scene;
_currScene->setSoundParameters(20, 127);