mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- fixed positioning of portal things
In some situations it can happen that the sector here is not the frontsector of the anchor linedef, because some colinear node line with opposite direction causes this to be positioned on the wrong side. The only remedy here is to explicitly set the correct sector after spawning these things.
This commit is contained in:
parent
f0c2cd2d50
commit
ed211ecbab
1 changed files with 7 additions and 0 deletions
|
@ -966,6 +966,13 @@ void P_SpawnPortal(line_t *line, int sectortag, int plane, int bytealpha, int li
|
||||||
|
|
||||||
AStackPoint *anchor = Spawn<AStackPoint>(pos1, NO_REPLACE);
|
AStackPoint *anchor = Spawn<AStackPoint>(pos1, NO_REPLACE);
|
||||||
AStackPoint *reference = Spawn<AStackPoint>(pos2, NO_REPLACE);
|
AStackPoint *reference = Spawn<AStackPoint>(pos2, NO_REPLACE);
|
||||||
|
|
||||||
|
// In some situations it can happen that the sector here is not the frontsector of the anchor linedef,
|
||||||
|
// because some colinear node line with opposite direction causes this to be positioned on the wrong side.
|
||||||
|
// Fortunately these things will never move so it should be sufficient to set the intended sector directly.
|
||||||
|
anchor->Sector = line->frontsector;
|
||||||
|
reference->Sector = lines[i].frontsector;
|
||||||
|
|
||||||
reference->special1 = linked ? SKYBOX_LINKEDPORTAL : SKYBOX_PORTAL;
|
reference->special1 = linked ? SKYBOX_LINKEDPORTAL : SKYBOX_PORTAL;
|
||||||
anchor->special1 = SKYBOX_ANCHOR;
|
anchor->special1 = SKYBOX_ANCHOR;
|
||||||
// store the portal displacement in the unused scaleX/Y members of the portal reference actor.
|
// store the portal displacement in the unused scaleX/Y members of the portal reference actor.
|
||||||
|
|
Loading…
Reference in a new issue