Skip to content

Commit

Permalink
SCUMM: Fix actor behind man-eating plant issue in v0.
Browse files Browse the repository at this point in the history
Thanks segra for finding how it works in the original interpreter. The plant is handled specially and 0 is used instead of its y-position.
  • Loading branch information
tobigun committed Feb 11, 2012
1 parent b999fe9 commit 6ca91a2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions engines/scumm/actor.cpp
Expand Up @@ -1474,6 +1474,18 @@ void ScummEngine::processActors() {
}
}
}
} else if (_game.version == 0) {
for (int j = 0; j < numactors; ++j) {
for (int i = 0; i < numactors; ++i) {
// Note: the plant is handled different in v0, the y value is not used.
// In v1/2 this is done by the actor's elevation instead.
int sc_actor1 = (_sortedActors[j]->_number == 19 ? 0 : _sortedActors[j]->getPos().y);
int sc_actor2 = (_sortedActors[i]->_number == 19 ? 0 : _sortedActors[i]->getPos().y);
if (sc_actor1 < sc_actor2) {
SWAP(_sortedActors[i], _sortedActors[j]);
}
}
}
} else {
for (int j = 0; j < numactors; ++j) {
for (int i = 0; i < numactors; ++i) {
Expand Down

0 comments on commit 6ca91a2

Please sign in to comment.