mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +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->extra = ssectp->extra;
|
||||||
dsectp->visibility = ssectp->visibility;
|
dsectp->visibility = ssectp->visibility;
|
||||||
|
|
||||||
dsectp->portalnum = ssectp->portalnum;
|
if (ssectp->floorpicnum == FAF_MIRROR_PIC || ssectp->ceilingpicnum == FAF_MIRROR_PIC)
|
||||||
dsectp->portalflags = ssectp->portalflags;
|
{
|
||||||
|
CollectPortals(); // unavoidable. Since these portals are not static we have to reinitialize all of them.
|
||||||
if (ssectp->portalflags & (PORTAL_SECTOR_CEILING|PORTAL_SECTOR_FLOOR)) allPortals[ssectp->portalnum].dx = allPortals[ssectp->portalnum].dy = 0;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1029,8 +1029,13 @@ void CollectPortals()
|
||||||
TArray<PortalGroup> ceilingportals;
|
TArray<PortalGroup> ceilingportals;
|
||||||
FixedBitArray<MAXSECTORS> floordone, ceilingdone;
|
FixedBitArray<MAXSECTORS> floordone, ceilingdone;
|
||||||
|
|
||||||
|
for (int i = 0; i < numsectors; i++)
|
||||||
|
{
|
||||||
|
sector[i].portalflags = sector[i].portalnum = 0;
|
||||||
|
}
|
||||||
floordone.Zero();
|
floordone.Zero();
|
||||||
ceilingdone.Zero();
|
ceilingdone.Zero();
|
||||||
|
portalClear();
|
||||||
|
|
||||||
for (int i = 0; i < numsectors; i++)
|
for (int i = 0; i < numsectors; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue