waypoint.c
changeset 3102 f9ca4379db9d
parent 3101 a44fdf9faef1
child 3157 3f35e2d9c8e3
equal deleted inserted replaced
3101:a44fdf9faef1 3102:f9ca4379db9d
   181 
   181 
   182 	/* if custom gfx are used, make sure it is within bounds */
   182 	/* if custom gfx are used, make sure it is within bounds */
   183 	if (p1 >= GetNumCustomStations(STAT_CLASS_WAYP)) return CMD_ERROR;
   183 	if (p1 >= GetNumCustomStations(STAT_CLASS_WAYP)) return CMD_ERROR;
   184 
   184 
   185 	if (!IsTileType(tile, MP_RAILWAY) || (
   185 	if (!IsTileType(tile, MP_RAILWAY) || (
   186 				(axis = AXIS_X, _m[tile].m5 != TRACK_BIT_DIAG1) &&
   186 				(axis = AXIS_X, _m[tile].m5 != TRACK_BIT_X) &&
   187 				(axis = AXIS_Y, _m[tile].m5 != TRACK_BIT_DIAG2)
   187 				(axis = AXIS_Y, _m[tile].m5 != TRACK_BIT_Y)
   188 			)) {
   188 			)) {
   189 		return_cmd_error(STR_1005_NO_SUITABLE_RAILROAD_TRACK);
   189 		return_cmd_error(STR_1005_NO_SUITABLE_RAILROAD_TRACK);
   190 	}
   190 	}
   191 
   191 
   192 	if (!CheckTileOwnership(tile))
   192 	if (!CheckTileOwnership(tile))