Fix undesired interpolation for regular teleport

This commit is contained in:
toaster 2022-10-27 13:36:14 +01:00
parent b6eb21c5e2
commit 054bbd7745

View file

@ -17,6 +17,7 @@
#include "r_state.h"
#include "s_sound.h"
#include "r_main.h"
#include "r_fps.h"
/** \brief The P_MixUp function
@ -149,25 +150,17 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
thing->reactiontime = TICRATE/2; // don't move for about half a second
// absolute angle position
if (thing == players[consoleplayer].mo)
localangle[0] = angle;
else if (splitscreen)
{
for (i = 1; i <= splitscreen; i++)
{
if (thing == players[displayplayers[i]].mo)
{
localangle[i] = angle;
break;
}
}
}
// move chasecam at new player location
for (i = 0; i <= splitscreen; i++)
{
if (thing->player == &players[displayplayers[i]] && camera[i].chase)
if (thing->player == &players[displayplayers[i]])
{
localangle[i] = angle;
if (camera[i].chase)
P_ResetCamera(thing->player, &camera[i]);
R_ResetViewInterpolation(i + 1);
break;
}
}
// don't run in place after a teleport