- some portal considerations.
This commit is contained in:
parent
5af53c0e62
commit
0dce22ce85
3 changed files with 24 additions and 10 deletions
|
|
@ -878,16 +878,22 @@ void R_SetupFrame (AActor *actor)
|
|||
interpolator.DoInterpolations (r_TicFrac);
|
||||
|
||||
// Keep the view within the sector's floor and ceiling
|
||||
fixed_t theZ = viewsector->ceilingplane.ZatPoint (viewx, viewy) - 4*FRACUNIT;
|
||||
if (viewz > theZ)
|
||||
if (viewsector->PortalBlocksMovement(sector_t::ceiling))
|
||||
{
|
||||
viewz = theZ;
|
||||
fixed_t theZ = viewsector->ceilingplane.ZatPoint(viewx, viewy) - 4 * FRACUNIT;
|
||||
if (viewz > theZ)
|
||||
{
|
||||
viewz = theZ;
|
||||
}
|
||||
}
|
||||
|
||||
theZ = viewsector->floorplane.ZatPoint (viewx, viewy) + 4*FRACUNIT;
|
||||
if (viewz < theZ)
|
||||
if (viewsector->PortalBlocksMovement(sector_t::floor))
|
||||
{
|
||||
viewz = theZ;
|
||||
fixed_t theZ = viewsector->floorplane.ZatPoint(viewx, viewy) + 4 * FRACUNIT;
|
||||
if (viewz < theZ)
|
||||
{
|
||||
viewz = theZ;
|
||||
}
|
||||
}
|
||||
|
||||
if (!paused)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue