Revert "completely remove precip interpolation"
This reverts commit c444d4180e.
This commit is contained in:
1 parent
41229be341
commit
b9d6d510be
4 files changed
+27
-27
No files matched your search
@@ -3911,7 +3911,7 @@ static void HWR_RotateSpritePolyToAim(gr_vissprite_t *spr, FOutVector *wallVerts
|
||||
{
|
||||
if (spr->precip)
|
||||
{
|
||||
//R_InterpolatePrecipMobjState((precipmobj_t *)spr->mobj, rendertimefrac, &interp);
|
||||
R_InterpolatePrecipMobjState((precipmobj_t *)spr->mobj, rendertimefrac, &interp);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3922,7 +3922,7 @@ static void HWR_RotateSpritePolyToAim(gr_vissprite_t *spr, FOutVector *wallVerts
|
||||
{
|
||||
if (spr->precip)
|
||||
{
|
||||
//R_InterpolatePrecipMobjState((precipmobj_t *)spr->mobj, FRACUNIT, &interp);
|
||||
R_InterpolatePrecipMobjState((precipmobj_t *)spr->mobj, FRACUNIT, &interp);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5408,21 +5408,21 @@ void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
return;
|
||||
|
||||
// uncapped/interpolation
|
||||
//interpmobjstate_t interp = {0};
|
||||
interpmobjstate_t interp = {0};
|
||||
|
||||
// do interpolation
|
||||
/*if (R_UsingFrameInterpolation() && !paused)
|
||||
if (R_UsingFrameInterpolation() && !paused)
|
||||
{
|
||||
R_InterpolatePrecipMobjState(thing, rendertimefrac, &interp);
|
||||
}
|
||||
else
|
||||
{
|
||||
R_InterpolatePrecipMobjState(thing, FRACUNIT, &interp);
|
||||
}*/
|
||||
}
|
||||
|
||||
// transform the origin point
|
||||
tr_x = FIXED_TO_FLOAT(thing->x) - gr_viewx;
|
||||
tr_y = FIXED_TO_FLOAT(thing->y) - gr_viewy;
|
||||
tr_x = FIXED_TO_FLOAT(interp.x) - gr_viewx;
|
||||
tr_y = FIXED_TO_FLOAT(interp.y) - gr_viewy;
|
||||
|
||||
// rotation around vertical axis
|
||||
tz = (tr_x * gr_viewcos) + (tr_y * gr_viewsin);
|
||||
@@ -5431,8 +5431,8 @@ void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
if (tz < ZCLIP_PLANE)
|
||||
return;
|
||||
|
||||
tr_x = FIXED_TO_FLOAT(thing->x);
|
||||
tr_y = FIXED_TO_FLOAT(thing->y);
|
||||
tr_x = FIXED_TO_FLOAT(interp.x);
|
||||
tr_y = FIXED_TO_FLOAT(interp.y);
|
||||
|
||||
// decide which patch to use for sprite relative to player
|
||||
if ((unsigned)thing->sprite >= numsprites)
|
||||
|
||||
+4
-4
@@ -3792,7 +3792,7 @@ void P_NullPrecipThinker(precipmobj_t *mobj)
|
||||
{
|
||||
//(void)mobj;
|
||||
mobj->precipflags &= ~PCF_THUNK;
|
||||
//R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
}
|
||||
|
||||
void P_SnowThinker(precipmobj_t *mobj)
|
||||
@@ -3803,7 +3803,7 @@ void P_SnowThinker(precipmobj_t *mobj)
|
||||
if ((mobj->z += mobj->momz) <= mobj->floorz)
|
||||
{
|
||||
mobj->z = mobj->ceilingz;
|
||||
//R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3828,7 +3828,7 @@ void P_RainThinker(precipmobj_t *mobj)
|
||||
return;
|
||||
|
||||
mobj->z = mobj->ceilingz;
|
||||
//R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
P_SetPrecipMobjState(mobj, S_RAIN1);
|
||||
|
||||
return;
|
||||
@@ -10123,7 +10123,7 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype
|
||||
|| mobj->subsector->sector->floorpic == skyflatnum)
|
||||
mobj->precipflags |= PCF_PIT;
|
||||
|
||||
//R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
R_ResetPrecipitationMobjInterpolationState(mobj);
|
||||
|
||||
return mobj;
|
||||
}
|
||||
|
||||
+4
-4
@@ -313,7 +313,7 @@ void R_InterpolateMobjState(mobj_t *mobj, fixed_t frac, interpmobjstate_t *out)
|
||||
}
|
||||
}
|
||||
|
||||
/*void R_InterpolatePrecipMobjState(precipmobj_t *mobj, fixed_t frac, interpmobjstate_t *out)
|
||||
void R_InterpolatePrecipMobjState(precipmobj_t *mobj, fixed_t frac, interpmobjstate_t *out)
|
||||
{
|
||||
if (frac == FRACUNIT)
|
||||
{
|
||||
@@ -342,7 +342,7 @@ void R_InterpolateMobjState(mobj_t *mobj, fixed_t frac, interpmobjstate_t *out)
|
||||
out->subsector = mobj->subsector;
|
||||
|
||||
out->angle = mobj->angle;
|
||||
}*/
|
||||
}
|
||||
|
||||
static void AddInterpolator(levelinterpolator_t* interpolator)
|
||||
{
|
||||
@@ -782,7 +782,7 @@ void R_ResetMobjInterpolationState(mobj_t *mobj)
|
||||
//
|
||||
// Reset the rendering interpolation state of the precipmobj.
|
||||
//
|
||||
/*void R_ResetPrecipitationMobjInterpolationState(precipmobj_t *mobj)
|
||||
void R_ResetPrecipitationMobjInterpolationState(precipmobj_t *mobj)
|
||||
{
|
||||
mobj->old_x2 = mobj->old_x;
|
||||
mobj->old_y2 = mobj->old_y;
|
||||
@@ -796,4 +796,4 @@ void R_ResetMobjInterpolationState(mobj_t *mobj)
|
||||
mobj->old_spriteyscale = mobj->spriteyscale;
|
||||
mobj->old_spritexoffset = mobj->spritexoffset;
|
||||
mobj->old_spriteyoffset = mobj->spriteyoffset;
|
||||
}*/
|
||||
}
|
||||
+10
-10
@@ -1711,7 +1711,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
fixed_t gz ,gzt;
|
||||
|
||||
// uncapped/interpolation
|
||||
/*interpmobjstate_t interp = {0};
|
||||
interpmobjstate_t interp = {0};
|
||||
|
||||
// do interpolation
|
||||
if (R_UsingFrameInterpolation() && !paused)
|
||||
@@ -1721,11 +1721,11 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
else
|
||||
{
|
||||
R_InterpolatePrecipMobjState(thing, FRACUNIT, &interp);
|
||||
}*/
|
||||
}
|
||||
|
||||
// transform the origin point
|
||||
tr_x = thing->x - viewx;
|
||||
tr_y = thing->y - viewy;
|
||||
tr_x = interp.x - viewx;
|
||||
tr_y = interp.y - viewy;
|
||||
|
||||
gxt = FixedMul(tr_x, viewcos);
|
||||
gyt = -FixedMul(tr_y, viewsin);
|
||||
@@ -1794,12 +1794,12 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
if (x2 < portalclipstart || x1 > portalclipend)
|
||||
return;
|
||||
|
||||
if (P_PointOnLineSide(thing->x, thing->y, portalclipline) != 0)
|
||||
if (P_PointOnLineSide(interp.x, interp.y, portalclipline) != 0)
|
||||
return;
|
||||
}
|
||||
|
||||
//SoM: 3/17/2000: Disregard sprites that are out of view..
|
||||
gzt = thing->z + spritecachedinfo[lump].topoffset;
|
||||
gzt = interp.z + spritecachedinfo[lump].topoffset;
|
||||
gz = gzt - spritecachedinfo[lump].height;
|
||||
|
||||
if (thing->subsector->sector->cullheight)
|
||||
@@ -1812,12 +1812,12 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
vis = R_NewVisSprite();
|
||||
vis->scale = vis->sortscale = yscale; //<<detailshift;
|
||||
vis->dispoffset = 0; // Monster Iestyn: 23/11/15
|
||||
vis->gx = thing->x;
|
||||
vis->gy = thing->y;
|
||||
vis->gx = interp.x;
|
||||
vis->gy = interp.y;
|
||||
vis->gz = gz;
|
||||
vis->gzt = gzt;
|
||||
vis->thingheight = 4*FRACUNIT;
|
||||
vis->pz = thing->z;
|
||||
vis->pz = interp.z;
|
||||
vis->pzt = vis->pz + vis->thingheight;
|
||||
vis->texturemid = vis->gzt - viewz;
|
||||
vis->scalestep = 0;
|
||||
@@ -1844,7 +1844,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
vis->startfrac = 0;
|
||||
vis->xiscale = iscale;
|
||||
|
||||
//vis->thingscale = interp.scale;
|
||||
vis->thingscale = interp.scale;
|
||||
|
||||
if (vis->x1 > x1)
|
||||
vis->startfrac += vis->xiscale*(vis->x1-x1);
|
||||
|
||||
Reference in new issue
Block a user