mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 12:40:38 +00:00
- Blood: Re-do interpolating code in viewDrawScreen()
in preparation for returning unsynchronised input.
* Changed config so `cl_interpolate` bool doesn't apply to player's overall movement. While it might be handy for debugging moving sector objects, I see no valid reason why there'd be a need to ever un-interpolate the player's position.
This commit is contained in:
parent
20c73e1249
commit
c38c1cb1f1
1 changed files with 46 additions and 37 deletions
|
@ -631,20 +631,11 @@ void viewDrawScreen(bool sceneonly)
|
||||||
int v1 = xs_CRoundToInt(double(viewingrange) * tan(r_fov * (PI / 360.)));
|
int v1 = xs_CRoundToInt(double(viewingrange) * tan(r_fov * (PI / 360.)));
|
||||||
|
|
||||||
renderSetAspect(v1, yxaspect);
|
renderSetAspect(v1, yxaspect);
|
||||||
int cX = gView->pSprite->x;
|
|
||||||
int cY = gView->pSprite->y;
|
int cX, cY, cZ, v74, v8c;
|
||||||
int cZ = gView->zView;
|
fixed_t cA, q16horiz, q16slopehoriz;
|
||||||
double zDelta = gView->zWeapon - gView->zView - (12 << 8);
|
double zDelta, v4c, v48;
|
||||||
fixed_t cA = gView->q16ang;
|
|
||||||
fixed_t q16horiz = gView->q16horiz;
|
|
||||||
fixed_t q16slopehoriz = gView->q16slopehoriz;
|
|
||||||
int v74 = gView->bobWidth;
|
|
||||||
int v8c = gView->bobHeight;
|
|
||||||
double v4c = gView->swayWidth;
|
|
||||||
double v48 = gView->swayHeight;
|
|
||||||
int nSectnum = gView->pSprite->sectnum;
|
int nSectnum = gView->pSprite->sectnum;
|
||||||
if (cl_interpolate)
|
|
||||||
{
|
|
||||||
if (numplayers > 1 && gView == gMe && gPrediction && gMe->pXSprite->health > 0)
|
if (numplayers > 1 && gView == gMe && gPrediction && gMe->pXSprite->health > 0)
|
||||||
{
|
{
|
||||||
nSectnum = predict.at68;
|
nSectnum = predict.at68;
|
||||||
|
@ -652,30 +643,48 @@ void viewDrawScreen(bool sceneonly)
|
||||||
cY = interpolate(predictOld.at54, predict.at54, gInterpolate);
|
cY = interpolate(predictOld.at54, predict.at54, gInterpolate);
|
||||||
cZ = interpolate(predictOld.at38, predict.at38, gInterpolate);
|
cZ = interpolate(predictOld.at38, predict.at38, gInterpolate);
|
||||||
zDelta = finterpolate(predictOld.at34, predict.at34, gInterpolate);
|
zDelta = finterpolate(predictOld.at34, predict.at34, gInterpolate);
|
||||||
cA = interpolateangfix16(predictOld.at30, predict.at30, gInterpolate);
|
|
||||||
q16horiz = interpolate(predictOld.at24, predict.at24, gInterpolate);
|
|
||||||
q16slopehoriz = interpolate(predictOld.at28, predict.at28, gInterpolate);
|
q16slopehoriz = interpolate(predictOld.at28, predict.at28, gInterpolate);
|
||||||
v74 = interpolate(predictOld.atc, predict.atc, gInterpolate);
|
v74 = interpolate(predictOld.atc, predict.atc, gInterpolate);
|
||||||
v8c = interpolate(predictOld.at8, predict.at8, gInterpolate);
|
v8c = interpolate(predictOld.at8, predict.at8, gInterpolate);
|
||||||
v4c = finterpolate(predictOld.at1c, predict.at1c, gInterpolate);
|
v4c = finterpolate(predictOld.at1c, predict.at1c, gInterpolate);
|
||||||
v48 = finterpolate(predictOld.at18, predict.at18, gInterpolate);
|
v48 = finterpolate(predictOld.at18, predict.at18, gInterpolate);
|
||||||
|
|
||||||
|
if (!cl_syncinput)
|
||||||
|
{
|
||||||
|
cA = predict.at30;
|
||||||
|
q16horiz = predict.at24;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cA = interpolateangfix16(predictOld.at30, predict.at30, gInterpolate);
|
||||||
|
q16horiz = interpolate(predictOld.at24, predict.at24, gInterpolate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
VIEW* pView = &gPrevView[gViewIndex];
|
VIEW* pView = &gPrevView[gViewIndex];
|
||||||
cX = interpolate(pView->at50, cX, gInterpolate);
|
cX = interpolate(pView->at50, gView->pSprite->x, gInterpolate);
|
||||||
cY = interpolate(pView->at54, cY, gInterpolate);
|
cY = interpolate(pView->at54, gView->pSprite->y, gInterpolate);
|
||||||
cZ = interpolate(pView->at38, cZ, gInterpolate);
|
cZ = interpolate(pView->at38, gView->zView, gInterpolate);
|
||||||
zDelta = finterpolate(pView->at34, zDelta, gInterpolate);
|
zDelta = finterpolate(pView->at34, gView->zWeapon - gView->zView - (12 << 8), gInterpolate);
|
||||||
cA = interpolateangfix16(pView->at30, cA, gInterpolate);
|
q16slopehoriz = interpolate(pView->at28, gView->q16slopehoriz, gInterpolate);
|
||||||
q16horiz = interpolate(pView->at24, q16horiz, gInterpolate);
|
v74 = interpolate(pView->atc, gView->bobWidth, gInterpolate);
|
||||||
q16slopehoriz = interpolate(pView->at28, q16slopehoriz, gInterpolate);
|
v8c = interpolate(pView->at8, gView->bobHeight, gInterpolate);
|
||||||
v74 = interpolate(pView->atc, v74, gInterpolate);
|
v4c = finterpolate(pView->at1c, gView->swayWidth, gInterpolate);
|
||||||
v8c = interpolate(pView->at8, v8c, gInterpolate);
|
v48 = finterpolate(pView->at18, gView->swayHeight, gInterpolate);
|
||||||
v4c = finterpolate(pView->at1c, v4c, gInterpolate);
|
|
||||||
v48 = finterpolate(pView->at18, v48, gInterpolate);
|
if (!cl_syncinput)
|
||||||
|
{
|
||||||
|
cA = gView->q16ang;
|
||||||
|
q16horiz = gView->q16horiz;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cA = interpolateangfix16(pView->at30, gView->q16ang, gInterpolate);
|
||||||
|
q16horiz = interpolate(pView->at24, gView->q16horiz, gInterpolate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewUpdateShake();
|
viewUpdateShake();
|
||||||
q16horiz += IntToFixed(shakeHoriz);
|
q16horiz += IntToFixed(shakeHoriz);
|
||||||
cA += IntToFixed(shakeAngle);
|
cA += IntToFixed(shakeAngle);
|
||||||
|
|
Loading…
Reference in a new issue