mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Try putting lagless camera stuff back
This commit is contained in:
parent
76b4804e44
commit
5ae8664b70
3 changed files with 29 additions and 6 deletions
12
src/d_main.c
12
src/d_main.c
|
|
@ -814,6 +814,18 @@ void D_SRB2Loop(void)
|
||||||
}
|
}
|
||||||
else if (rendertimeout < entertic) // in case the server hang or netsplit
|
else if (rendertimeout < entertic) // in case the server hang or netsplit
|
||||||
{
|
{
|
||||||
|
// Lagless camera! Yay!
|
||||||
|
if (gamestate == GS_LEVEL && netgame)
|
||||||
|
{
|
||||||
|
// Evaluate the chase cam once for every local realtic
|
||||||
|
// This might actually be better suited inside G_Ticker or TryRunTics
|
||||||
|
for (tic_t chasecamtics = 0; chasecamtics < realtics; chasecamtics++)
|
||||||
|
{
|
||||||
|
P_RunChaseCameras();
|
||||||
|
}
|
||||||
|
R_UpdateViewInterpolation();
|
||||||
|
}
|
||||||
|
|
||||||
doDisplay = true;
|
doDisplay = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
22
src/p_tick.c
22
src/p_tick.c
|
|
@ -493,6 +493,19 @@ static inline void P_DoTeamStuff(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void P_RunChaseCameras(void)
|
||||||
|
{
|
||||||
|
UINT8 i;
|
||||||
|
|
||||||
|
for (i = 0; i <= r_splitscreen; i++)
|
||||||
|
{
|
||||||
|
if (camera[i].chase)
|
||||||
|
{
|
||||||
|
P_MoveChaseCamera(&players[displayplayers[i]], &camera[i], false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_Ticker
|
// P_Ticker
|
||||||
//
|
//
|
||||||
|
|
@ -733,12 +746,9 @@ void P_Ticker(boolean run)
|
||||||
K_UpdateDirector();
|
K_UpdateDirector();
|
||||||
|
|
||||||
// Always move the camera.
|
// Always move the camera.
|
||||||
for (i = 0; i <= r_splitscreen; i++)
|
P_RunChaseCameras();
|
||||||
{
|
|
||||||
if (camera[i].chase)
|
LUAh_PostThinkFrame();
|
||||||
P_MoveChaseCamera(&players[displayplayers[i]], &camera[i], false);
|
|
||||||
LUAh_PostThinkFrame();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (run)
|
if (run)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ extern tic_t leveltime;
|
||||||
void Command_Numthinkers_f(void);
|
void Command_Numthinkers_f(void);
|
||||||
void Command_CountMobjs_f(void);
|
void Command_CountMobjs_f(void);
|
||||||
|
|
||||||
|
void P_RunChaseCameras(void);
|
||||||
void P_Ticker(boolean run);
|
void P_Ticker(boolean run);
|
||||||
void P_PreTicker(INT32 frames);
|
void P_PreTicker(INT32 frames);
|
||||||
void P_DoTeamscrambling(void);
|
void P_DoTeamscrambling(void);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue