From 3117dcf006aadb3edd52a1f00bc3bd7d57a8f6f7 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 25 Feb 2018 01:18:36 +0000 Subject: [PATCH] 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 --- source/duke3d/src/game.cpp | 4 ++++ source/duke3d/src/screens.cpp | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 184a8a9a7..aa2f7b16a 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -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) { diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 252edaf72..5a8e694a3 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -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;