mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-29 12:40:40 +00:00
Merge branch 'always-move-cam' into 'master'
Move camera less often See merge request KartKrew/Kart!30
This commit is contained in:
commit
5a80d036e7
3 changed files with 10 additions and 22 deletions
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
|
||||
{
|
||||
// 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();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// 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();
|
||||
|
||||
// Z_CheckMemCleanup();
|
||||
|
|
|
@ -9547,12 +9547,6 @@ void P_PlayerAfterThink(player_t *player)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -9834,8 +9828,6 @@ void P_PlayerAfterThink(player_t *player)
|
|||
player->viewz = player->mo->z + player->mo->height - player->viewheight;
|
||||
else
|
||||
player->viewz = player->mo->z + player->viewheight;
|
||||
if (server || addedtogame)
|
||||
P_MoveChaseCamera(player, thiscam, false); // calculate the camera movement
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue