mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-22 21:41:31 +00:00
Don't reset camera position when spectating
Fixes a software renderer crash due to hitlag VFX from the player's death (death from spectating) being too close to the camera.
This commit is contained in:
parent
0036006586
commit
414d6f3647
2 changed files with 9 additions and 4 deletions
11
src/p_mobj.c
11
src/p_mobj.c
|
|
@ -12014,12 +12014,15 @@ void P_AfterPlayerSpawn(INT32 playernum)
|
|||
|
||||
p->drawangle = mobj->angle;
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
if (p->spectator == false)
|
||||
{
|
||||
if (camera[i].chase)
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
if (displayplayers[i] == playernum)
|
||||
P_ResetCamera(p, &camera[i]);
|
||||
if (camera[i].chase)
|
||||
{
|
||||
if (displayplayers[i] == playernum)
|
||||
P_ResetCamera(p, &camera[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7735,6 +7735,8 @@ static void P_SetupCamera(UINT8 pnum, camera_t *cam)
|
|||
cam->subsector = R_PointInSubsector(cam->x, cam->y); // make sure camera has a subsector set -- Monster Iestyn (12/11/18)
|
||||
}
|
||||
}
|
||||
|
||||
cam->chase = false; // tell camera to reset its position next tic
|
||||
}
|
||||
|
||||
static void P_InitCamera(void)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue