diff options
author | sfan5 <sfan5@live.de> | 2022-01-18 19:19:40 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2022-01-19 23:30:18 +0100 |
commit | f66ed2c27fa0f351ffb458224af74f3371d6f4ac (patch) | |
tree | 1ec5117f37353960951911d8add5bc8b86b44d89 /src | |
parent | 4f6f09590c65187071096cceac5872293bc53b2f (diff) | |
download | minetest-f66ed2c27fa0f351ffb458224af74f3371d6f4ac.tar.gz minetest-f66ed2c27fa0f351ffb458224af74f3371d6f4ac.tar.bz2 minetest-f66ed2c27fa0f351ffb458224af74f3371d6f4ac.zip |
Fix local animation not instantly updating after being set
Diffstat (limited to 'src')
-rw-r--r-- | src/client/content_cao.cpp | 1 | ||||
-rw-r--r-- | src/network/clientpackethandler.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp index 9cc40c95f..1d4636a08 100644 --- a/src/client/content_cao.cpp +++ b/src/client/content_cao.cpp @@ -1815,6 +1815,7 @@ void GenericCAO::processMessage(const std::string &data) { updateAnimation(); } + // FIXME: ^ This code is trash. It's also broken. } } else if (cmd == AO_CMD_SET_ANIMATION_SPEED) { m_animation_speed = readF32(is); diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 6aececa7f..f7c586b80 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -1404,6 +1404,8 @@ void Client::handleCommand_LocalPlayerAnimations(NetworkPacket* pkt) *pkt >> player->local_animations[2]; *pkt >> player->local_animations[3]; *pkt >> player->local_animation_speed; + + player->last_animation = -1; } void Client::handleCommand_EyeOffset(NetworkPacket* pkt) |