From a40b1f193458e782c65545b8a94b08d1a7547fc7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 15 Apr 2022 22:49:23 +0200 Subject: [PATCH] - fixed: group teleporters must always preserve orientation. --- src/playsim/p_teleport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/playsim/p_teleport.cpp b/src/playsim/p_teleport.cpp index 4ea15d9ce..356576c35 100644 --- a/src/playsim/p_teleport.cpp +++ b/src/playsim/p_teleport.cpp @@ -662,10 +662,11 @@ bool DoGroupForOne (AActor *victim, AActor *source, AActor *dest, bool floorz, b DAngle offAngle = victim->Angles.Yaw - source->Angles.Yaw; DVector2 newp = { off.X * an.Cos() - off.Y * an.Sin(), off.X * an.Sin() + off.Y * an.Cos() }; double z = floorz ? ONFLOORZ : dest->Z() + victim->Z() - source->Z(); + int flags = fog ? (TELF_DESTFOG | TELF_SOURCEFOG | TELF_KEEPORIENTATION) : TELF_KEEPORIENTATION; bool res = P_Teleport (victim, DVector3(dest->Pos().XY() + newp, z), - 0., fog ? (TELF_DESTFOG | TELF_SOURCEFOG) : TELF_KEEPORIENTATION); + 0., flags); // P_Teleport only changes angle if fog is true victim->Angles.Yaw = (dest->Angles.Yaw + victim->Angles.Yaw - source->Angles.Yaw).Normalized360();