From 35d7e8bca4e24bc211ed24d07fba62193d5f5f31 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 12 Oct 2013 16:30:42 +0000 Subject: (svn r25833) -Codechange: Move ObjectType from map array into pool item. --- src/newgrf_object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/newgrf_object.cpp') 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)); } -- cgit v1.2.3-54-g00ecf