aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/world.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-04-12 10:41:48 +0200
committerEugene Sandulenko2016-04-12 10:59:53 +0200
commitf5979abaa28eece472400ef83a7acc2bdfc74de9 (patch)
treedd6635bbd698af10b3156c951d2519c1da37d9b7 /engines/wage/world.cpp
parentcd01e2d54603992aa5066b945a64d0a81c2f161a (diff)
downloadscummvm-rg350-f5979abaa28eece472400ef83a7acc2bdfc74de9.tar.gz
scummvm-rg350-f5979abaa28eece472400ef83a7acc2bdfc74de9.tar.bz2
scummvm-rg350-f5979abaa28eece472400ef83a7acc2bdfc74de9.zip
WAGE: Fix object sorting. Fixes many glitches
Diffstat (limited to 'engines/wage/world.cpp')
-rw-r--r--engines/wage/world.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp
index 7e7bc33712..954a425b7b 100644
--- a/engines/wage/world.cpp
+++ b/engines/wage/world.cpp
@@ -431,9 +431,9 @@ static bool objComparator(const Obj *o1, const Obj *o2) {
bool o1Immobile = (o1->_type == Obj::IMMOBILE_OBJECT);
bool o2Immobile = (o2->_type == Obj::IMMOBILE_OBJECT);
if (o1Immobile == o2Immobile) {
- return o1->_index - o2->_index;
+ return o1->_index < o2->_index;
}
- return o1Immobile ? -1 : 1;
+ return o1Immobile;
}
void World::move(Obj *obj, Scene *scene, bool skipSort) {