From 3f99c2c9dd8f92c8f8925f5824c6f69fe7c2305f Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 11 Nov 2018 01:58:50 +0000 Subject: PINK: Fix For Assertion When Looking Under Bed in Six House. The action which triggers the assertion is CheckUnderBedDB. This changes ActionPlay::OnStart method to be similar to superclass implementation with regard to _startFrame to avoid this. However, the animation still glitches repeating several times, but this is a script bug in the original and should be addressed in a workaround in a future commit. This should fix the main issue in Trac bug #10800. --- engines/pink/objects/actions/action_play.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/pink/objects/actions/action_play.cpp b/engines/pink/objects/actions/action_play.cpp index fb4f05f0cb..9551f13424 100644 --- a/engines/pink/objects/actions/action_play.cpp +++ b/engines/pink/objects/actions/action_play.cpp @@ -64,7 +64,10 @@ void ActionPlay::onStart() { int frameCount = _decoder.getFrameCount(); if (_stopFrame == -1 || _stopFrame >= frameCount) _stopFrame = frameCount - 1; - assert(_startFrame < _decoder.getFrameCount()); + + if (_startFrame >= _decoder.getFrameCount()) + _startFrame = 0; + ActionCEL::setFrame(_startFrame); // doesn't need to decode startFrame here. Update method will decode } -- cgit v1.2.3