From aea57fde177ab664aee6b4c9c72f9f02fe4fa793 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 16 Oct 2017 03:32:26 +0000 Subject: [PATCH] Fix infinite loop when requesting to open an invalid map from the command line. git-svn-id: https://svn.eduke32.com/eduke32@6483 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index d9db96c62..3e7683818 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -6561,6 +6561,12 @@ MAIN_LOOP_RESTART: G_SetCrosshairColor(CrosshairColors.r, CrosshairColors.g, CrosshairColors.b); } + if (ud.warp_on == 1) + { + G_NewGame_EnterLevel(); + // may change ud.warp_on in an error condition + } + if (ud.warp_on == 0) { if ((g_netServer || ud.multimode > 1) && boardfilename[0] != 0) @@ -6596,10 +6602,6 @@ MAIN_LOOP_RESTART: } } } - else if (ud.warp_on == 1) - { - G_NewGame_EnterLevel(); - } else G_UpdateScreenArea(); // G_GameExit(" "); ///