diff options
author | Vladimir Menshakov | 2010-02-25 21:03:48 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2010-02-25 21:03:48 +0000 |
commit | 00d3d5bffec293c2b66ad5253bdef9ce660018ce (patch) | |
tree | a1f5380666a2fc3d3e192ad2061cb53fa9d423ae /engines | |
parent | 6876e1f9debeae3a77213e7339f1d26df3fcf498 (diff) | |
download | scummvm-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.cpp | 13 |
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); } |