- re-doubled the model rotation code

This commit is contained in:
Rachael Alexanderson 2017-11-23 21:27:16 -05:00
commit 1f00810f40
4 changed files with 7 additions and 7 deletions

View file

@ -102,7 +102,7 @@ void FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame *s
if (smf->flags & MDL_ROTATING)
{
const float time = smf->rotationSpeed*GetTimeFloat() / 200.f;
const double time = smf->rotationSpeed*GetTimeFloat() / 200.f;
rotateOffset = float((time - xs_FloorToInt(time)) *360.f);
}
@ -225,7 +225,7 @@ void FModelRenderer::RenderFrameModels(const FSpriteModelFrame *smf,
// [BB] In case the tic counter is frozen we have to leave ticFraction at zero.
if (ConsoleState == c_up && menuactive != MENU_On && !(level.flags2 & LEVEL2_FROZEN))
{
float time = GetTimeFloat();
double time = GetTimeFloat();
ticFraction = (time - static_cast<int>(time));
}
inter = static_cast<double>(curState->Tics - curTics - ticFraction) / static_cast<double>(curState->Tics);
@ -382,7 +382,7 @@ void FGLModelRenderer::DrawElements(int primitiveType, int numIndices, int eleme
glDrawElements(primitiveType, numIndices, elementType, (void*)(intptr_t)offset);
}
float FGLModelRenderer::GetTimeFloat()
double FGLModelRenderer::GetTimeFloat()
{
return (float)I_msTime() * (float)TICRATE / 1000.0f;
}