summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-06-30 08:26:34 +0000
committerpeter1138 <peter1138@openttd.org>2007-06-30 08:26:34 +0000
commit2bd72b978b4b15bf33e4988ad67ef9e3407ecbc7 (patch)
treed09a1cf26042b447382bdcdaeae2d09fc95485e2 /src
parent9d6136e89eff98f79328335a46ef824682a07aa0 (diff)
downloadopenttd-2bd72b978b4b15bf33e4988ad67ef9e3407ecbc7.tar.xz
(svn r10397) -Fix [FS#969]: subsidy awarded messages broken due to {COMPANY} now taking 1 (not 2) parameters. also remove an unnecessary dereference.
Diffstat (limited to 'src')
-rw-r--r--src/economy.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index e92125146..fe3d14913 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1245,7 +1245,6 @@ static bool CheckSubsidised(Station *from, Station *to, CargoID cargo_type)
Subsidy *s;
TileIndex xy;
Pair pair;
- Player *p;
/* check if there is an already existing subsidy that applies to us */
for (s = _subsidies; s != endof(_subsidies); s++) {
@@ -1291,10 +1290,9 @@ static bool CheckSubsidised(Station *from, Station *to, CargoID cargo_type)
/* Add a news item */
pair = SetupSubsidyDecodeParam(s, 0);
- InjectDParam(2);
+ InjectDParam(1);
- p = GetPlayer(_current_player);
- SetDParam(0, p->index);
+ SetDParam(0, _current_player);
AddNewsItem(
STR_2031_SERVICE_SUBSIDY_AWARDED + _opt.diff.subsidy_multiplier,
NEWS_FLAGS(NM_NORMAL, NF_TILE, NT_SUBSIDIES, 0),