aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorRobert Göffringmann2003-12-17 23:49:26 +0000
committerRobert Göffringmann2003-12-17 23:49:26 +0000
commitb5dde7b3f906a998b809fcf0f7e396edf1ca949f (patch)
tree7ef4a66e6a77801e4b1ab23164c255c53d07bc72 /sword1
parentf7f97d7ebb7766ac58a1509608c7a2c131875c8a (diff)
downloadscummvm-rg350-b5dde7b3f906a998b809fcf0f7e396edf1ca949f.tar.gz
scummvm-rg350-b5dde7b3f906a998b809fcf0f7e396edf1ca949f.tar.bz2
scummvm-rg350-b5dde7b3f906a998b809fcf0f7e396edf1ca949f.zip
changed fnEnterSection to fix crash at startup.
svn-id: r11722
Diffstat (limited to 'sword1')
-rw-r--r--sword1/logic.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/sword1/logic.cpp b/sword1/logic.cpp
index 9848a9c1ed..10ea42eb43 100644
--- a/sword1/logic.cpp
+++ b/sword1/logic.cpp
@@ -1283,7 +1283,10 @@ int SwordLogic::fnEnterSection(BsObject *cpt, int32 id, int32 screen, int32 d, i
if (screen >= TOTAL_SECTIONS)
error("mega %d tried entering section %d", id, screen);
- if (cpt->o_type == TYPE_PLAYER)
+ /* if (cpt->o_type == TYPE_PLAYER)
+ ^= this was the original condition from the game sourcecode.
+ not sure why it doesn't work*/
+ if (id == PLAYER)
_scriptVars[NEW_SCREEN] = screen;
else
cpt->o_screen = screen; // move the mega