equal
deleted
inserted
replaced
1 /* $Id$ */ |
1 /* $Id$ */ |
2 |
2 |
3 #include "stdafx.h" |
3 #include "stdafx.h" |
4 #include "openttd.h" |
4 #include "openttd.h" |
|
5 #include "bridge_map.h" |
5 #include "rail_map.h" |
6 #include "rail_map.h" |
6 #include "road_map.h" |
7 #include "road_map.h" |
7 #include "table/sprites.h" |
8 #include "table/sprites.h" |
8 #include "table/strings.h" |
9 #include "table/strings.h" |
9 #include "functions.h" |
10 #include "functions.h" |
138 |
139 |
139 cost = _price.remove_road * 2; |
140 cost = _price.remove_road * 2; |
140 |
141 |
141 if (flags & DC_EXEC) { |
142 if (flags & DC_EXEC) { |
142 ChangeTownRating(t, -road_remove_cost[(byte)edge_road], RATING_ROAD_MINIMUM); |
143 ChangeTownRating(t, -road_remove_cost[(byte)edge_road], RATING_ROAD_MINIMUM); |
143 _m[tile].m5 = ti.map5 & 0xC7; |
144 SetClearUnderBridge(tile); |
144 SetTileOwner(tile, OWNER_NONE); |
|
145 MarkTileDirtyByTile(tile); |
145 MarkTileDirtyByTile(tile); |
146 } |
146 } |
147 return cost; |
147 return cost; |
148 |
148 |
149 case MP_STREET: |
149 case MP_STREET: |
373 } |
373 } |
374 |
374 |
375 /* all checked, can build road now! */ |
375 /* all checked, can build road now! */ |
376 cost = _price.build_road * 2; |
376 cost = _price.build_road * 2; |
377 if (flags & DC_EXEC) { |
377 if (flags & DC_EXEC) { |
378 ModifyTile(tile, |
378 SetRoadUnderBridge(tile, _current_player); |
379 MP_MAPOWNER_CURRENT | MP_MAP5, |
379 MarkTileDirtyByTile(tile); |
380 (ti.map5 & 0xC7) | 0x28 // map5 |
|
381 ); |
|
382 } |
380 } |
383 return cost; |
381 return cost; |
384 |
382 |
385 default: |
383 default: |
386 do_clear:; |
384 do_clear:; |