Fix actions with zero duration on NDK 16. (#18596)

This commit is contained in:
Tiago Martines 2018-01-02 00:35:54 -02:00 committed by minggo
parent 6164456840
commit 2c025d8048
1 changed files with 3 additions and 3 deletions

View File

@ -126,9 +126,9 @@ void ActionInterval::step(float dt)
}
float updateDt = MAX (0, // needed for rewind. elapsed could be negative
MIN(1, _elapsed / _duration)
);
float updateDt = std::max(0.0f, // needed for rewind. elapsed could be negative
std::min(1.0f, _elapsed / _duration)
);
if (sendUpdateEventToScript(updateDt, this)) return;