From 38c1b8588cd608e7c6038dcd41e5a5365cb8fe4d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 29 Feb 2016 16:21:05 +0100 Subject: [PATCH] - made spawning of teleport fog portal aware. --- src/p_teleport.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp index b7f9c4fd55..594ad7cc21 100644 --- a/src/p_teleport.cpp +++ b/src/p_teleport.cpp @@ -106,7 +106,6 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, fixedvec3 old; fixed_t aboveFloor; player_t *player; - angle_t an; sector_t *destsect; bool resetpitch = false; fixed_t floorheight, ceilingheight; @@ -193,8 +192,9 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, if (!predicting) { fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT; - an = angle >> ANGLETOFINESHIFT; - P_SpawnTeleportFog(thing, x + 20 * finecosine[an], y + 20 * finesine[an], thing->Z() + fogDelta, false, true); + fixedvec2 vector = Vec2Angle(20 * FRACUNIT, angle); + fixedvec2 fogpos = P_GetOffsetPosition(x, y, vector.x, vector.y); + P_SpawnTeleportFog(thing, fogpos.x, fogpos.y, thing->Z() + fogDelta, false, true); } if (thing->player)