summaryrefslogtreecommitdiff
path: root/src/newgrf_engine.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-12-30 21:04:09 +0000
committerpeter1138 <peter1138@openttd.org>2008-12-30 21:04:09 +0000
commit5f4aef3c1117cff2195a3ac12a1b3539e4f978f5 (patch)
tree1f6c1f3657b9f105bc316a47f529d5ab2be21955 /src/newgrf_engine.cpp
parent3bf9e9e9c2b651bfee25c0009ebc1cd3e62e7293 (diff)
downloadopenttd-5f4aef3c1117cff2195a3ac12a1b3539e4f978f5.tar.xz
(svn r14776) -Fix (r14742): ListPositionMap relied on std::map having sorted the map, which is now done by a manual key sorter on SmallMap. This fixes engine ID list sorting.
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r--src/newgrf_engine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index 3b950dc8a..75a082429 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -1114,6 +1114,9 @@ void CommitVehicleListOrderChanges()
}
}
+ /* std::map sorted by default, SmallMap does not */
+ lptr_map.SortByKey();
+
/* Get the target position, if it exists */
if (target_e != NULL) {
uint16 target_position = target_e->list_position;