Save the player's map time before EVENT_ENDLEVELSCREEN, which happens regardless of whether the hardcoded bonus screen is displayed.

Make sure ud.displaybonusscreen is set to 1 if you want this to take place. The bonus screen can still be skipped by setting RETURN to -1 in EVENT_ENDLEVELSCREEN.

git-svn-id: https://svn.eduke32.com/eduke32@6694 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-02-25 01:18:36 +00:00
parent 042c0e9796
commit 3117dcf006
2 changed files with 4 additions and 3 deletions

View file

@ -6035,6 +6035,10 @@ static int G_EndOfLevel(void)
ready2send = 0;
if (g_player[myconnectindex].ps->player_par > 0 && (g_player[myconnectindex].ps->player_par < ud.playerbest || ud.playerbest < 0) &&
ud.display_bonus_screen == 1)
CONFIG_SetMapBestTime(g_loadedMapHack.md4, g_player[myconnectindex].ps->player_par);
if ((VM_OnEventWithReturn(EVENT_ENDLEVELSCREEN, g_player[myconnectindex].ps->i, myconnectindex, 0)) == 0 &&
ud.display_bonus_screen == 1)
{

View file

@ -2262,9 +2262,6 @@ void G_BonusScreen(int32_t bonusonly)
bonuscnt = 0;
totalclock = 0;
if (g_player[myconnectindex].ps->player_par > 0 && (g_player[myconnectindex].ps->player_par < ud.playerbest || ud.playerbest < 0))
CONFIG_SetMapBestTime(g_loadedMapHack.md4, g_player[myconnectindex].ps->player_par);
do
{
int32_t yy = 0, zz;