mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)
* Fix animation frame_speed and blend loosing precision due to incorrect data type Add lua function set_animation_frame_speed to update the frame speed without resetting the animation to start
This commit is contained in:
parent
b8f06ad37e
commit
bf403b923a
10 changed files with 74 additions and 5 deletions
|
@ -147,6 +147,16 @@ std::string gob_cmd_update_animation(v2f frames, float frame_speed, float frame_
|
|||
return os.str();
|
||||
}
|
||||
|
||||
std::string gob_cmd_update_animation_speed(float frame_speed)
|
||||
{
|
||||
std::ostringstream os(std::ios::binary);
|
||||
// command
|
||||
writeU8(os, GENERIC_CMD_SET_ANIMATION_SPEED);
|
||||
// parameters
|
||||
writeF1000(os, frame_speed);
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string gob_cmd_update_bone_position(const std::string &bone, v3f position,
|
||||
v3f rotation)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue