(svn r25833) -Codechange: Move ObjectType from map array into pool item.

This commit is contained in:
frosch
2013-10-12 16:30:42 +00:00
parent 2080a8c16f
commit 35d7e8bca4
10 changed files with 56 additions and 62 deletions

View File

@@ -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));
}