aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kmovement.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index f94750110c..f6e6790e66 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -268,9 +268,12 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
axis = (int16)readSelectorValue(segMan, mover, SELECTOR(b_xAxis));
if ((getSciVersion() >= SCI_VERSION_1_LATE)) {
- // save last position into mover
- writeSelectorValue(segMan, mover, SELECTOR(xLast), x);
- writeSelectorValue(segMan, mover, SELECTOR(yLast), y);
+ // Mixed-Up Fairy Tales has no xLast/yLast selectors
+ if (SELECTOR(xLast) != -1) {
+ // save last position into mover
+ writeSelectorValue(segMan, mover, SELECTOR(xLast), x);
+ writeSelectorValue(segMan, mover, SELECTOR(yLast), y);
+ }
}
//printf("movecnt %d, move speed %d\n", movcnt, max_movcnt);