(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.
authorrubidium
Fri, 14 Sep 2007 21:35:22 +0000
changeset 8074 6226685d955f
parent 8073 42007d9c81bb
child 8075 2cc7ed645b11
(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.
src/viewport.cpp
--- a/src/viewport.cpp	Fri Sep 14 21:32:21 2007 +0000
+++ b/src/viewport.cpp	Fri Sep 14 21:35:22 2007 +0000
@@ -1161,13 +1161,13 @@
 						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;
 					}
 				}