Make camera use signpost's ground z coordinate instead of the player's z coordinate
This commit is contained in:
parent
144502729a
commit
4c432c376e
14
src/p_user.c
14
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);
|
pviewheight = FixedMul(41*player->height/48, mo->scale);
|
||||||
|
|
||||||
|
if (sign)
|
||||||
|
{
|
||||||
if (mo->eflags & MFE_VERTICALFLIP)
|
if (mo->eflags & MFE_VERTICALFLIP)
|
||||||
z = mo->z + mo->height - pviewheight - camheight + distz;
|
z = sign->ceilingz - pviewheight - camheight;
|
||||||
else
|
else
|
||||||
z = mo->z + pviewheight + camheight + distz;
|
z = sign->floorz + pviewheight + camheight;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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
|
// 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));
|
newsubsec = R_IsPointInSubsector(((mo->x>>FRACBITS) + (thiscam->x>>FRACBITS))<<(FRACBITS-1), ((mo->y>>FRACBITS) + (thiscam->y>>FRACBITS))<<(FRACBITS-1));
|
||||||
|
|
Loading…
Reference in New Issue