From 283ee1a891f34b75d23fb53e14d445a5fca56405 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 20 Mar 2013 03:21:37 +0000 Subject: [PATCH] - Make teleport fogs target the teleported actor. SVN r4190 (trunk) --- src/p_teleport.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp index 79dd105f91..50470d9eb4 100644 --- a/src/p_teleport.cpp +++ b/src/p_teleport.cpp @@ -184,14 +184,16 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, if (sourceFog) { fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT; - Spawn (oldx, oldy, oldz + fogDelta, ALLOW_REPLACE); + AActor *fog = Spawn (oldx, oldy, oldz + fogDelta, ALLOW_REPLACE); + fog->target = thing; } if (useFog) { fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT; an = angle >> ANGLETOFINESHIFT; - Spawn (x + 20*finecosine[an], + AActor *fog = Spawn (x + 20*finecosine[an], y + 20*finesine[an], thing->z + fogDelta, ALLOW_REPLACE); + fog->target = thing; if (thing->player) { // [RH] Zoom player's field of vision