mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +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,8 +94,16 @@ void FModelRenderer::RenderModel(float x, float y, float z, FSpriteModelFrame *s
|
|||
|
||||
if (smf->flags & MDL_ROTATING)
|
||||
{
|
||||
double turns = (I_GetTime() % 200 + I_GetTimeFrac()) / 200.0;
|
||||
rotateOffset = turns * 360.0;
|
||||
if (smf->rotationSpeed > 0.0000000001)
|
||||
{
|
||||
double turns = (I_GetTime() + I_GetTimeFrac()) / (200.0 / smf->rotationSpeed);
|
||||
turns -= std::floor(turns);
|
||||
rotateOffset = turns * 360.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
rotateOffset = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
// Added MDL_USEACTORPITCH and MDL_USEACTORROLL flags processing.
|
||||
|
|
Loading…
Reference in a new issue