mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Make camera use signpost's ground z coordinate instead of the player's z coordinate
This commit is contained in:
parent
144502729a
commit
4c432c376e
1 changed files with 13 additions and 3 deletions
16
src/p_user.c
16
src/p_user.c
|
@ -9889,10 +9889,20 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
|
||||
pviewheight = FixedMul(41*player->height/48, mo->scale);
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
z = mo->z + mo->height - pviewheight - camheight + distz;
|
||||
if (sign)
|
||||
{
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
z = sign->ceilingz - pviewheight - camheight;
|
||||
else
|
||||
z = sign->floorz + pviewheight + camheight;
|
||||
}
|
||||
else
|
||||
z = mo->z + pviewheight + camheight + distz;
|
||||
{
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
z = mo->z + mo->height - pviewheight - camheight;
|
||||
else
|
||||
z = mo->z + pviewheight + camheight;
|
||||
}
|
||||
|
||||
// move camera down to move under lower ceilings
|
||||
newsubsec = R_IsPointInSubsector(((mo->x>>FRACBITS) + (thiscam->x>>FRACBITS))<<(FRACBITS-1), ((mo->y>>FRACBITS) + (thiscam->y>>FRACBITS))<<(FRACBITS-1));
|
||||
|
|
Loading…
Reference in a new issue