summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-14 21:35:22 +0000
committerrubidium <rubidium@openttd.org>2007-09-14 21:35:22 +0000
commitfaa183a060249be6d941c91ad1527c14395ff41d (patch)
tree6a69b0518d1dcf7d1e5ea10c974ad1ae547337bf
parent6f296b9870d0dcb23be911cb646ffd0518c0c1fe (diff)
downloadopenttd-faa183a060249be6d941c91ad1527c14395ff41d.tar.xz
(svn r11103) -Codechange: remove pointless comparison as it can never ever be true (unless you've got at least 3 bit errors and then you're screwed anyway). Patch by frosch.
-rw-r--r--src/viewport.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 26af2dfb6..5880c445f 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1161,13 +1161,13 @@ static void ViewportSortParentSprites(ParentSpriteToDraw *psd[])
continue;
}
} else {
+ /* We only change the order, if it is definite.
+ * I.e. every single order of X, Y, Z says ps2 is behind ps or they overlap.
+ * That is: If one partial order says ps behind ps2, do not change the order.
+ */
if (ps->xmax < ps2->xmin ||
ps->ymax < ps2->ymin ||
- ps->zmax < ps2->zmin || (
- ps->xmin < ps2->xmax &&
- ps->ymin < ps2->ymax &&
- ps->zmin < ps2->zmax
- )) {
+ ps->zmax < ps2->zmin) {
continue;
}
}