summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-31 17:43:29 +0000
committerrubidium <rubidium@openttd.org>2007-08-31 17:43:29 +0000
commit9695727120c3315c219d9b05492fb28d6aec99e1 (patch)
treecb13a570d307550b8712b0efdbf27fd7ac74ce7c
parent3fa5559cfcdc79b463fcfb73b628db4345889608 (diff)
downloadopenttd-9695727120c3315c219d9b05492fb28d6aec99e1.tar.xz
(svn r11021) -Fix [FS#1175]: do not display income/expenses when they do not belong to a "valid" tile, like the money cheat/giving money.
-rw-r--r--src/command.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 8d7c745c7..c48b3418d 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -570,7 +570,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
SubtractMoneyFromPlayer(res2);
if (IsLocalPlayer() && _game_mode != GM_EDITOR) {
- if (res2.GetCost() != 0) ShowCostOrIncomeAnimation(x, y, GetSlopeZ(x, y), res2.GetCost());
+ if (res2.GetCost() != 0 && tile != 0) ShowCostOrIncomeAnimation(x, y, GetSlopeZ(x, y), res2.GetCost());
if (_additional_cash_required != 0) {
SetDParam(0, _additional_cash_required);
if (my_cmd) ShowErrorMessage(STR_0003_NOT_ENOUGH_CASH_REQUIRES, error_part1, x, y);