diff options
author | Paul Gilbert | 2011-08-19 21:15:59 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-08-19 21:15:59 +1000 |
commit | 2b0cec1cd7b87fe971f2adc44da20e03e71991dc (patch) | |
tree | 037798f16a21204a2dd6275591ea2a52a021a292 /engines | |
parent | 372d488b3bc01f6dce06dde83d4818a010695c70 (diff) | |
download | scummvm-rg350-2b0cec1cd7b87fe971f2adc44da20e03e71991dc.tar.gz scummvm-rg350-2b0cec1cd7b87fe971f2adc44da20e03e71991dc.tar.bz2 scummvm-rg350-2b0cec1cd7b87fe971f2adc44da20e03e71991dc.zip |
CGE: Fix problem with being able to walk into protected areas
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge/walk.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/cge/walk.cpp b/engines/cge/walk.cpp index a418bfb178..7bce9e29e6 100644 --- a/engines/cge/walk.cpp +++ b/engines/cge/walk.cpp @@ -49,7 +49,8 @@ bool Cluster::isValid() const { bool Cluster::chkBar() const { assert(_vm->_now <= _vm->_caveMax); - return (_a == _vm->_barriers[_vm->_now]._horz) && (_b == _vm->_barriers[_vm->_now]._vert); + return (_a < 0) || (_b < 0) || (_a >= _vm->_barriers[_vm->_now]._horz) || + (_b >= _vm->_barriers[_vm->_now]._vert); } Cluster XZ(int x, int y) { |