summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-12-19 21:42:19 +0000
committersmatz <smatz@openttd.org>2009-12-19 21:42:19 +0000
commita62f16c86d529620b5d104a9ebc1c51544b922a1 (patch)
treee356bfa5d9078ca3e746885ec685d82614b1fdd3 /src
parentd48ad4b6e33bef9d3360f4a1cacccece6591b3c0 (diff)
downloadopenttd-a62f16c86d529620b5d104a9ebc1c51544b922a1.tar.xz
(svn r18550) -Fix (r18281): show expected price of town construction even when the company doesn't have enough money
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 18a4b3646..59745237d 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -1566,13 +1566,13 @@ CommandCost CmdFoundTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
cost.MultiplyCost(mult);
- if (cost.GetCost() > GetAvailableMoneyForCommand()) {
- _additional_cash_required = cost.GetCost();
- return CommandCost(EXPENSES_OTHER);
- }
-
/* Create the town */
if (flags & DC_EXEC) {
+ if (cost.GetCost() > GetAvailableMoneyForCommand()) {
+ _additional_cash_required = cost.GetCost();
+ return CommandCost(EXPENSES_OTHER);
+ }
+
_generating_world = true;
UpdateNearestTownForRoadTiles(true);
Town *t;