player_gui.c
changeset 669 2d332f6e59f0
parent 599 30da691a5561
child 773 a376cebd3dc0
equal deleted inserted replaced
668:1fe298df8526 669:2d332f6e59f0
   492 		if (GetAmountOwnedBy(p, OWNER_SPECTATOR) == 0) dis |= 1 << 9;
   492 		if (GetAmountOwnedBy(p, OWNER_SPECTATOR) == 0) dis |= 1 << 9;
   493 		// Also disable the buy button if 25% is not-owned by someone
   493 		// Also disable the buy button if 25% is not-owned by someone
   494 		//   and the player is not an AI
   494 		//   and the player is not an AI
   495 		if (GetAmountOwnedBy(p, OWNER_SPECTATOR) == 1 && !p->is_ai) dis |= 1 << 9;
   495 		if (GetAmountOwnedBy(p, OWNER_SPECTATOR) == 1 && !p->is_ai) dis |= 1 << 9;
   496 		if (GetAmountOwnedBy(p, _local_player) == 0) dis |= 1 << 10;
   496 		if (GetAmountOwnedBy(p, _local_player) == 0) dis |= 1 << 10;
       
   497 		if (_local_player == OWNER_SPECTATOR) dis |= (1 << 9) | (1 << 10);
   497 
   498 
   498 		w->disabled_state = dis;
   499 		w->disabled_state = dis;
   499 		DrawWindowWidgets(w);
   500 		DrawWindowWidgets(w);
   500 
   501 
   501 		SetDParam(0, p->inaugurated_year + 1920);
   502 		SetDParam(0, p->inaugurated_year + 1920);