diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index e9a3314e07..63c4f9a011 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -207,6 +207,7 @@ void FDrawInfo::ProcessLights(GLFlat *flat, bool istrans) void FDrawInfo::DrawSubsectors(GLFlat *flat, int pass, bool processlights, bool istrans) { int dli = flat->dynlightindex; + auto vcount = flat->sector->ibocount; gl_RenderState.Apply(); if (gl.legacyMode) @@ -215,7 +216,6 @@ void FDrawInfo::DrawSubsectors(GLFlat *flat, int pass, bool processlights, bool goto legacy; } - auto vcount = flat->sector->ibocount; if (vcount > 0 && !gl_RenderState.GetClipLineShouldBeActive()) { if (processlights) SetupSectorLights(flat, GLPASS_ALL, &dli); diff --git a/src/r_data/models/models.cpp b/src/r_data/models/models.cpp index ca7b02ad3a..b8b3245242 100644 --- a/src/r_data/models/models.cpp +++ b/src/r_data/models/models.cpp @@ -97,7 +97,7 @@ void FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame *s if (smf->rotationSpeed > 0.0000000001) { double turns = (I_GetTime() + I_GetTimeFrac()) / (200.0 / smf->rotationSpeed); - turns -= std::floor(turns); + turns -= floor(turns); rotateOffset = turns * 360.0; } else