(svn r1107) -Fix: [Network] A spectator can no longer buy/sell shares of companies

This commit is contained in:
truelight 2004-12-15 20:24:26 +00:00
parent 015fb81810
commit 9595ee80e3
1 changed files with 1 additions and 0 deletions

View File

@ -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);