unconditionally clamp out timefrac
0 - FRACUNIT range
This commit is contained in:
1 parent
6c1c713cac
commit
3375cc5684
2 files changed
+9
-6
No files matched your search
+9
-1
@@ -69,7 +69,15 @@ fixed_t I_GetTimeFrac(void)
|
||||
double integral;
|
||||
const double fractional = modf(timeinticks, &integral);
|
||||
|
||||
return DoubleToFixed(fractional);
|
||||
if (fractional < 0)
|
||||
return 0;
|
||||
|
||||
fixed_t outfrac = DoubleToFixed(fractional);
|
||||
|
||||
if (outfrac > FRACUNIT)
|
||||
outfrac = FRACUNIT;
|
||||
|
||||
return outfrac;
|
||||
}
|
||||
|
||||
void I_InitializeTime(void)
|
||||
|
||||
@@ -207,11 +207,6 @@ void R_InterpolateView(fixed_t frac, boolean forceinvalid)
|
||||
{
|
||||
viewvars_t* prevview = oldview;
|
||||
|
||||
if (FIXED_TO_FLOAT(frac) < 0)
|
||||
frac = 0;
|
||||
if (frac > FRACUNIT)
|
||||
frac = FRACUNIT;
|
||||
|
||||
if (oldview_invalid[R_GetViewNumber()] != 0 || forceinvalid)
|
||||
{
|
||||
// interpolate from newview to newview
|
||||
|
||||
Reference in new issue
Block a user