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
This commit is contained in:
James R 2023-04-22 20:49:01 -07:00
parent e8a8064da9
commit 11242527ed
2 changed files with 3 additions and 5 deletions

View file

@ -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)
{

View file

@ -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;
}
}