ReEnable portal with Line_SetPortalTarget Visual & Teleport

Moderator: GZDoom Developers

Post Reply
User avatar
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

Post by gwHero »

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.
Attachments
PortalMAP01.wad
Test wad
(25 KiB) Downloaded 30 times
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”