File diff r1976:fcef181ed14a → r1977:1f8b99c96041
waypoint.c
Show inline comments
 
@@ -126,13 +126,13 @@ void MakeDefaultWaypointName(Waypoint *w
 

	
 
	wp->string = STR_NULL;
 
	wp->town_cn = i;
 
}
 

	
 
/* Find a deleted waypoint close to a tile. */
 
static Waypoint *FindDeletedWaypointCloseTo(uint tile)
 
static Waypoint *FindDeletedWaypointCloseTo(TileIndex tile)
 
{
 
	Waypoint *wp, *best = NULL;
 
	uint thres = 8, cur_dist;
 

	
 
	FOR_ALL_WAYPOINTS(wp) {
 
		if (wp->deleted && wp->xy) {
 
@@ -240,13 +240,13 @@ void WaypointsDailyLoop(void)
 
			DoDeleteWaypoint(wp);
 
		}
 
	}
 
}
 

	
 
/* Remove a waypoint */
 
int32 RemoveTrainWaypoint(uint tile, uint32 flags, bool justremove)
 
int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
 
{
 
	Waypoint *wp;
 

	
 
	/* Make sure it's a waypoint */
 
	if (!IsTileType(tile, MP_RAILWAY) || !IsRailWaypoint(_map5[tile]))
 
		return CMD_ERROR;
 
@@ -332,13 +332,13 @@ int32 CmdRenameWaypoint(int x, int y, ui
 
		}
 
	}
 
	return 0;
 
}
 

	
 
/* This hacks together some dummy one-shot Station structure for a waypoint. */
 
Station *ComposeWaypointStation(uint tile)
 
Station *ComposeWaypointStation(TileIndex tile)
 
{
 
	Waypoint *wp = GetWaypointByTile(tile);
 
	static Station stat;
 

	
 
	stat.train_tile = stat.xy = wp->xy;
 
	stat.town = GetTown(wp->town_index);