SHERLOCK: Fix animation for retrieving pocket watch

This commit is contained in:
Paul Gilbert 2015-05-01 09:57:19 -10:00
parent ac642fdfb3
commit ffd65cfd36
2 changed files with 9 additions and 1 deletions

View File

@ -719,6 +719,8 @@ bool Object::checkEndOfSequence() {
// Free the images
delete _images;
_images = nullptr;
_imageFrame = nullptr;
}
} else {
_type = INVALID;

View File

@ -1050,6 +1050,12 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
// Set canim to REMOVE type and free memory
cObj.checkObject();
for (uint idx = 0; idx < _canimShapes.size(); ++idx) {
if (&_canimShapes[idx] == &cObj) {
_canimShapes.remove_at(idx);
break;
}
}
if (gotoCode > 0 && !talk._talkToAbort) {
_goToScene = gotoCode;
@ -1376,7 +1382,7 @@ void Scene::doBgAnim() {
if (_goToScene == -1)
screen.slamArea(o._position.x, o._position.y, o._delta.x, o._delta.y);
_canimShapes.remove_at(idx);
_canimShapes[idx]._type = INVALID;
if (_ongoingCans > 0)
--_ongoingCans;
} else if (o._type == ACTIVE_BG_SHAPE) {