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 # endif
// Update starting sector number (common to classic and Polymost). // Update starting sector number (common to classic and Polymost).
// ADJUST_GLOBALCURSECTNUM.
if (globalcursectnum >= MAXSECTORS) if (globalcursectnum >= MAXSECTORS)
globalcursectnum -= MAXSECTORS; globalcursectnum -= MAXSECTORS;
else else

View file

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