File diff r4724:bb69fd326337 → r4725:3a289e38fda7
road_cmd.c
Show inline comments
 
@@ -13,26 +13,24 @@
 
#include "tile.h"
 
#include "town_map.h"
 
#include "vehicle.h"
 
#include "viewport.h"
 
#include "command.h"
 
#include "player.h"
 
#include "town.h"
 
#include "gfx.h"
 
#include "sound.h"
 
#include "yapf/yapf.h"
 
#include "depot.h"
 

	
 
void RoadVehEnterDepot(Vehicle *v);
 

	
 

	
 
static uint CountRoadBits(RoadBits r)
 
{
 
	uint count = 0;
 

	
 
	if (r & ROAD_NW) ++count;
 
	if (r & ROAD_SW) ++count;
 
	if (r & ROAD_SE) ++count;
 
	if (r & ROAD_NE) ++count;
 
	return count;
 
}
 

	
 
@@ -1048,25 +1046,25 @@ static uint32 VehicleEnter_Road(Vehicle 
 
			if (v->type == VEH_Train && !IsCrossingBarred(tile)) {
 
				/* train crossing a road */
 
				SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
 
				BarCrossing(tile);
 
				MarkTileDirtyByTile(tile);
 
			}
 
			break;
 

	
 
		case ROAD_TILE_DEPOT:
 
			if (v->type == VEH_Road &&
 
					v->u.road.frame == 11 &&
 
					_roadveh_enter_depot_unk0[GetRoadDepotDirection(tile)] == v->u.road.state) {
 
				RoadVehEnterDepot(v);
 
				VehicleEnterDepot(v);
 
				return 4;
 
			}
 
			break;
 

	
 
		default: break;
 
	}
 
	return 0;
 
}
 

	
 

	
 
static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID new_player)
 
{