summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 23:14:45 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 23:14:45 +0200
commit674fe1e955f729e8328772313c45fe76857ec835 (patch)
tree49511bc948f76825ee1ad6be310034f261b35e90 /source/cClientHandle.cpp
parentAlmost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle. (diff)
downloadcuberite-674fe1e955f729e8328772313c45fe76857ec835.tar
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.gz
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.bz2
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.lz
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.xz
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.zst
cuberite-674fe1e955f729e8328772313c45fe76857ec835.zip
Diffstat (limited to '')
-rw-r--r--source/cClientHandle.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index a73e1f447..ed4d13a61 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -41,6 +41,7 @@
#include "packets/cPacket_13.h"
#include "packets/cPacket_ArmAnim.h"
+#include "packets/cPacket_BlockAction.h"
#include "packets/cPacket_BlockChange.h"
#include "packets/cPacket_BlockDig.h"
#include "packets/cPacket_BlockPlace.h"
@@ -50,8 +51,10 @@
#include "packets/cPacket_Disconnect.h"
#include "packets/cPacket_EntityEquipment.h"
#include "packets/cPacket_EntityLook.h"
+#include "packets/cPacket_EntityStatus.h"
#include "packets/cPacket_Flying.h"
#include "packets/cPacket_Handshake.h"
+#include "packets/cPacket_InventoryProgressBar.h"
#include "packets/cPacket_InventorySlot.h"
#include "packets/cPacket_ItemSwitch.h"
#include "packets/cPacket_KeepAlive.h"
@@ -1779,6 +1782,42 @@ void cClientHandle::SendPlayerMoveLook(void)
+void cClientHandle::SendEntityStatus(const cEntity & a_Entity, char a_Status)
+{
+ cPacket_EntityStatus es;
+ es.m_Status = a_Status;
+ es.m_UniqueID = a_Entity.GetUniqueID();
+ Send(es);
+}
+
+
+
+
+
+void cClientHandle::SendMetadata(const cPawn & a_Pawn)
+{
+ cPacket_Metadata md(a_Pawn.GetMetaData(), a_Pawn.GetUniqueID());
+ Send(md);
+}
+
+
+
+
+
+void cClientHandle::SendInventoryProgress(char a_WindowID, short a_ProgressBar, short a_Value)
+{
+ cPacket_InventoryProgressBar Progress;
+ Progress.m_WindowID = a_WindowID;
+ Progress.m_ProgressBar = a_ProgressBar;
+ Progress.m_Value = a_Value;
+ Progress.m_WindowID = a_WindowID;
+ Send(Progress);
+}
+
+
+
+
+
void cClientHandle::CheckIfWorldDownloaded(void)
{
if (m_State != csDownloadingWorld)