From 3e802932a6797fc0f4768ebc61cf9ac4f498c7fb Mon Sep 17 00:00:00 2001 From: changyong guo Date: Mon, 23 Jul 2018 06:23:33 +0800 Subject: recover hotbar selected slot after reconnect (#4249) 1. implement protocol message SendHeldItemChange 2. add save / load inventory equipped item slot in JSON 3. send held item slot message after player connect to server Fixes #4189 --- src/ClientHandle.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index 78da199a7..079c57a19 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -176,6 +176,7 @@ public: // tolua_export void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion); void SendGameMode (eGameMode a_GameMode); void SendHealth (void); + void SendHeldItemChange (int a_ItemIndex); void SendHideTitle (void); // tolua_export void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item); void SendLeashEntity (const cEntity & a_Entity, const cEntity & a_EntityLeashedTo); -- cgit v1.2.3