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
commit9595ee80e3014ea90d2680e1c9135fb01532e0c0 (patch)
tree6636de0657a693858bc0067688d935a1717b7a55
parent015fb81810ebb980c2b0c726d3480a5afd6c37d3 (diff)
downloadopenttd-9595ee80e3014ea90d2680e1c9135fb01532e0c0.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);