mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-22 01:01:45 +00:00
Ensure view interpolates between T-1 to T
This commit is contained in:
parent
f43839ef8d
commit
8fa553a1d0
1 changed files with 23 additions and 0 deletions
23
src/p_tick.c
23
src/p_tick.c
|
@ -23,6 +23,7 @@
|
|||
#include "lua_hook.h"
|
||||
#include "m_perfstats.h"
|
||||
#include "i_system.h" // I_GetPreciseTime
|
||||
#include "r_main.h"
|
||||
#include "r_fps.h"
|
||||
|
||||
// Object place
|
||||
|
@ -771,8 +772,30 @@ void P_Ticker(boolean run)
|
|||
|
||||
if (run)
|
||||
{
|
||||
player_t *player1;
|
||||
|
||||
R_UpdateLevelInterpolators();
|
||||
R_UpdateViewInterpolation();
|
||||
|
||||
// Hack: ensure newview is assigned every tic.
|
||||
// Ensures view interpolation is T-1 to T in poor network conditions
|
||||
// We need a better way to assign view state decoupled from game logic
|
||||
player1 = &players[displayplayer];
|
||||
if (player1->mo && skyboxmo[0] && cv_skybox.value)
|
||||
{
|
||||
R_SkyboxFrame(player1);
|
||||
}
|
||||
R_SetupFrame(player1);
|
||||
|
||||
if (splitscreen)
|
||||
{
|
||||
player_t *player2 = &players[secondarydisplayplayer];
|
||||
if (player2->mo && skyboxmo[0] && cv_skybox.value)
|
||||
{
|
||||
R_SkyboxFrame(player2);
|
||||
}
|
||||
R_SetupFrame(player2);
|
||||
}
|
||||
}
|
||||
|
||||
P_MapEnd();
|
||||
|
|
Loading…
Reference in a new issue