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:
parent
ff498fc206
commit
25ef8f3934
3 changed files with 13 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue