1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix local animations not resetting

Converts `LocalPlayerAnimation` to a scoped enum to prevent such bugs in the future
This commit is contained in:
Lars Müller 2023-07-02 12:47:18 +02:00 committed by GitHub
parent ff498fc206
commit 25ef8f3934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 11 deletions

View file

@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/strfnd.h"
#include "client/clientevent.h"
#include "client/sound.h"
#include "client/localplayer.h"
#include "network/clientopcodes.h"
#include "network/connection.h"
#include "network/networkpacket.h"
@ -1508,7 +1509,7 @@ void Client::handleCommand_LocalPlayerAnimations(NetworkPacket* pkt)
*pkt >> player->local_animations[3];
*pkt >> player->local_animation_speed;
player->last_animation = -1;
player->last_animation = LocalPlayerAnimation::NO_ANIM;
}
void Client::handleCommand_EyeOffset(NetworkPacket* pkt)