aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorVladimir Menshakov2010-02-25 21:03:48 +0000
committerVladimir Menshakov2010-02-25 21:03:48 +0000
commit00d3d5bffec293c2b66ad5253bdef9ce660018ce (patch)
treea1f5380666a2fc3d3e192ad2061cb53fa9d423ae /engines
parent6876e1f9debeae3a77213e7339f1d26df3fcf498 (diff)
downloadscummvm-rg350-00d3d5bffec293c2b66ad5253bdef9ce660018ce.tar.gz
scummvm-rg350-00d3d5bffec293c2b66ad5253bdef9ce660018ce.tar.bz2
scummvm-rg350-00d3d5bffec293c2b66ad5253bdef9ce660018ce.zip
interpret several consequent moving command as one.
svn-id: r48130
Diffstat (limited to 'engines')
-rw-r--r--engines/teenagent/scene.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index 530e6367a8..6ed6d72c7a 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -455,6 +455,19 @@ Animation * Scene::getAnimation(byte slot) {
void Scene::push(const SceneEvent &event) {
//debug(0, "push");
//event.dump();
+ if (event.type == SceneEvent::kWalk && !events.empty()) {
+ SceneEvent &prev = events.back();
+ if (prev.type == SceneEvent::kWalk) {
+ debug(0, "fixing double-move [skipping event!]");
+ if ((event.color & 2) != 0) { //relative move
+ prev.dst.x += event.dst.x;
+ prev.dst.y += event.dst.y;
+ } else {
+ prev.dst = event.dst;
+ }
+ return;
+ }
+ }
events.push_back(event);
}