waypoint.c
changeset 2668 c0f1828b89e4
parent 2625 19bf7f695537
child 2670 f2d6a8424e3e
equal deleted inserted replaced
2667:f3ffefc784c5 2668:c0f1828b89e4
   259 int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
   259 int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
   260 {
   260 {
   261 	Waypoint *wp;
   261 	Waypoint *wp;
   262 
   262 
   263 	/* Make sure it's a waypoint */
   263 	/* Make sure it's a waypoint */
   264 	if (!IsTileType(tile, MP_RAILWAY) || !IsRailWaypoint(_m[tile].m5))
   264 	if (!IsTileType(tile, MP_RAILWAY) || !IsRailWaypoint(tile))
   265 		return CMD_ERROR;
   265 		return CMD_ERROR;
   266 
   266 
   267 	if (!CheckTileOwnership(tile) && !(_current_player == OWNER_WATER))
   267 	if (!CheckTileOwnership(tile) && !(_current_player == OWNER_WATER))
   268 		return CMD_ERROR;
   268 		return CMD_ERROR;
   269 
   269