summaryrefslogtreecommitdiff
path: root/town_gui.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-08-10 21:29:47 +0000
committerdarkvater <darkvater@openttd.org>2004-08-10 21:29:47 +0000
commit637a567acb18e22b18e3df329f7f14e14ef3bc88 (patch)
tree1115827be2b1dcc54ccdcae40b740e8b5254cce9 /town_gui.c
parent9c4abb643cc0d9db718dc2c2deb6ce016bd06c33 (diff)
downloadopenttd-637a567acb18e22b18e3df329f7f14e14ef3bc88.tar.xz
(svn r17) -Fix Player window fixes, Getstring id0 fixes, Finances window is now ok
Diffstat (limited to 'town_gui.c')
-rw-r--r--town_gui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/town_gui.c b/town_gui.c
index d103b4503..a8e5718e3 100644
--- a/town_gui.c
+++ b/town_gui.c
@@ -126,7 +126,13 @@ static void TownAuthorityWndProc(Window *w, WindowEvent *e)
(str++, r <= 800) || // Excellent
(str++, true); // Outstanding
- SET_DPARAM16(4, str);
+ /* WARNING ugly hack!
+ GetPlayerNameString sets up (Player #) if the player is human in an extra DPARAM16
+ It seems that if player is non-human, nothing is set up, so param is 0. GetString doesn't like
+ that because there is another param after it.
+ So we'll just shift the rating one back if player is AI and all is fine
+ */
+ SET_DPARAM16((IS_HUMAN_PLAYER(p->index) ? 4 : 3), str);
DrawString(19, y, STR_2024, 0);
y+=10;
}