- floatified viewheight variables and some related code.
This commit is contained in:
parent
af427b80bd
commit
6b3c0ecbd3
14 changed files with 90 additions and 82 deletions
|
|
@ -2236,9 +2236,7 @@ bool P_TryMove(AActor *thing, fixed_t x, fixed_t y,
|
|||
// it slopes or the player's eyes are bobbing in and out.
|
||||
|
||||
bool oldAboveFakeFloor, oldAboveFakeCeiling;
|
||||
fixed_t viewheight;
|
||||
|
||||
viewheight = thing->player ? thing->player->viewheight : thing->_f_height() / 2;
|
||||
double _viewheight = thing->player ? thing->player->viewheight : thing->Height / 2;
|
||||
oldAboveFakeFloor = oldAboveFakeCeiling = false; // pacify GCC
|
||||
|
||||
if (oldsec->heightsec)
|
||||
|
|
@ -2350,7 +2348,7 @@ bool P_TryMove(AActor *thing, fixed_t x, fixed_t y,
|
|||
{
|
||||
P_TranslatePortalXY(ld, hit.x, hit.y);
|
||||
P_TranslatePortalZ(ld, hit.z);
|
||||
players[consoleplayer].viewz += hit.z; // needs to be done here because otherwise the renderer will not catch the change.
|
||||
players[consoleplayer].viewz += FIXED2DBL(hit.z); // needs to be done here because otherwise the renderer will not catch the change.
|
||||
P_TranslatePortalAngle(ld, hit.angle);
|
||||
}
|
||||
R_AddInterpolationPoint(hit);
|
||||
|
|
@ -5868,7 +5866,7 @@ void PIT_FloorRaise(AActor *thing, FChangePosition *cpos)
|
|||
}
|
||||
if (thing->player && thing->player->mo == thing)
|
||||
{
|
||||
thing->player->viewz += thing->_f_Z() - oldz;
|
||||
thing->player->viewz += thing->Z() - FIXED2DBL(oldz);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5920,7 +5918,7 @@ void PIT_CeilingLower(AActor *thing, FChangePosition *cpos)
|
|||
}
|
||||
if (thing->player && thing->player->mo == thing)
|
||||
{
|
||||
thing->player->viewz += thing->_f_Z() - oldz;
|
||||
thing->player->viewz += thing->Z() - FIXED2DBL(oldz);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5962,7 +5960,7 @@ void PIT_CeilingRaise(AActor *thing, FChangePosition *cpos)
|
|||
}
|
||||
if (thing->player && thing->player->mo == thing)
|
||||
{
|
||||
thing->player->viewz += thing->_f_Z() - oldz;
|
||||
thing->player->viewz += thing->Z() - FIXED2DBL(oldz);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue