waypoint.c
changeset 4052 7edea464c3a9
parent 4051 566d63f3c5a2
child 4077 d3022f976946
equal deleted inserted replaced
4051:566d63f3c5a2 4052:7edea464c3a9
   219 		MarkTileDirtyByTile(tile);
   219 		MarkTileDirtyByTile(tile);
   220 
   220 
   221 		statspec = GetCustomStationSpec(STAT_CLASS_WAYP, p1);
   221 		statspec = GetCustomStationSpec(STAT_CLASS_WAYP, p1);
   222 
   222 
   223 		if (statspec != NULL) {
   223 		if (statspec != NULL) {
   224 			SetCustomWaypointSprite(tile);
       
   225 			wp->stat_id = p1;
   224 			wp->stat_id = p1;
   226 			wp->grfid = statspec->grfid;
   225 			wp->grfid = statspec->grfid;
   227 			wp->localidx = statspec->localidx;
   226 			wp->localidx = statspec->localidx;
   228 		} else {
   227 		} else {
   229 			// Specified custom graphics do not exist, so use default.
   228 			// Specified custom graphics do not exist, so use default.
   230 			ClearCustomWaypointSprite(tile);
       
   231 			wp->stat_id = 0;
   229 			wp->stat_id = 0;
   232 			wp->grfid = 0;
   230 			wp->grfid = 0;
   233 			wp->localidx = 0;
   231 			wp->localidx = 0;
   234 		}
   232 		}
   235 
   233