mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-20 11:03:08 +00:00
- fix rotationSpeed being ignored after the model interpolation fix
This commit is contained in:
parent
7b619bc78c
commit
359b13b783
1 changed files with 10 additions and 2 deletions
|
@ -94,9 +94,17 @@ void FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame *s
|
||||||
|
|
||||||
if (smf->flags & MDL_ROTATING)
|
if (smf->flags & MDL_ROTATING)
|
||||||
{
|
{
|
||||||
double turns = (I_GetTime() % 200 + I_GetTimeFrac()) / 200.0;
|
if (smf->rotationSpeed > 0.0000000001)
|
||||||
|
{
|
||||||
|
double turns = (I_GetTime() + I_GetTimeFrac()) / (200.0 / smf->rotationSpeed);
|
||||||
|
turns -= std::floor(turns);
|
||||||
rotateOffset = turns * 360.0;
|
rotateOffset = turns * 360.0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rotateOffset = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Added MDL_USEACTORPITCH and MDL_USEACTORROLL flags processing.
|
// Added MDL_USEACTORPITCH and MDL_USEACTORROLL flags processing.
|
||||||
// If both flags MDL_USEACTORPITCH and MDL_PITCHFROMMOMENTUM are set, the pitch sums up the actor pitch and the velocity vector pitch.
|
// If both flags MDL_USEACTORPITCH and MDL_PITCHFROMMOMENTUM are set, the pitch sums up the actor pitch and the velocity vector pitch.
|
||||||
|
|
Loading…
Reference in a new issue