|
|
@ -2178,7 +2178,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Update company infrastructure counts. */
|
|
|
|
/* Update company infrastructure counts. */
|
|
|
|
FOR_ALL_ROADTRAMTYPES(rtt) {
|
|
|
|
for (RoadTramType rtt : _roadtramtypes) {
|
|
|
|
RoadType rt = GetRoadType(tile, rtt);
|
|
|
|
RoadType rt = GetRoadType(tile, rtt);
|
|
|
|
UpdateCompanyRoadInfrastructure(rt, GetRoadOwner(tile, rtt), -static_cast<int>(ROAD_STOP_TRACKBIT_FACTOR));
|
|
|
|
UpdateCompanyRoadInfrastructure(rt, GetRoadOwner(tile, rtt), -static_cast<int>(ROAD_STOP_TRACKBIT_FACTOR));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2262,7 +2262,7 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
|
|
|
|
Owner road_owner[] = { OWNER_NONE, OWNER_NONE };
|
|
|
|
Owner road_owner[] = { OWNER_NONE, OWNER_NONE };
|
|
|
|
DisallowedRoadDirections drd = DRD_NONE;
|
|
|
|
DisallowedRoadDirections drd = DRD_NONE;
|
|
|
|
if (IsDriveThroughStopTile(cur_tile)) {
|
|
|
|
if (IsDriveThroughStopTile(cur_tile)) {
|
|
|
|
FOR_ALL_ROADTRAMTYPES(rtt) {
|
|
|
|
for (RoadTramType rtt : _roadtramtypes) {
|
|
|
|
road_type[rtt] = GetRoadType(cur_tile, rtt);
|
|
|
|
road_type[rtt] = GetRoadType(cur_tile, rtt);
|
|
|
|
if (road_type[rtt] == INVALID_ROADTYPE) continue;
|
|
|
|
if (road_type[rtt] == INVALID_ROADTYPE) continue;
|
|
|
|
road_owner[rtt] = GetRoadOwner(cur_tile, rtt);
|
|
|
|
road_owner[rtt] = GetRoadOwner(cur_tile, rtt);
|
|
|
@ -4548,7 +4548,7 @@ void DeleteOilRig(TileIndex tile)
|
|
|
|
static void ChangeTileOwner_Station(TileIndex tile, Owner old_owner, Owner new_owner)
|
|
|
|
static void ChangeTileOwner_Station(TileIndex tile, Owner old_owner, Owner new_owner)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (IsRoadStopTile(tile)) {
|
|
|
|
if (IsRoadStopTile(tile)) {
|
|
|
|
FOR_ALL_ROADTRAMTYPES(rtt) {
|
|
|
|
for (RoadTramType rtt : _roadtramtypes) {
|
|
|
|
/* Update all roadtypes, no matter if they are present */
|
|
|
|
/* Update all roadtypes, no matter if they are present */
|
|
|
|
if (GetRoadOwner(tile, rtt) == old_owner) {
|
|
|
|
if (GetRoadOwner(tile, rtt) == old_owner) {
|
|
|
|
RoadType rt = GetRoadType(tile, rtt);
|
|
|
|
RoadType rt = GetRoadType(tile, rtt);
|
|
|
|