Always move the camera
According to wolfs, this improves fps. Let's confirm, shall we?
This commit is contained in:
parent
76e0ff6dc7
commit
71efda2b20
14
src/d_main.c
14
src/d_main.c
|
@ -723,20 +723,6 @@ 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!
|
|
||||||
/* Not yay, it ruins Kart's drift :y
|
|
||||||
if (gamestate == GS_LEVEL && netgame)
|
|
||||||
{
|
|
||||||
if (camera.chase)
|
|
||||||
P_MoveChaseCamera(&players[displayplayer], &camera, false);
|
|
||||||
if (splitscreen && camera2.chase)
|
|
||||||
P_MoveChaseCamera(&players[secondarydisplayplayer], &camera2, false);
|
|
||||||
if (splitscreen > 1 && camera3.chase)
|
|
||||||
P_MoveChaseCamera(&players[thirddisplayplayer], &camera3, false);
|
|
||||||
if (splitscreen > 2 && camera4.chase)
|
|
||||||
P_MoveChaseCamera(&players[fourthdisplayplayer], &camera4, false);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
D_Display();
|
D_Display();
|
||||||
|
|
||||||
if (moviemode)
|
if (moviemode)
|
||||||
|
|
10
src/p_tick.c
10
src/p_tick.c
|
@ -748,6 +748,16 @@ void P_Ticker(boolean run)
|
||||||
D_MapChange(gamemap, gametype, encoremode, true, 0, false, false);
|
D_MapChange(gamemap, gametype, encoremode, true, 0, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always move the camera.
|
||||||
|
if (camera.chase)
|
||||||
|
P_MoveChaseCamera(&players[displayplayer], &camera, false);
|
||||||
|
if (splitscreen && camera2.chase)
|
||||||
|
P_MoveChaseCamera(&players[secondarydisplayplayer], &camera2, false);
|
||||||
|
if (splitscreen > 1 && camera3.chase)
|
||||||
|
P_MoveChaseCamera(&players[thirddisplayplayer], &camera3, false);
|
||||||
|
if (splitscreen > 2 && camera4.chase)
|
||||||
|
P_MoveChaseCamera(&players[fourthdisplayplayer], &camera4, false);
|
||||||
|
|
||||||
P_MapEnd();
|
P_MapEnd();
|
||||||
|
|
||||||
// Z_CheckMemCleanup();
|
// Z_CheckMemCleanup();
|
||||||
|
|
|
@ -9546,12 +9546,6 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
|
|
||||||
if (player->playerstate == PST_DEAD)
|
if (player->playerstate == PST_DEAD)
|
||||||
{
|
{
|
||||||
// camera may still move when guy is dead
|
|
||||||
//if (!netgame)
|
|
||||||
{
|
|
||||||
if (thiscam && thiscam->chase)
|
|
||||||
P_MoveChaseCamera(player, thiscam, false);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9833,8 +9827,6 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
player->viewz = player->mo->z + player->mo->height - player->viewheight;
|
player->viewz = player->mo->z + player->mo->height - player->viewheight;
|
||||||
else
|
else
|
||||||
player->viewz = player->mo->z + player->viewheight;
|
player->viewz = player->mo->z + player->viewheight;
|
||||||
if (server || addedtogame)
|
|
||||||
P_MoveChaseCamera(player, thiscam, false); // calculate the camera movement
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue