summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-11-13 20:33:51 +0000
committerbjarni <bjarni@openttd.org>2006-11-13 20:33:51 +0000
commited46b7d3807f4cd6bfe3ace57faa41076ab3e998 (patch)
tree995d92da1def66f510b9f9b1a66bbbca39cc849d /players.c
parent21dd00b2992c84d5a17568d1de2da5f6d3439184 (diff)
downloadopenttd-ed46b7d3807f4cd6bfe3ace57faa41076ab3e998.tar.xz
(svn r7138) -Fix: [vehicle list windows] fixed a rare crash where having some (not all) vehicle list windows open for a player, that goes bankrupt would crash the game
-Codechange: closing all windows for a player will now loop all windows and close those, which got the player as caption instead of having a list of windows to close
Diffstat (limited to 'players.c')
-rw-r--r--players.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/players.c b/players.c
index abd188a0b..5b3298398 100644
--- a/players.c
+++ b/players.c
@@ -26,6 +26,7 @@
#include "engine.h"
#include "ai/ai.h"
#include "date.h"
+#include "window.h"
uint16 GetDrawStringPlayerColor(PlayerID player)
@@ -616,19 +617,6 @@ void PlayersYearlyLoop(void)
}
}
-void DeletePlayerWindows(PlayerID pi)
-{
- DeleteWindowById(WC_COMPANY, pi);
- DeleteWindowById(WC_PLAYER_COLOR, pi);
- DeleteWindowById(WC_FINANCES, pi);
- DeleteWindowById(WC_STATION_LIST, pi);
- DeleteWindowById(WC_TRAINS_LIST, (INVALID_STATION << 16) | pi);
- DeleteWindowById(WC_ROADVEH_LIST, (INVALID_STATION << 16) | pi);
- DeleteWindowById(WC_SHIPS_LIST, (INVALID_STATION << 16) | pi);
- DeleteWindowById(WC_AIRCRAFT_LIST, (INVALID_STATION << 16) | pi);
- DeleteWindowById(WC_BUY_COMPANY, pi);
-}
-
byte GetPlayerRailtypes(PlayerID p)
{
byte rt = 0;