mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
- SW: fixed sector transfers involving a portal for real this time.
It is not enough to just copy the properties - if this happens the entire portal needs to be reinitialized. The only way to do this is to run CollectPortals again to reset all portals in the map.
This commit is contained in:
parent
b5358bc03c
commit
e5236d3423
2 changed files with 9 additions and 4 deletions
|
@ -246,10 +246,10 @@ void CopySectorMatch(short match)
|
|||
dsectp->extra = ssectp->extra;
|
||||
dsectp->visibility = ssectp->visibility;
|
||||
|
||||
dsectp->portalnum = ssectp->portalnum;
|
||||
dsectp->portalflags = ssectp->portalflags;
|
||||
|
||||
if (ssectp->portalflags & (PORTAL_SECTOR_CEILING|PORTAL_SECTOR_FLOOR)) allPortals[ssectp->portalnum].dx = allPortals[ssectp->portalnum].dy = 0;
|
||||
if (ssectp->floorpicnum == FAF_MIRROR_PIC || ssectp->ceilingpicnum == FAF_MIRROR_PIC)
|
||||
{
|
||||
CollectPortals(); // unavoidable. Since these portals are not static we have to reinitialize all of them.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1029,8 +1029,13 @@ void CollectPortals()
|
|||
TArray<PortalGroup> ceilingportals;
|
||||
FixedBitArray<MAXSECTORS> floordone, ceilingdone;
|
||||
|
||||
for (int i = 0; i < numsectors; i++)
|
||||
{
|
||||
sector[i].portalflags = sector[i].portalnum = 0;
|
||||
}
|
||||
floordone.Zero();
|
||||
ceilingdone.Zero();
|
||||
portalClear();
|
||||
|
||||
for (int i = 0; i < numsectors; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue