Polymost: don't redundantly adjust globalcursectnum in polymost_drawrooms().

See r5024 and the added comment.

git-svn-id: https://svn.eduke32.com/eduke32@5314 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2015-08-01 08:41:14 +00:00
parent 91f09c76c5
commit 2aa732128f
2 changed files with 3 additions and 9 deletions

View file

@ -9468,6 +9468,7 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
# endif
// Update starting sector number (common to classic and Polymost).
// ADJUST_GLOBALCURSECTNUM.
if (globalcursectnum >= MAXSECTORS)
globalcursectnum -= MAXSECTORS;
else

View file

@ -3651,15 +3651,8 @@ void polymost_drawrooms()
// Fixes access of stale maskwall[maskwallcnt] (a "scan" index, in BUILD lingo):
maskwallcnt = 0;
if (globalcursectnum >= MAXSECTORS)
globalcursectnum -= MAXSECTORS;
else
{
int const i = globalcursectnum;
updatesector(globalposx, globalposy, &globalcursectnum);
if (globalcursectnum < 0) globalcursectnum = i;
}
// NOTE: globalcursectnum has been already adjusted in ADJUST_GLOBALCURSECTNUM.
Bassert((unsigned)globalcursectnum < MAXSECTORS);
polymost_scansector(globalcursectnum);
grhalfxdown10x = grhalfxdown10;