(svn r14280) -Codechange: use IsRailWaypointTile() instead of IsTileType() and IsRailWaypoint() checks at several places

This commit is contained in:
smatz
2008-09-09 12:26:25 +00:00
parent a527d237aa
commit f503c7c99e
6 changed files with 17 additions and 12 deletions

View File

@@ -2539,9 +2539,8 @@ bool AfterLoadGame()
/* Give owners to waypoints, based on rail tracks it is sitting on.
* If none is available, specify OWNER_NONE */
Waypoint *wp;
Owner owner;
FOR_ALL_WAYPOINTS(wp) {
owner = (IsTileType(wp->xy, MP_RAILWAY) && IsRailWaypoint(wp->xy) ? GetTileOwner(wp->xy) : OWNER_NONE);
Owner owner = (IsRailWaypointTile(wp->xy) ? GetTileOwner(wp->xy) : OWNER_NONE);
wp->owner = IsValidPlayerID(owner) ? owner : OWNER_NONE;
}
}