|
@@ -690,22 +690,22 @@ static void PlayerCompanyWndProc(Window
|
|
|
SetWindowWidgetHiddenState(w, PCW_WIDGET_SELL_SHARE, local);
|
|
|
SetWindowWidgetHiddenState(w, PCW_WIDGET_COMPANY_PASSWORD, !local || !_networking);
|
|
|
|
|
|
if (!local) {
|
|
|
if (_patches.allow_shares) { // Shares are allowed
|
|
|
/* If all shares are owned by someone (none by nobody), disable buy button */
|
|
|
SetWindowWidgetDisabledState(w, PCW_WIDGET_BUY_SHARE, GetAmountOwnedBy(p, OWNER_SPECTATOR) == 0 ||
|
|
|
SetWindowWidgetDisabledState(w, PCW_WIDGET_BUY_SHARE, GetAmountOwnedBy(p, PLAYER_SPECTATOR) == 0 ||
|
|
|
/* Only 25% left to buy. If the player is human, disable buying it up.. TODO issues! */
|
|
|
(GetAmountOwnedBy(p, OWNER_SPECTATOR) == 1 && !p->is_ai) ||
|
|
|
(GetAmountOwnedBy(p, PLAYER_SPECTATOR) == 1 && !p->is_ai) ||
|
|
|
/* Spectators cannot do anything of course */
|
|
|
_local_player == OWNER_SPECTATOR);
|
|
|
_local_player == PLAYER_SPECTATOR);
|
|
|
|
|
|
/* If the player doesn't own any shares, disable sell button */
|
|
|
SetWindowWidgetDisabledState(w, PCW_WIDGET_SELL_SHARE, (GetAmountOwnedBy(p, _local_player) == 0) ||
|
|
|
/* Spectators cannot do anything of course */
|
|
|
_local_player == OWNER_SPECTATOR);
|
|
|
_local_player == PLAYER_SPECTATOR);
|
|
|
} else { // Shares are not allowed, disable buy/sell buttons
|
|
|
DisableWindowWidget(w, PCW_WIDGET_BUY_SHARE);
|
|
|
DisableWindowWidget(w, PCW_WIDGET_SELL_SHARE);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1102,13 +1102,13 @@ void ShowEndGameChart(void)
|
|
|
|
|
|
if (w != NULL) {
|
|
|
MarkWholeScreenDirty();
|
|
|
|
|
|
WP(w, highscore_d).background_img = SPR_TYCOON_IMG1_BEGIN;
|
|
|
|
|
|
if (_local_player != OWNER_SPECTATOR) {
|
|
|
if (_local_player != PLAYER_SPECTATOR) {
|
|
|
const Player *p = GetPlayer(_local_player);
|
|
|
if (p->old_economy[0].performance_history == SCORE_MAX)
|
|
|
WP(w, highscore_d).background_img = SPR_TYCOON_IMG2_BEGIN;
|
|
|
}
|
|
|
|
|
|
/* In a network game show the endscores of the custom difficulty 'network' which is the last one
|