From 8cf150e68a2b96ca1e381c7a0a608afa602cad39 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Jun 2016 12:40:38 +0200 Subject: [PATCH] - set up portal rotations in the finalizing step, not during initialization. Anything earlier may miss some information required to do this correctly. --- src/portal.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/portal.cpp b/src/portal.cpp index ec3d5d90ff..f180a4fbfa 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -342,11 +342,6 @@ void P_SpawnLinePortal(line_t* line) { port->mDefFlags = port->mType == PORTT_VISUAL ? PORTF_VISIBLE : port->mType == PORTT_TELEPORT ? PORTF_TYPETELEPORT : PORTF_TYPEINTERACTIVE; } - - // Get the angle between the two linedefs, for rotating - // orientation and velocity. Rotate 180 degrees, and flip - // the position across the exit linedef, if reversed. - SetRotation(port); } else if (line->args[2] == PORTT_LINKEDEE && line->args[0] == 0) { @@ -367,7 +362,6 @@ void P_SpawnLinePortal(line_t* line) port->mType = PORTT_LINKED; port->mAlign = PORG_ABSOLUTE; port->mDefFlags = PORTF_TYPEINTERACTIVE; - SetRotation(port); // we need to create the backlink here, too. lines[i].portalindex = linePortals.Reserve(1); @@ -379,8 +373,6 @@ void P_SpawnLinePortal(line_t* line) port->mType = PORTT_LINKED; port->mAlign = PORG_ABSOLUTE; port->mDefFlags = PORTF_TYPEINTERACTIVE; - - SetRotation(port); } } } @@ -430,6 +422,9 @@ void P_UpdatePortal(FLinePortal *port) } } } + + // Cache the angle between the two linedefs, for rotating. + SetRotation(port); } //============================================================================