diff options
author | smatz <smatz@openttd.org> | 2008-04-16 19:36:30 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-04-16 19:36:30 +0000 |
commit | 71ebefbbd74e7956ad5cb690b8db240b19dcda26 (patch) | |
tree | 2a92fd1c29d4280392a245fceec3ab60517e834f | |
parent | efdf8b8c8a9b9260de260367041503923fad9673 (diff) | |
download | openttd-71ebefbbd74e7956ad5cb690b8db240b19dcda26.tar.xz |
(svn r12738) -Fix (r12736): some sprites could be left unsorted
-rw-r--r-- | src/viewport.cpp | 7 |
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; |