mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- added a C_ClearMessages function for the console and fixed game restart after death.
Fixes #322
This commit is contained in:
parent
1eb99f69c2
commit
2e8b808683
5 changed files with 13 additions and 5 deletions
|
@ -47,6 +47,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "messages.h"
|
||||
#include "nnexts.h"
|
||||
#include "gstrings.h"
|
||||
#include "gamestate.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
|
@ -1369,7 +1370,7 @@ void ProcessInput(PLAYER *pPlayer)
|
|||
playerReset(pPlayer);
|
||||
if (gGameOptions.nGameType == 0 && numplayers == 1)
|
||||
{
|
||||
DeferedStartGame(currentLevel, -1);
|
||||
gameaction = ga_autoloadgame;
|
||||
}
|
||||
else
|
||||
playerStart(pPlayer->nPlayer);
|
||||
|
|
|
@ -57,6 +57,7 @@ extern constate_e ConsoleState;
|
|||
void C_InitConsole (int width, int height, bool ingame);
|
||||
void C_DeinitConsole ();
|
||||
void C_InitConback();
|
||||
void C_ClearMessages();
|
||||
|
||||
// Adjust the console for a new screen mode
|
||||
void C_NewModeAdjust (void);
|
||||
|
|
|
@ -935,6 +935,11 @@ int PrintString (int iprintlevel, const char *outline)
|
|||
return 0; // Don't waste time on calculating this if nothing at all was printed...
|
||||
}
|
||||
|
||||
void C_ClearMessages()
|
||||
{
|
||||
NotifyStrings.Clear();
|
||||
}
|
||||
|
||||
int VPrintf (int printlevel, const char *format, va_list parms)
|
||||
{
|
||||
FString outline;
|
||||
|
|
|
@ -136,12 +136,11 @@ static void GameTicker()
|
|||
case ga_autoloadgame:
|
||||
// todo: for now just handle the restart case
|
||||
g_nextmap = currentLevel;
|
||||
g_nextskill = -1;
|
||||
FX_StopAllSounds();
|
||||
FX_SetReverb(0);
|
||||
gi->FreeLevelData();
|
||||
gamestate = GS_LEVEL;
|
||||
gi->NextLevel(g_nextmap, -1);
|
||||
C_ClearMessages();
|
||||
gi->NewGame(g_nextmap, -1);
|
||||
break;
|
||||
|
||||
case ga_completed:
|
||||
|
@ -168,6 +167,7 @@ static void GameTicker()
|
|||
FX_StopAllSounds();
|
||||
FX_SetReverb(0);
|
||||
gi->FreeLevelData();
|
||||
C_ClearMessages();
|
||||
gamestate = GS_LEVEL;
|
||||
gi->NewGame(g_nextmap, g_nextskill);
|
||||
break;
|
||||
|
|
|
@ -54,6 +54,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "menu.h"
|
||||
#include "gstrings.h"
|
||||
#include "raze_music.h"
|
||||
#include "gamestate.h"
|
||||
|
||||
BEGIN_SW_NS
|
||||
|
||||
|
@ -6661,7 +6662,7 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
|
|||
}
|
||||
else
|
||||
{
|
||||
DeferedStartGame(currentLevel, -1);
|
||||
gameaction = ga_autoloadgame;
|
||||
}
|
||||
|
||||
DoPlayerFireOutDeath(pp);
|
||||
|
|
Loading…
Reference in a new issue