From 4e4f77f13ef73ad62dc96b3f9bcac7f01697196a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 4 Sep 2013 03:52:39 +0000 Subject: Fix Hexen -class parameter when starting a single player game from the command line (thanks Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2634 --- src/d_loop.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/d_loop.c') diff --git a/src/d_loop.c b/src/d_loop.c index 558d16b7..b68e2665 100644 --- a/src/d_loop.c +++ b/src/d_loop.c @@ -115,6 +115,12 @@ static loop_interface_t *loop_interface = NULL; static boolean local_playeringame[NET_MAXPLAYERS]; +// Requested player class "sent" to the server on connect. +// If we are only doing a single player game then this needs to be remembered +// and saved in the game settings. + +static int player_class; + // 35 fps clock adjusted by offsetms milliseconds @@ -346,6 +352,7 @@ void D_StartNetGame(net_gamesettings_t *settings, settings->consoleplayer = 0; settings->num_players = 1; + settings->player_classes[0] = player_class; //! // @category net @@ -436,6 +443,8 @@ boolean D_InitNetGame(net_connect_data_t *connect_data) I_AtExit(D_QuitNetGame, true); + player_class = connect_data->player_class; + #ifdef FEATURE_MULTIPLAYER //! -- cgit v1.2.3