diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp index 79dd105f9..50470d9eb 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