summaryrefslogtreecommitdiff
path: root/src/misc_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-30 17:38:42 +0000
committerrubidium <rubidium@openttd.org>2007-09-30 17:38:42 +0000
commitff14665f6ebde59e8ef17d8f0e06e2d3e5aefd65 (patch)
tree78422746fe8ad53b0a58d7e0952ad6b100782715 /src/misc_cmd.cpp
parentc952f3d5eff35b04df91970e61ef1a50bac769ac (diff)
downloadopenttd-ff14665f6ebde59e8ef17d8f0e06e2d3e5aefd65.tar.xz
(svn r11188) -Codechange: rewrite of the town action related code (remove some of the magic).
-Feature: possibility to disable exclusive rights and giving money. Both by skidd13.
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r--src/misc_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index 830354c53..45e8f99c6 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -341,6 +341,8 @@ CommandCost CmdMoneyCheat(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
*/
CommandCost CmdGiveMoney(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
+ if (!_patches.give_money) return CMD_ERROR;
+
const Player *p = GetPlayer(_current_player);
CommandCost amount(min((Money)p1, (Money)20000000LL));