summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-13 14:58:41 +0000
committerrubidium <rubidium@openttd.org>2008-05-13 14:58:41 +0000
commit8e702d1053bae621823aaee8d2bdbd336eba3355 (patch)
treebc8754776110c0bcf208bba7cfae3d8dd8b20858 /src
parentdddfaaac7db08252a500fb2d0d1fb2cc7200d20c (diff)
downloadopenttd-8e702d1053bae621823aaee8d2bdbd336eba3355.tar.xz
(svn r13070) -Fix (r13069): do save before commit...
Diffstat (limited to 'src')
-rw-r--r--src/player_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/player_gui.cpp b/src/player_gui.cpp
index 0879a0c60..f35553589 100644
--- a/src/player_gui.cpp
+++ b/src/player_gui.cpp
@@ -769,11 +769,11 @@ class SelectPlayerFaceWindow : public Window
}
public:
- SelectPlayerFaceWindow(const WindowDesc *desc, bool advanced) : Window(desc, 0)
+ SelectPlayerFaceWindow(const WindowDesc *desc, PlayerID player, bool advanced) : Window(desc, player)
{
this->FindWindowPlacementAndResize(desc);
this->caption_color = this->window_number;
- this->face = GetPlayer((PlayerID)this->window_number)->face;
+ this->face = GetPlayer(player)->face;
this->advanced = advanced;
this->UpdateData();
@@ -1045,8 +1045,8 @@ static void DoSelectPlayerFace(PlayerID player, bool adv, int top, int left)
{
if (!IsValidPlayer(player)) return;
- if (BringWindowToFrontById(WC_PLAYER_FACE, 0)) return;
- return SelectPlayerFaceWindow(adv ? &_select_player_face_adv_desc : &_select_player_face_desc, player, adv); // simple or advanced window
+ if (BringWindowToFrontById(WC_PLAYER_FACE, player)) return;
+ new SelectPlayerFaceWindow(adv ? &_select_player_face_adv_desc : &_select_player_face_desc, player, adv); // simple or advanced window
}