- fix rotationSpeed being ignored after the model interpolation fix

(cherry picked from commit 359b13b783)
This commit is contained in:
Magnus Norddahl 2018-06-01 20:48:24 +02:00 committed by drfrag666
parent 8d6c4321f2
commit 1e65eea77f

View file

@ -95,8 +95,16 @@ void FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame *s
if (smf->flags & MDL_ROTATING)
{
double turns = (I_GetTime() % 200 + I_GetTimeFrac()) / 200.0;
rotateOffset = turns * 360.0;
if (smf->rotationSpeed > 0.0000000001)
{
double turns = (I_GetTime() + I_GetTimeFrac()) / (200.0 / smf->rotationSpeed);
turns -= std::floor(turns);
rotateOffset = turns * 360.0;
}
else
{
rotateOffset = 0.0;
}
}
// Added MDL_USEACTORPITCH and MDL_USEACTORROLL flags processing.