It's also possible to disable a portal by setting the destination to zero:
Code: Select all
Line_SetPortalTarget (1, 0);
viewtopic.php?f=18&t=46916&start=390#p892097
Moderator: GZDoom Developers
Code: Select all
Line_SetPortalTarget (1, 0);
Code: Select all
if (port->mDestination == nullptr)
{
port->mFlags = 0;
}
else if (port->mType == PORTT_INTERACTIVE)
{
FLinePortal *portd = port->mDestination->portalindex < linePortals.Size()? &linePortals[port->mDestination->portalindex] : nullptr;
if (portd != nullptr && portd->mType == PORTT_INTERACTIVE && portd->mDestination == line)
{
// this is a 2-way interactive portal
port->mFlags = port->mDefFlags | PORTF_INTERACTIVE;
portd->mFlags = portd->mDefFlags | PORTF_INTERACTIVE;
}
else
{
port->mFlags = port->mDefFlags;
}
SetRotation(portd);
}
SetRotation(port);