- added the case '0: switch the portal of to P_ChangePortal.

This commit is contained in:
Christoph Oelckers 2016-02-07 00:30:27 +01:00
parent e726143c15
commit 20aa7c75de
1 changed files with 6 additions and 1 deletions

View File

@ -165,8 +165,13 @@ static bool ChangePortalLine(line_t *line, int destid)
if (line->portalindex >= linePortals.Size()) return false;
FLinePortal *port = &linePortals[line->portalindex];
if (port->mType == PORTT_LINKED) return false; // linked portals cannot be changed.
if (destid == 0) port->mDestination = NULL;
port->mDestination = FindDestination(line, destid);
if (port->mType == PORTT_INTERACTIVE)
if (port->mDestination == NULL)
{
port->mFlags = 0;
}
else if (port->mType == PORTT_INTERACTIVE)
{
FLinePortal *portd = &linePortals[port->mDestination->portalindex];
if (portd != NULL && portd->mType == PORTT_INTERACTIVE && portd->mDestination == line)