From 6edb21231e264cd52dc98a2a765330cac4b7cdf4 Mon Sep 17 00:00:00 2001 From: darkvater Date: Tue, 4 Jan 2005 17:11:03 +0000 Subject: (svn r1375) -Fix: [1050990] Buying trains sometimes accounted for incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky. --- road_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'road_cmd.c') diff --git a/road_cmd.c b/road_cmd.c index 0676293ab..d42e50f03 100644 --- a/road_cmd.c +++ b/road_cmd.c @@ -494,6 +494,8 @@ int32 CmdBuildLongRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2) int mode; int32 cost,ret; + SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); + start_tile = p1; end_tile = TILE_FROM_XY(x, y); @@ -545,6 +547,8 @@ int32 CmdRemoveLongRoad(int x, int y, uint32 flags, uint32 p1, uint32 p2) uint start_tile, end_tile, tile; int32 cost,ret; + SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); + start_tile = p1; end_tile = TILE_FROM_XY(x, y); -- cgit v1.2.3-54-g00ecf