--- a/src/players.cpp Tue Apr 15 14:49:20 2008 +0000
+++ b/src/players.cpp Tue Apr 15 15:05:30 2008 +0000
@@ -890,19 +890,18 @@
p = GetPlayer((PlayerID)p2);
- /* Only allow removal of HUMAN companies */
- if (IsHumanPlayer(p->index)) {
- /* Delete any open window of the company */
- DeletePlayerWindows(p->index);
+ /* Delete any open window of the company */
+ DeletePlayerWindows(p->index);
- /* Show the bankrupt news */
- SetDParam(0, p->index);
- AddNewsItem((StringID)(p->index | NB_BBANKRUPT), NM_CALLBACK, NF_NONE, NT_COMPANY_INFO, DNC_BANKRUPCY, 0, 0);
+ /* Show the bankrupt news */
+ SetDParam(0, p->index);
+ AddNewsItem((StringID)(p->index | NB_BBANKRUPT), NM_CALLBACK, NF_NONE, NT_COMPANY_INFO, DNC_BANKRUPCY, 0, 0);
- /* Remove the company */
- ChangeOwnershipOfPlayerItems(p->index, PLAYER_SPECTATOR);
- p->is_active = false;
- }
+ /* Remove the company */
+ ChangeOwnershipOfPlayerItems(p->index, PLAYER_SPECTATOR);
+ p->is_active = false;
+ if (!IsHumanPlayer(p->index)) AI_PlayerDied(p->index);
+
RemoveAllEngineReplacementForPlayer(p);
RemoveAllGroupsForPlayer(p->index);