equal
deleted
inserted
replaced
98 uint32 p1 = _road_station_picker_orientation; |
98 uint32 p1 = _road_station_picker_orientation; |
99 |
99 |
100 if (p1 >= DIAGDIR_END) { |
100 if (p1 >= DIAGDIR_END) { |
101 SETBIT(p2, 1); // It's a drive-through stop |
101 SETBIT(p2, 1); // It's a drive-through stop |
102 p1 -= DIAGDIR_END; // Adjust picker result to actual direction |
102 p1 -= DIAGDIR_END; // Adjust picker result to actual direction |
103 |
|
104 /* Only allow building over a road if its a straight road, |
|
105 * facing the right direction and it belongs to the player */ |
|
106 if ((IsTileType(tile, MP_STREET) && |
|
107 GetRoadTileType(tile) == ROAD_TILE_NORMAL && |
|
108 (IsTileOwner(tile, _current_player) || (_patches.road_stop_on_town_road && IsTileOwner(tile, OWNER_TOWN))) && |
|
109 !(GetRoadBits(tile) & ((DiagDirection)p1 == DIAGDIR_NE ? ROAD_Y : ROAD_X)))) { |
|
110 |
|
111 cmd ^= CMD_AUTO; |
|
112 } |
|
113 } |
103 } |
114 DoCommandP(tile, p1, p2, CcRoadDepot, cmd); |
104 DoCommandP(tile, p1, p2, CcRoadDepot, cmd); |
115 } |
105 } |
116 |
106 |
117 static void PlaceRoad_BusStation(TileIndex tile) |
107 static void PlaceRoad_BusStation(TileIndex tile) |