mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- fix model rotation some more
- a couple compiler warning fixes
This commit is contained in:
parent
5181e3ebb2
commit
297f00aa4b
2 changed files with 5 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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<nanoseconds>(steady_clock::now().time_since_epoch()).count() * TimeScale;
|
||||
return (uint64_t)((duration_cast<nanoseconds>(steady_clock::now().time_since_epoch()).count()) * TimeScale);
|
||||
}
|
||||
|
||||
static uint64_t MSToNS(unsigned int ms)
|
||||
|
|
Loading…
Reference in a new issue