Skip to content

Commit

Permalink
Client: Options -> End Game
Browse files Browse the repository at this point in the history
Instead of doing nothing functional, choosing Options -> End Game
will now ask the user whether he or she wants to disconnect.
  • Loading branch information
skyjake committed Jul 14, 2011
1 parent 4d8d034 commit c4aa55c
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 4 deletions.
16 changes: 12 additions & 4 deletions doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -3573,7 +3573,7 @@ int M_QuitResponse(msgresponse_t response, void* context)

void M_QuitDOOM(int option, void* context)
{
const char* endString;
const char* endString;

#if __JDOOM__ || __JDOOM64__
endString = endmsg[((int) GAMETIC % (NUM_QUITMESSAGES + 1))];
Expand All @@ -3589,7 +3589,14 @@ int M_EndGameResponse(msgresponse_t response, void* context)
{
if(response == MSG_YES)
{
G_StartTitle();
if(IS_CLIENT)
{
DD_Execute(false, "net disconnect");
}
else
{
G_StartTitle();
}
return true;
}

Expand All @@ -3604,13 +3611,14 @@ void M_EndGame(int option, void* context)
return;
}

/*
if(IS_NETGAME)
{
Hu_MsgStart(MSG_ANYKEY, NETEND, NULL, NULL);
return;
}
}*/

Hu_MsgStart(MSG_YESNO, ENDGAME, M_EndGameResponse, NULL);
Hu_MsgStart(MSG_YESNO, IS_CLIENT? GET_TXT(TXT_DISCONNECT) : ENDGAME, M_EndGameResponse, NULL);
}

void M_ChangeMessages(int option, void* context)
Expand Down
5 changes: 5 additions & 0 deletions doomsday/plugins/jdoom/defs/text.ded
Expand Up @@ -2017,3 +2017,8 @@ Text {
ID = "PLAYERSETUP";
Text = "Player Setup";
}

Text {
ID = "DISCONNECT";
Text = "Really disconnect?";
}
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom/include/info.h
Expand Up @@ -1680,6 +1680,7 @@ typedef enum {
TXT_NOTDESIGNEDFOR,
TXT_GAMESETUP,
TXT_PLAYERSETUP,
TXT_DISCONNECT,
NUMTEXT
} textenum_t;

Expand Down
5 changes: 5 additions & 0 deletions doomsday/plugins/jdoom64/defs/text.ded
Expand Up @@ -1260,3 +1260,8 @@ Text {
ID = "PLAYERSETUP";
Text = "Player Setup";
}

Text {
ID = "DISCONNECT";
Text = "Really disconnect?";
}
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom64/include/info.h
Expand Up @@ -1599,6 +1599,7 @@ typedef enum {
TXT_NOTDESIGNEDFOR,
TXT_GAMESETUP,
TXT_PLAYERSETUP,
TXT_DISCONNECT,
NUMTEXT
} textenum_t;

Expand Down
5 changes: 5 additions & 0 deletions doomsday/plugins/jheretic/defs/text.ded
Expand Up @@ -904,6 +904,11 @@ Text {
Text = "Player Setup";
}

Text {
ID = "DISCONNECT";
Text = "Really disconnect?";
}

Text {
ID = "HUSTR_E1M1";
Text = "E1M1: The Docks";
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jheretic/include/info.h
Expand Up @@ -1710,6 +1710,7 @@ typedef enum {
TXT_NOTDESIGNEDFOR,
TXT_GAMESETUP,
TXT_PLAYERSETUP,
TXT_DISCONNECT,
TXT_HUSTR_E1M1,
TXT_HUSTR_E1M2,
TXT_HUSTR_E1M3,
Expand Down
5 changes: 5 additions & 0 deletions doomsday/plugins/jhexen/defs/text.ded
Expand Up @@ -697,6 +697,11 @@ Text {
Text = "Player Setup";
}

Text {
ID = "DISCONNECT";
Text = "Really disconnect?";
}

Text {
ID = "RANDOMPLAYERCLASS";
Text = "Random";
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jhexen/include/info.h
Expand Up @@ -3736,6 +3736,7 @@ typedef enum {
TXT_NOTDESIGNEDFOR,
TXT_GAMESETUP,
TXT_PLAYERSETUP,
TXT_DISCONNECT,
TXT_RANDOMPLAYERCLASS,
TXT_PLAYERCLASS1,
TXT_PLAYERCLASS2,
Expand Down

0 comments on commit c4aa55c

Please sign in to comment.