aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-30 08:56:16 +1000
committerPaul Gilbert2011-07-30 08:56:16 +1000
commit4a64e928cf07e8333312a5d74a72034d56aee2fe (patch)
treec50584b42dcbd692430e159f8ee57d0c8ab2d22e
parent9f00f18e4efd84202146d683abc007508ca0f222 (diff)
downloadscummvm-rg350-4a64e928cf07e8333312a5d74a72034d56aee2fe.tar.gz
scummvm-rg350-4a64e928cf07e8333312a5d74a72034d56aee2fe.tar.bz2
scummvm-rg350-4a64e928cf07e8333312a5d74a72034d56aee2fe.zip
TSAGE: Add missing dispatch method to fix getting shot too quickly in Scene #40
-rw-r--r--engines/tsage/ringworld_scenes1.cpp18
-rw-r--r--engines/tsage/ringworld_scenes1.h1
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 */