summaryrefslogtreecommitdiff
path: root/src/subsidy_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-06-25 13:30:38 +0000
committerpeter1138 <peter1138@openttd.org>2007-06-25 13:30:38 +0000
commit8ee9e8bf1e0b7c9fe9e9a41044e52f4e0e973634 (patch)
tree2aea1c963774b012ba0a63a2d9573f247003e6a9 /src/subsidy_gui.cpp
parent4e1e697bc638d89828910fe3bd042d5501f0fd77 (diff)
downloadopenttd-8ee9e8bf1e0b7c9fe9e9a41044e52f4e0e973634.tar.xz
(svn r10323) -Codechange: reference company name, number and player (president) name
by index
Diffstat (limited to 'src/subsidy_gui.cpp')
-rw-r--r--src/subsidy_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp
index ce3e48da0..5bd5178c2 100644
--- a/src/subsidy_gui.cpp
+++ b/src/subsidy_gui.cpp
@@ -122,14 +122,12 @@ static void DrawSubsidiesWindow(const Window *w)
for (s = _subsidies; s != endof(_subsidies); s++) {
if (s->cargo_type != CT_INVALID && s->age >= 12) {
- const Player *p;
int xt;
SetupSubsidyDecodeParam(s, 1);
- p = GetPlayer(GetStation(s->to)->owner);
- SetDParam(3, p->name_1);
- SetDParam(4, p->name_2);
+ PlayerID player = GetStation(s->to)->owner;
+ SetDParam(3, player);
xt = DrawString(x + 2, y, STR_202C_FROM_TO, 0);