summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-15 20:24:26 +0000
committertruelight <truelight@openttd.org>2004-12-15 20:24:26 +0000
commit093540e9b5d5f0d271c218c0ea9b70fd1f7de7b4 (patch)
tree6636de0657a693858bc0067688d935a1717b7a55
parentbd4da7689185efe48cb226f5ebf71c543f0db7e3 (diff)
downloadopenttd-093540e9b5d5f0d271c218c0ea9b70fd1f7de7b4.tar.xz
(svn r1107) -Fix: [Network] A spectator can no longer buy/sell shares of companies
-rw-r--r--player_gui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player_gui.c b/player_gui.c
index c0990a27e..8301c0258 100644
--- a/player_gui.c
+++ b/player_gui.c
@@ -494,6 +494,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
// and the player is not an AI
if (GetAmountOwnedBy(p, OWNER_SPECTATOR) == 1 && !p->is_ai) dis |= 1 << 9;
if (GetAmountOwnedBy(p, _local_player) == 0) dis |= 1 << 10;
+ if (_local_player == OWNER_SPECTATOR) dis |= (1 << 9) | (1 << 10);
w->disabled_state = dis;
DrawWindowWidgets(w);