mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-26 17:00:56 +00:00
SE17 setup: when failing to find warp z height for lower level, use heuristic.
Specifically, use the elevator's own ceiling z height instead of searching nextsectors with nextsectorneighborz(). This makes maps like L9.map (Spaceport from N64) or DEMOUNT.MAP work. [Note well: work at all, since if it happened to work before, that was pure coincidence.] git-svn-id: https://svn.eduke32.com/eduke32@3013 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
22a4eaaf3d
commit
91e8613ae4
1 changed files with 11 additions and 4 deletions
|
@ -5540,13 +5540,20 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
if (j >= 0)
|
||||
{
|
||||
T4 = sector[j].ceilingz;
|
||||
}
|
||||
else
|
||||
{
|
||||
// use elevator sector's ceiling as heuristic
|
||||
T4 = sector[sect].ceilingz;
|
||||
|
||||
j = nextsectorneighborz(sect,sector[sect].ceilingz,1,1);
|
||||
if (j >= 0)
|
||||
T5 = sector[j].floorz;
|
||||
OSD_Printf(OSD_ERROR "WARNING: SE17 sprite %d using own sector's ceilingz to "
|
||||
"determine when to warp. Sector %d adjacent to a door?\n", i, sect);
|
||||
}
|
||||
|
||||
if (j < 0)
|
||||
j = nextsectorneighborz(sect,sector[sect].ceilingz,1,1);
|
||||
if (j >= 0)
|
||||
T5 = sector[j].floorz;
|
||||
else
|
||||
{
|
||||
// XXX: we should return to the menu for this and similar failures
|
||||
Bsprintf(tempbuf, "SE 17 (warp elevator) setup failed: sprite %d at (%d, %d)",
|
||||
|
|
Loading…
Reference in a new issue