diff options
-rw-r--r-- | engines/tsage/ringworld_scenes1.cpp | 18 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes1.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp index 8299a05967..6a82ca7e9d 100644 --- a/engines/tsage/ringworld_scenes1.cpp +++ b/engines/tsage/ringworld_scenes1.cpp @@ -1330,6 +1330,24 @@ void Scene40::Action8::signal() { } } +void Scene40::Action8::dispatch() { + if (_action) + _action->dispatch(); + + if (_delayFrames) { + uint32 frameNumber = _globals->_events.getFrameNumber(); + if ((_startFrame + 60) < frameNumber) { + --_delayFrames; + _startFrame = frameNumber; + + if (_delayFrames <= 0) { + _delayFrames = 0; + signal(); + } + } + } +} + /*--------------------------------------------------------------------------*/ void Scene40::DyingKzin::doAction(int action) { diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h index 283cf68e07..229dfc7130 100644 --- a/engines/tsage/ringworld_scenes1.h +++ b/engines/tsage/ringworld_scenes1.h @@ -201,6 +201,7 @@ class Scene40 : public Scene { class Action8 : public Action { public: virtual void signal(); + virtual void dispatch(); }; /* Objects */ |