diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index 989b6d6ab..d170dce01 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -76,7 +76,7 @@ void FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame *s float scaleFactorZ = actor->Scale.Y * smf->zscale; float pitch = 0; float roll = 0; - float rotateOffset = 0; + double rotateOffset = 0; float angle = actor->Angles.Yaw.Degrees; // [BB] Workaround for the missing pitch information. @@ -102,8 +102,8 @@ void FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame *s if (smf->flags & MDL_ROTATING) { - const double time = smf->rotationSpeed*GetTimeFloat() / 200.f; - rotateOffset = float((time - xs_FloorToInt(time)) *360.f); + const double time = smf->rotationSpeed*GetTimeFloat() / 200.; + rotateOffset = double((time - xs_FloorToInt(time)) *360.); } // Added MDL_USEACTORPITCH and MDL_USEACTORROLL flags processing. diff --git a/src/i_time.cpp b/src/i_time.cpp index 71c7a8655..2aada4861 100644 --- a/src/i_time.cpp +++ b/src/i_time.cpp @@ -63,7 +63,7 @@ CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL) else { I_FreezeTime(true); - float clampValue = (self < 0.05) ? 0.05 : self; + float clampValue = (self < 0.05) ? 0.05f : self; if (self != clampValue) self = clampValue; TimeScale = self; @@ -74,7 +74,7 @@ CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL) static uint64_t GetClockTimeNS() { using namespace std::chrono; - return (uint64_t)duration_cast(steady_clock::now().time_since_epoch()).count() * TimeScale; + return (uint64_t)((duration_cast(steady_clock::now().time_since_epoch()).count()) * TimeScale); } static uint64_t MSToNS(unsigned int ms)