From 20aa7c75de533866c5659d5af070207acf212975 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Feb 2016 00:30:27 +0100 Subject: [PATCH] - added the case '0: switch the portal of to P_ChangePortal. --- src/portal.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/portal.cpp b/src/portal.cpp index fbbe5c95c..7f08e6d6e 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -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)