diff --git a/src/am_map.c b/src/am_map.c index ee915f43d..5f05f929d 100644 --- a/src/am_map.c +++ b/src/am_map.c @@ -1867,7 +1867,7 @@ static void AM_DrawThings(void) } else { - angle = R_InterpolateAngle(thing->oldangle, thing->angle, fractionaltic); + angle = R_InterpolateAngle(thing->oldangle, thing->angle); point.x = (thing->oldx + FixedMul(thing->x - thing->oldx, fractionaltic)) >> FRACTOMAPBITS; point.y = (thing->oldy + FixedMul(thing->y - thing->oldy, fractionaltic)) >> FRACTOMAPBITS; } diff --git a/src/p_mobj.c b/src/p_mobj.c index e7bdb6b3d..84ba557c4 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -428,7 +428,9 @@ static void P_ZMovement(mobj_t *mo) if (flags & MF_MISSILE) { - if (ceilingline && ceilingline->backsector && ceilingline->backsector->ceilingpic == skyflatnum + if (ceilingline + && ceilingline->backsector + && ceilingline->backsector->ceilingpic == skyflatnum && mo->z > ceilingline->backsector->ceilingheight) P_RemoveMobj(mo); // don't explode on skies else diff --git a/src/r_main.c b/src/r_main.c index 067e02a5e..f56da9002 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -245,7 +245,7 @@ angle_t R_PointToAngleEx2(fixed_t x1, fixed_t y1, fixed_t x, fixed_t y) } // [AM] Interpolate between two angles. -angle_t R_InterpolateAngle(angle_t oangle, angle_t nangle, fixed_t scale) +angle_t R_InterpolateAngle(angle_t oangle, angle_t nangle) { if (nangle == oangle) return nangle; @@ -253,16 +253,16 @@ angle_t R_InterpolateAngle(angle_t oangle, angle_t nangle, fixed_t scale) if (nangle > oangle) { if (nangle - oangle < ANG270) - return (oangle + (angle_t)((nangle - oangle) * FIXED2DOUBLE(scale))); + return (oangle + (angle_t)((nangle - oangle) * FIXED2DOUBLE(fractionaltic))); else - return (oangle - (angle_t)((oangle - nangle) * FIXED2DOUBLE(scale))); // Wrapped around + return (oangle - (angle_t)((oangle - nangle) * FIXED2DOUBLE(fractionaltic))); } else { if (oangle - nangle < ANG270) - return (oangle - (angle_t)((oangle - nangle) * FIXED2DOUBLE(scale))); + return (oangle - (angle_t)((oangle - nangle) * FIXED2DOUBLE(fractionaltic))); else - return (oangle + (angle_t)((nangle - oangle) * FIXED2DOUBLE(scale))); // Wrapped around + return (oangle + (angle_t)((nangle - oangle) * FIXED2DOUBLE(fractionaltic))); } } @@ -1039,7 +1039,7 @@ static void R_SetupFrame(void) viewx = mo->oldx + FixedMul(mo->x - mo->oldx, fractionaltic); viewy = mo->oldy + FixedMul(mo->y - mo->oldy, fractionaltic); viewz = viewplayer->oldviewz + FixedMul(viewplayer->viewz - viewplayer->oldviewz, fractionaltic); - viewangle = R_InterpolateAngle(mo->oldangle, mo->angle, fractionaltic); + viewangle = R_InterpolateAngle(mo->oldangle, mo->angle); if (canfreelook) pitch = (viewplayer->oldlookdir + (int)((viewplayer->lookdir - viewplayer->oldlookdir) diff --git a/src/r_main.h b/src/r_main.h index cab514740..3b40d6d94 100644 --- a/src/r_main.h +++ b/src/r_main.h @@ -137,7 +137,7 @@ angle_t R_PointToAngle(fixed_t x, fixed_t y); angle_t R_PointToAngle2(fixed_t x1, fixed_t y1, fixed_t x, fixed_t y); angle_t R_PointToAngleEx(fixed_t x, fixed_t y); angle_t R_PointToAngleEx2(fixed_t x1, fixed_t y1, fixed_t x, fixed_t y); -angle_t R_InterpolateAngle(angle_t oangle, angle_t nangle, fixed_t scale); +angle_t R_InterpolateAngle(angle_t oangle, angle_t nangle); subsector_t *R_PointInSubsector(fixed_t x, fixed_t y); //