diff options
author | Paul Gilbert | 2018-04-01 22:54:38 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-04-01 22:54:38 -0400 |
commit | d621bf68164d7fbe8cdd57632db1080f4f74527a (patch) | |
tree | d83468e488cb720ca8d19bdc4e3e4161904bd739 /engines/xeen/party.cpp | |
parent | 0cde83ea01cfa1bfd3253bcfa3a7af0b7af5ad02 (diff) | |
download | scummvm-rg350-d621bf68164d7fbe8cdd57632db1080f4f74527a.tar.gz scummvm-rg350-d621bf68164d7fbe8cdd57632db1080f4f74527a.tar.bz2 scummvm-rg350-d621bf68164d7fbe8cdd57632db1080f4f74527a.zip |
XEEN: Fix object 0 not being removable, _objNumber cleanup
The original used 0 as "unset", and object index + 1 to indicate the
object at the current location. Given all the +1/-1 usages, I've
simplified the use of _objNumber to use -1 as unset, allowing the
direct object index to be used otherwise
Diffstat (limited to 'engines/xeen/party.cpp')
-rw-r--r-- | engines/xeen/party.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp index 31a43be0a4..d92a4952cc 100644 --- a/engines/xeen/party.cpp +++ b/engines/xeen/party.cpp @@ -1439,8 +1439,8 @@ bool Party::giveExt(int mode1, uint val1, int mode2, uint val2, int mode3, uint Sound &sound = *g_vm->_sound; Character &c = _itemsCharacter; - if (intf._objNumber && !scripts._animCounter) { - MazeObject &obj = map._mobData._objects[intf._objNumber - 1]; + if (intf._objNumber != -1 && !scripts._animCounter) { + MazeObject &obj = map._mobData._objects[intf._objNumber]; switch (obj._spriteId) { case 15: if (!files._ccNum) |