diff options
author | Paul Gilbert | 2011-02-15 21:55:38 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-02-15 21:55:38 +1100 |
commit | 96df5dfa82e6d281cbf84da1606a4639ff0a6f1f (patch) | |
tree | 9e480671117e2dc8e1d1f04be444ede1f33959b5 /engines/tsage/core.cpp | |
parent | c45d141dae4b022fa7e3cc3a9b6b4b1d90117fe0 (diff) | |
download | scummvm-rg350-96df5dfa82e6d281cbf84da1606a4639ff0a6f1f.tar.gz scummvm-rg350-96df5dfa82e6d281cbf84da1606a4639ff0a6f1f.tar.bz2 scummvm-rg350-96df5dfa82e6d281cbf84da1606a4639ff0a6f1f.zip |
TSAGE: Bugfix to correctly clear the walk region intersection lists when changing scenes
Diffstat (limited to 'engines/tsage/core.cpp')
-rw-r--r-- | engines/tsage/core.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 6d27293721..fcf1afc6eb 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -880,8 +880,9 @@ int PlayerMover::proc1(int *routeList, int srcRegion, int destRegion, int &v) { } else { int foundIndex = 0; int idx = 0; - while (_globals->_walkRegions._idxList[srcWalkRegion._idxListIndex + idx]) { - if (_globals->_walkRegions._idxList[srcWalkRegion._idxListIndex + idx] == destRegion) { + int currDest; + while ((currDest = _globals->_walkRegions._idxList[srcWalkRegion._idxListIndex + idx]) != 0) { + if (currDest == destRegion) { foundIndex = idx; break; } @@ -2950,6 +2951,13 @@ void WRField18::load(byte *data) { /*--------------------------------------------------------------------------*/ +void WalkRegions::clear() { + _regionList.clear(); + _field18.clear(); + _idxList.clear(); + _idxList2.clear(); +} + void WalkRegions::load(int sceneNum) { clear(); |