summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-04-16 19:36:30 +0000
committersmatz <smatz@openttd.org>2008-04-16 19:36:30 +0000
commit1f22f47b3badf4828da015fcaada69b17edc42f6 (patch)
tree2a92fd1c29d4280392a245fceec3ab60517e834f /src
parent7957bdde137db5d59dc39e01f08661ee8c768ebd (diff)
downloadopenttd-1f22f47b3badf4828da015fcaada69b17edc42f6.tar.xz
(svn r12738) -Fix (r12736): some sprites could be left unsorted
Diffstat (limited to 'src')
-rw-r--r--src/viewport.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index b724c60a5..7d6b22ac6 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1337,10 +1337,13 @@ static void ViewportDrawTileSprites(const TileSpriteToDrawVector *tstdv)
static void ViewportSortParentSprites(ParentSpriteToDraw *psd[])
{
- for (; *psd != NULL; psd++) {
+ while (*psd != NULL) {
ParentSpriteToDraw *ps = *psd;
- if (ps->comparison_done) continue;
+ if (ps->comparison_done) {
+ psd++;
+ continue;
+ }
ps->comparison_done = true;