move chasecam postimg stuff into own function + add comments for what stuff does lol
shit got me really confused
This commit is contained in:
1 parent
040e969799
commit
ab7291bd33
2 files changed
+16
-9
No files matched your search
+15
-9
@@ -3301,19 +3301,13 @@ void P_DestroyRobots(void)
|
||||
}
|
||||
}
|
||||
|
||||
// P_CameraThinker
|
||||
//
|
||||
// Process the mobj-ish required functions of the camera
|
||||
boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled)
|
||||
// the below is chasecam only, if you're curious. check out P_CalcPostImg in p_user.c for first person
|
||||
static void P_CalcChasePostImg(player_t *player, camera_t *thiscam)
|
||||
{
|
||||
boolean flipcam = (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP);
|
||||
const boolean flipcam = (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP);
|
||||
UINT16 postimgflags = 0;
|
||||
UINT8 i;
|
||||
|
||||
// This can happen when joining
|
||||
if (thiscam->subsector == NULL || thiscam->subsector->sector == NULL)
|
||||
return true;
|
||||
|
||||
if (encoremode)
|
||||
postimgflags |= POSTIMG_MIRROR;
|
||||
if (flipcam)
|
||||
@@ -3353,6 +3347,18 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
||||
players[displayplayers[i]].postimgflags = postimgflags;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// P_CameraThinker
|
||||
//
|
||||
// Process the mobj-ish required functions of the camera
|
||||
boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled)
|
||||
{
|
||||
// This can happen when joining
|
||||
if (thiscam->subsector == NULL || thiscam->subsector->sector == NULL)
|
||||
return true;
|
||||
|
||||
P_CalcChasePostImg(player, thiscam);
|
||||
|
||||
if (thiscam->momx || thiscam->momy)
|
||||
{
|
||||
|
||||
@@ -3871,6 +3871,7 @@ boolean P_SpectatorJoinGame(player_t *player)
|
||||
return false;
|
||||
}
|
||||
|
||||
// the below is first person only, if you're curious. check out P_CalcChasePostImg in p_mobj.c for chasecam
|
||||
static void P_CalcPostImg(player_t *player)
|
||||
{
|
||||
sector_t *sector = player->mo->subsector->sector;
|
||||
|
||||
Reference in new issue
Block a user