mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix model[] not supporting float frames
This commit is contained in:
parent
38255cb6bb
commit
f431c12b85
1 changed files with 5 additions and 4 deletions
|
@ -2852,12 +2852,13 @@ void GUIFormSpecMenu::parseModel(parserData *data, const std::string &element)
|
|||
e->enableContinuousRotation(inf_rotation);
|
||||
e->enableMouseControl(mousectrl);
|
||||
|
||||
s32 frame_loop_begin = 0;
|
||||
s32 frame_loop_end = 0x7FFFFFFF;
|
||||
f32 frame_loop_begin = 0;
|
||||
// This will be clamped to the animation duration.
|
||||
f32 frame_loop_end = std::numeric_limits<f32>::infinity();
|
||||
|
||||
if (frame_loop.size() == 2) {
|
||||
frame_loop_begin = stoi(frame_loop[0]);
|
||||
frame_loop_end = stoi(frame_loop[1]);
|
||||
frame_loop_begin = stof(frame_loop[0]);
|
||||
frame_loop_end = stof(frame_loop[1]);
|
||||
}
|
||||
|
||||
e->setFrameLoop(frame_loop_begin, frame_loop_end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue