Skip to content

Engine: Fix ancient identical branch warning in the Polymer code

Based on commit 2aca5113, I believe the second branch was supposed to set curpicnum to overpicnum:

Here's the relevant changes from that commit:

-            pth = gltexcache((wal->overpicnum) ? wal->overpicnum : wal->picnum, wal->pal, 0);
+            if ((wal->cstat & 16) || (wal->overpicnum == 0))
+                curpicnum = wal->picnum;
+            else
+                curpicnum = wal->picnum;
+
+            if (picanm[curpicnum]&192) curpicnum += animateoffs(curpicnum,wallnum+16384);
+
+            if (!waloff[curpicnum])
+                loadtile(curpicnum);
+
+            pth = gltexcache(curpicnum, wal->pal, 0);

No idea what fixing this typo changes in effect, but if anything weird starts happening because of this, we can always revert and just remove the conditional instead.

Edited by Dino Bollinger

Merge request reports

Loading