mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-23 15:40:39 +00:00
Classic/Polymost: factor out update of starting sectnum, use updatesectorbreadth().
The latter means that running perpendicular thin sector is handled better if there are e.g. TROR sectors in the same x/y space. git-svn-id: https://svn.eduke32.com/eduke32@5024 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
559f75ff54
commit
b1347517ee
2 changed files with 15 additions and 25 deletions
|
@ -9456,6 +9456,21 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
// Update starting sector number (common to classic and Polymost).
|
||||||
|
if (globalcursectnum >= MAXSECTORS)
|
||||||
|
globalcursectnum -= MAXSECTORS;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
i = globalcursectnum;
|
||||||
|
updatesectorbreadth(globalposx,globalposy,&globalcursectnum);
|
||||||
|
if (globalcursectnum < 0) globalcursectnum = i;
|
||||||
|
|
||||||
|
// PK 20110123: I'm not sure what the line above is supposed to do, but 'i'
|
||||||
|
// *can* be negative, so let's just quit here in that case...
|
||||||
|
if (globalcursectnum<0)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//============================================================================= //POLYMOST BEGINS
|
//============================================================================= //POLYMOST BEGINS
|
||||||
polymost_drawrooms();
|
polymost_drawrooms();
|
||||||
|
|
||||||
|
@ -9499,22 +9514,6 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (globalcursectnum >= MAXSECTORS)
|
|
||||||
globalcursectnum -= MAXSECTORS;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
i = globalcursectnum;
|
|
||||||
updatesector(globalposx,globalposy,&globalcursectnum);
|
|
||||||
if (globalcursectnum < 0) globalcursectnum = i;
|
|
||||||
|
|
||||||
// PK 20110123: I'm not sure what the line above is supposed to do, but 'i'
|
|
||||||
// *can* be negative, so let's just quit here in that case...
|
|
||||||
if (globalcursectnum<0)
|
|
||||||
{
|
|
||||||
enddrawing(); //!!!
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
globparaceilclip = 1;
|
globparaceilclip = 1;
|
||||||
globparaflorclip = 1;
|
globparaflorclip = 1;
|
||||||
|
|
|
@ -3468,15 +3468,6 @@ 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)
|
|
||||||
globalcursectnum -= MAXSECTORS;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
i = globalcursectnum;
|
|
||||||
updatesector(globalposx,globalposy,&globalcursectnum);
|
|
||||||
if (globalcursectnum < 0) globalcursectnum = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
polymost_scansector(globalcursectnum);
|
polymost_scansector(globalcursectnum);
|
||||||
|
|
||||||
if (inpreparemirror)
|
if (inpreparemirror)
|
||||||
|
|
Loading…
Reference in a new issue