mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Let's be consistent with how other parts of the code handle this same issue of conditional operations surrounding non-conditional operations.
This commit is contained in:
parent
cfcd25f2cd
commit
46e50a523f
1 changed files with 8 additions and 8 deletions
16
src/m_menu.c
16
src/m_menu.c
|
@ -4829,6 +4829,7 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
|||
const INT32 my = 24;
|
||||
patch_t *patch;
|
||||
INT32 i, o, j, prev, next;
|
||||
boolean loophack = false;
|
||||
|
||||
// Black BG
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
@ -4858,12 +4859,16 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
|||
o = ((char_scroll / FRACUNIT) + 16);
|
||||
|
||||
if (o < 0) // This hack is to prevent visual glitches when looping from the last character to the 1st character.
|
||||
{
|
||||
loophack = true;
|
||||
|
||||
if (loophack)
|
||||
o += 128;
|
||||
|
||||
i = (o / 128);
|
||||
o = (o % 128);
|
||||
i = (o / 128);
|
||||
o = (o % 128);
|
||||
|
||||
if (loophack)
|
||||
{
|
||||
j = i;
|
||||
do // subtract 1 from i to counteract the +128 from the prior hack
|
||||
{
|
||||
|
@ -4872,11 +4877,6 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
|||
i = (currentMenu->numitems - 1);
|
||||
} while (i != j && PlayerMenu[i].status & IT_DISABLED);
|
||||
}
|
||||
else // Regular circumstances
|
||||
{
|
||||
i = (o / 128);
|
||||
o = (o % 128);
|
||||
}
|
||||
|
||||
// Get prev character...
|
||||
prev = i;
|
||||
|
|
Loading…
Reference in a new issue