Allow ReEnable portal with Line_SetPortalTarget also for Visual & Teleport.
Changing a portal destination at runtime with Line_SetPortalTarget after it was temporarily disabled with destination 0 (zero) only worked for PORTF_INTERACTIVE and not for PORTT_VISUAL & PORTT_TELEPORT, while the WIKI states that it's only not allowed for static portals (type 3 & 4, see https://zdoom.org/wiki/Line_SetPortal).
Actually the only thing that was missing was restoring the mFlags for the Visual & Teleport types.
Code submission : https://github.com/coelckers/gzdoom/pull/372
I have included a small testwad that should bring up a tent in the open field. Working: the portal is disabled after map startup; the switch in the foreground should bring it back, and with the switch in the background it can be hidden again. This does not work due to the current code for Visual & Teleport types.
The small code change solves this.
ReEnable portal with Line_SetPortalTarget Visual & Teleport
Moderator: GZDoom Developers
- gwHero
- Posts: 360
- Joined: Mon May 08, 2017 3:23 am
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: The Netherlands
ReEnable portal with Line_SetPortalTarget Visual & Teleport
- Attachments
-
- PortalMAP01.wad
- Test wad
- (25 KiB) Downloaded 30 times