by Graf Zahl » Sun Dec 27, 2009 9:58 am
Done, sort of. But I decided to do it in a manner that's compatible with Eternity so this does not use stack points in the map anymore but links two sidedefs together. It also allows one-way portals unlike the stackpoint method which is always two-way.
Here's how it works:
There's one new line special (57: Sector_SetPortal(tag, type, ceiling, link, alpha)
tag: sets a sector tag for all sectors in which the portal is to be set.
type: reserved for later use. Must be 0 or nothing will happen
ceiling: 1 for ceiling, 0 for floor
link: For each portal two lines must be linked. The first 3 parameters need to be identical for these 2 lines. This one must be 0 for the place where the portal is anchored to and 1 where it is defined.
alpha: Translucency of portal plane
Obviously this uses the existing implementation so all the limitations concerning visibility clipping still apply here as well.
And for those who are interested, Eternity's line types translate as follows:
Code: Select all
298 = 0, Sector_SetPortal(tag, 0, 1, 0, 0)
299 = 0, Sector_SetPortal(tag, 0, 0, 0, 0)
295 = 0, Sector_SetPortal(tag, 0, 1, 1, 0)
296 = 0, Sector_SetPortal(tag, 0, 0, 1, 0)
Done, sort of. But I decided to do it in a manner that's compatible with Eternity so this does not use stack points in the map anymore but links two sidedefs together. It also allows one-way portals unlike the stackpoint method which is always two-way.
Here's how it works:
There's one new line special (57: Sector_SetPortal(tag, type, ceiling, link, alpha)
tag: sets a sector tag for all sectors in which the portal is to be set.
type: reserved for later use. Must be 0 or nothing will happen
ceiling: 1 for ceiling, 0 for floor
link: For each portal two lines must be linked. The first 3 parameters need to be identical for these 2 lines. This one must be 0 for the place where the portal is anchored to and 1 where it is defined.
alpha: Translucency of portal plane
Obviously this uses the existing implementation so all the limitations concerning visibility clipping still apply here as well.
And for those who are interested, Eternity's line types translate as follows:
[code]
298 = 0, Sector_SetPortal(tag, 0, 1, 0, 0)
299 = 0, Sector_SetPortal(tag, 0, 0, 0, 0)
295 = 0, Sector_SetPortal(tag, 0, 1, 1, 0)
296 = 0, Sector_SetPortal(tag, 0, 0, 1, 0)
[/code]