diff options
author | frosch <frosch@openttd.org> | 2013-10-12 16:30:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-10-12 16:30:42 +0000 |
commit | 35d7e8bca4e24bc211ed24d07fba62193d5f5f31 (patch) | |
tree | 5bd7a702966ef90ce1c815b3d73d380e6be0e628 /src/newgrf_object.cpp | |
parent | 2080a8c16ff4190a8a32f6f3618323f2d3671f5c (diff) | |
download | openttd-35d7e8bca4e24bc211ed24d07fba62193d5f5f31.tar.xz |
(svn r25833) -Codechange: Move ObjectType from map array into pool item.
Diffstat (limited to 'src/newgrf_object.cpp')
-rw-r--r-- | src/newgrf_object.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index 1db4b02c6..8eaff1385 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -190,7 +190,7 @@ static uint32 GetClosestObject(TileIndex tile, ObjectType type, const Object *cu uint32 best_dist = UINT32_MAX; const Object *o; FOR_ALL_OBJECTS(o) { - if (GetObjectType(o->location.tile) != type || o == current) continue; + if (o->type != type || o == current) continue; best_dist = min(best_dist, DistanceManhattan(tile, o->location.tile)); } |