use a macro for mobjtimefrac
just looks a little tidier
This commit is contained in:
1 parent
6919b9fd91
commit
8d70016edc
4 files changed
+9
-7
No files matched your search
@@ -3573,11 +3573,11 @@ static void HWR_RotateSpritePolyToAim(gl_vissprite_t *spr, FOutVector *wallVerts
|
||||
// do interpolation
|
||||
if (precip)
|
||||
{
|
||||
R_InterpolatePrecipMobjState((precipmobj_t *)spr->mobj, R_CheckInterpDist(spr->mobj) ? R_GetTimeFrac(RTF_LEVEL) : FRACUNIT, &interp);
|
||||
R_InterpolatePrecipMobjState((precipmobj_t *)spr->mobj, R_GetMobjTimeFrac(spr->mobj), &interp);
|
||||
}
|
||||
else
|
||||
{
|
||||
R_InterpolateMobjState(spr->mobj, R_CheckInterpDist(spr->mobj) ? R_GetTimeFrac(RTF_LEVEL) : FRACUNIT, &interp);
|
||||
R_InterpolateMobjState(spr->mobj, R_GetMobjTimeFrac(spr->mobj), &interp);
|
||||
}
|
||||
|
||||
if (!precip && P_MobjFlip(spr->mobj) == -1) // precip doesn't have eflags so they can't flip
|
||||
@@ -4700,7 +4700,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||
// uncapped/interpolation
|
||||
interpmobjstate_t interp = {};
|
||||
|
||||
R_InterpolateMobjState(thing, R_CheckInterpDist(thing) ? R_GetTimeFrac(RTF_LEVEL) : FRACUNIT, &interp);
|
||||
R_InterpolateMobjState(thing, R_GetMobjTimeFrac(thing), &interp);
|
||||
|
||||
if (interp.spritexscale < 1 || interp.spriteyscale < 1)
|
||||
return;
|
||||
@@ -5048,7 +5048,7 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
interpmobjstate_t interp = {};
|
||||
|
||||
// do interpolation
|
||||
R_InterpolatePrecipMobjState(thing, R_CheckInterpDist((mobj_t*)thing) ? R_GetTimeFrac(RTF_LEVEL) : FRACUNIT, &interp);
|
||||
R_InterpolatePrecipMobjState(thing, R_GetMobjTimeFrac((mobj_t*)thing), &interp);
|
||||
|
||||
// Visibility check by the blend mode.
|
||||
if (thing->frame & FF_TRANSMASK)
|
||||
|
||||
@@ -1190,7 +1190,7 @@ void HWR_DrawMD2(gl_vissprite_t *spr)
|
||||
spriteinfo_t *sprinfo;
|
||||
interpmobjstate_t interp;
|
||||
|
||||
R_InterpolateMobjState(spr->mobj, R_CheckInterpDist(spr->mobj) ? R_GetTimeFrac(RTF_LEVEL) : FRACUNIT, &interp);
|
||||
R_InterpolateMobjState(spr->mobj, R_GetMobjTimeFrac(spr->mobj), &interp);
|
||||
|
||||
// Apparently people don't like jump frames like that, so back it goes
|
||||
//if (tics > durs)
|
||||
|
||||
@@ -44,6 +44,8 @@ UINT32 R_GetFramerateCap(void);
|
||||
fixed_t R_GetTimeFrac(timefrac_e level);
|
||||
void R_SetTimeFrac(fixed_t frac);
|
||||
|
||||
#define R_GetMobjTimeFrac(mobj) (R_CheckInterpDist(mobj) ? R_GetTimeFrac(RTF_LEVEL) : FRACUNIT)
|
||||
|
||||
enum viewcontext_e
|
||||
{
|
||||
VIEWCONTEXT_PLAYER1 = 0,
|
||||
|
||||
+2
-2
@@ -1242,7 +1242,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||
interpmobjstate_t interp = {};
|
||||
|
||||
// do interpolation
|
||||
R_InterpolateMobjState(oldthing, R_CheckInterpDist(oldthing) ? R_GetTimeFrac(RTF_LEVEL) : FRACUNIT, &interp);
|
||||
R_InterpolateMobjState(oldthing, R_GetMobjTimeFrac(oldthing), &interp);
|
||||
|
||||
this_scale = interp.scale;
|
||||
|
||||
@@ -1873,7 +1873,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||
interpmobjstate_t interp = {};
|
||||
|
||||
// do interpolation
|
||||
R_InterpolatePrecipMobjState(thing, R_CheckInterpDist((mobj_t*)thing) ? R_GetTimeFrac(RTF_LEVEL) : FRACUNIT, &interp);
|
||||
R_InterpolatePrecipMobjState(thing, R_GetMobjTimeFrac((mobj_t*)thing), &interp);
|
||||
|
||||
this_scale = interp.scale;
|
||||
|
||||
|
||||
Reference in new issue
Block a user