From 034e1384aad1ed91bb8879cded8e0247ae6f9000 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 4 May 2015 13:41:01 -1000 Subject: SHERLOCK: Fix picking up Sarah's effects in Morgue --- engines/sherlock/scene.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/sherlock') diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index 8a47707aea..857dff4951 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -1386,7 +1386,11 @@ void Scene::doBgAnim() { for (int idx = _canimShapes.size() - 1; idx >= 0; --idx) { Object &o = _canimShapes[idx]; - if (o._type == REMOVE) { + + if (o._type == INVALID) { + // Anim shape was invalidated by checkEndOfSequence, so at this point we can remove it + _canimShapes.remove_at(idx); + } else if (o._type == REMOVE) { if (_goToScene == -1) screen.slamArea(o._position.x, o._position.y, o._delta.x, o._delta.y); -- cgit v1.2.3