Mercurial > hg > openttd
diff src/openttd.cpp @ 10099:3bb7e18e8b0a draft
(svn r14280) -Codechange: use IsRailWaypointTile() instead of IsTileType() and IsRailWaypoint() checks at several places
author | smatz <smatz@openttd.org> |
---|---|
date | Tue, 09 Sep 2008 12:26:25 +0000 (2008-09-09) |
parents | 6301378f3e0f |
children | 791509dcfef5 |
line wrap: on
line diff
--- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -2539,9 +2539,8 @@ /* 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; } }