From 11242527ed7a2cf79adf2210442a13e35573b832 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 22 Apr 2023 20:49:01 -0700 Subject: [PATCH] 412 teleport: correctly update interpolation state - Fixes relative teleport not updating floorz/ceilingz, causing camera to potentially get clipped by old position - Fixes absolute teleport not resetting viewpoint interpolation --- src/p_spec.c | 6 +----- src/p_telept.c | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 3c462c4d7..5adad0c23 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2853,11 +2853,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha y = args[3] << FRACBITS; z = args[4] << FRACBITS; - P_UnsetThingPosition(mo); - mo->x += x; - mo->y += y; - mo->z += z; - P_SetThingPosition(mo); + P_SetOrigin(mo, mo->x + x, mo->y + y, mo->z + z); if (mo->player) { diff --git a/src/p_telept.c b/src/p_telept.c index 9d3f792a3..a3a38a84f 100644 --- a/src/p_telept.c +++ b/src/p_telept.c @@ -169,6 +169,8 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle P_ResetCamera(thing->player, &camera[i]); } + R_ResetViewInterpolation(1 + i); + break; } }