mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-25 20:42:35 +00:00
P_DemoCameraMovement: use splitscreen ticcmd
This commit is contained in:
parent
989ee48ef8
commit
0b7a6ed7f5
2 changed files with 15 additions and 15 deletions
|
|
@ -154,7 +154,7 @@ void P_AddPlayerScore(player_t *player, UINT32 amount);
|
|||
void P_ResetCamera(player_t *player, camera_t *thiscam);
|
||||
boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam);
|
||||
void P_SlideCameraMove(camera_t *thiscam);
|
||||
void P_DemoCameraMovement(camera_t *cam);
|
||||
void P_DemoCameraMovement(camera_t *cam, UINT8 num);
|
||||
boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcalled);
|
||||
void P_ToggleDemoCamera(void);
|
||||
|
||||
|
|
|
|||
28
src/p_user.c
28
src/p_user.c
|
|
@ -2887,7 +2887,7 @@ fixed_t t_cam_rotate[MAXSPLITSCREENPLAYERS] = {-42,-42,-42,-42};
|
|||
|
||||
struct demofreecam_s democam;
|
||||
|
||||
void P_DemoCameraMovement(camera_t *cam)
|
||||
void P_DemoCameraMovement(camera_t *cam, UINT8 num)
|
||||
{
|
||||
ticcmd_t *cmd;
|
||||
angle_t thrustangle;
|
||||
|
|
@ -2897,7 +2897,7 @@ void P_DemoCameraMovement(camera_t *cam)
|
|||
boolean moving = false;
|
||||
|
||||
// first off we need to get button input
|
||||
cmd = D_LocalTiccmd(0);
|
||||
cmd = D_LocalTiccmd(num);
|
||||
|
||||
if (cmd->aiming != 0)
|
||||
{
|
||||
|
|
@ -3083,18 +3083,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
if (thiscam->subsector == NULL || thiscam->subsector->sector == NULL)
|
||||
return true;
|
||||
|
||||
if (demo.freecam || player->spectator)
|
||||
{
|
||||
P_DemoCameraMovement(thiscam);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (paused || P_AutoPause())
|
||||
return true;
|
||||
|
||||
playerScale = FixedDiv(player->mo->scale, mapobjectscale);
|
||||
scaleDiff = playerScale - FRACUNIT;
|
||||
|
||||
if (thiscam == &camera[1]) // Camera 2
|
||||
{
|
||||
num = 1;
|
||||
|
|
@ -3112,6 +3100,18 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
num = 0;
|
||||
}
|
||||
|
||||
if (demo.freecam || player->spectator)
|
||||
{
|
||||
P_DemoCameraMovement(thiscam, num);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (paused || P_AutoPause())
|
||||
return true;
|
||||
|
||||
playerScale = FixedDiv(player->mo->scale, mapobjectscale);
|
||||
scaleDiff = playerScale - FRACUNIT;
|
||||
|
||||
mo = player->mo;
|
||||
|
||||
if (P_MobjIsFrozen(mo) || player->playerstate == PST_DEAD)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue