diff --git a/src/d_main.c b/src/d_main.c index c5f0d0b396029bb4c18b8e46a2488906abc51c21..cac9b6c76ce147fd60ad327308b5ac7aa86075a3 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -613,14 +613,6 @@ void D_SRB2Loop(void) } else if (rendertimeout < entertic) // in case the server hang or netsplit { - // Lagless camera! Yay! - if (gamestate == GS_LEVEL && netgame) - { - if (splitscreen && camera2.chase) - P_MoveChaseCamera(&players[secondarydisplayplayer], &camera2, false); - if (camera.chase) - P_MoveChaseCamera(&players[displayplayer], &camera, false); - } D_Display(); if (moviemode) diff --git a/src/p_tick.c b/src/p_tick.c index a5ee4ea179b474abdbca16455fb1c91c2810c7ed..f009ecc2c15d589983dcff5c4ee79c859c78c491 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -697,6 +697,12 @@ void P_Ticker(boolean run) G_GhostTicker(); } + // Always move the camera. + if (splitscreen && camera2.chase) + P_MoveChaseCamera(&players[secondarydisplayplayer], &camera2, false); + if (camera.chase) + P_MoveChaseCamera(&players[displayplayer], &camera, false); + P_MapEnd(); // Z_CheckMemCleanup(); diff --git a/src/p_user.c b/src/p_user.c index 42b7681dc87d5578e61f5cc6ec3a6bdab333ca45..56ad842329023c94a51181872661af1f3e159a22 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8326,8 +8326,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall } else { - thiscam->momx = FixedMul(x - thiscam->x, camspeed); - thiscam->momy = FixedMul(y - thiscam->y, camspeed); + thiscam->momx = FixedMul(x - thiscam->x, camspeed / NEWTICRATERATIO); + thiscam->momy = FixedMul(y - thiscam->y, camspeed / NEWTICRATERATIO); if (GETSECSPECIAL(thiscam->subsector->sector->special, 1) == 6 && thiscam->z < thiscam->subsector->sector->floorheight + 256*FRACUNIT @@ -8336,7 +8336,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall thiscam->momz = 0; // Don't go down a death pit } else - thiscam->momz = FixedMul(z - thiscam->z, camspeed); + thiscam->momz = FixedMul(z - thiscam->z, camspeed / NEWTICRATERATIO); } // compute aming to look the viewed point @@ -9175,15 +9175,7 @@ void P_PlayerAfterThink(player_t *player) thiscam = &camera; 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; - } if (player->pflags & PF_NIGHTSMODE) { @@ -9448,8 +9440,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 } }