diff options
author | tron <tron@openttd.org> | 2006-03-13 12:55:20 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-13 12:55:20 +0000 |
commit | e8ccd9641f6476fda141f02aa465e2a165451bde (patch) | |
tree | baf83f0489b844b1906cfa75044bb1f224a71618 /road_cmd.c | |
parent | 1067069e33c4bff61bdb2648cc74458651f897ae (diff) | |
download | openttd-e8ccd9641f6476fda141f02aa465e2a165451bde.tar.xz |
(svn r3846) Add functions to set the type of stuff (clear, water, rail, road) under bridges
Diffstat (limited to 'road_cmd.c')
-rw-r--r-- | road_cmd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/road_cmd.c b/road_cmd.c index 55556553e..2b50cf6ff 100644 --- a/road_cmd.c +++ b/road_cmd.c @@ -2,6 +2,7 @@ #include "stdafx.h" #include "openttd.h" +#include "bridge_map.h" #include "rail_map.h" #include "road_map.h" #include "table/sprites.h" @@ -140,8 +141,7 @@ int32 CmdRemoveRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (flags & DC_EXEC) { ChangeTownRating(t, -road_remove_cost[(byte)edge_road], RATING_ROAD_MINIMUM); - _m[tile].m5 = ti.map5 & 0xC7; - SetTileOwner(tile, OWNER_NONE); + SetClearUnderBridge(tile); MarkTileDirtyByTile(tile); } return cost; @@ -375,10 +375,8 @@ int32 CmdBuildRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2) /* all checked, can build road now! */ cost = _price.build_road * 2; if (flags & DC_EXEC) { - ModifyTile(tile, - MP_MAPOWNER_CURRENT | MP_MAP5, - (ti.map5 & 0xC7) | 0x28 // map5 - ); + SetRoadUnderBridge(tile, _current_player); + MarkTileDirtyByTile(tile); } return cost; |