summaryrefslogtreecommitdiffstats
path: root/source/packets/cPacket_SpawnMob.cpp
diff options
context:
space:
mode:
authorcedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-14 15:06:06 +0200
committercedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-14 15:06:06 +0200
commit92c59963f82f81aa3202657e7fdbb2592924ede3 (patch)
treeb7eb2474528a4998fa102e3ec9119b908cee08b4 /source/packets/cPacket_SpawnMob.cpp
parentAdded HOOK_WEATHER_CHANGE. (diff)
downloadcuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.gz
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.bz2
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.lz
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.xz
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.zst
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.zip
Diffstat (limited to '')
-rw-r--r--source/packets/cPacket_SpawnMob.cpp150
1 files changed, 75 insertions, 75 deletions
diff --git a/source/packets/cPacket_SpawnMob.cpp b/source/packets/cPacket_SpawnMob.cpp
index d3f1850b3..47339c7e0 100644
--- a/source/packets/cPacket_SpawnMob.cpp
+++ b/source/packets/cPacket_SpawnMob.cpp
@@ -1,75 +1,75 @@
-
-#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
-
-#include "cPacket_SpawnMob.h"
-#include "../Vector3i.h"
-
-
-
-
-
-cPacket_SpawnMob::~cPacket_SpawnMob()
-{
- if( m_MetaData ) delete [] m_MetaData;
- delete m_Pos;
-}
-
-
-
-
-
-cPacket_SpawnMob::cPacket_SpawnMob()
- : m_UniqueID( 0 )
- , m_Type( 0 )
- , m_Pos( new Vector3i() )
- , m_Yaw( 0 )
- , m_Pitch( 0 )
- , m_MetaDataSize( 0 )
- , m_MetaData( 0 )
- , m_HeadYaw(0)
-{
- m_PacketID = E_SPAWN_MOB;
-}
-
-
-
-
-
-cPacket_SpawnMob::cPacket_SpawnMob( const cPacket_SpawnMob & a_Clone )
-{
- m_Pos = new Vector3i();
-
- m_PacketID = E_SPAWN_MOB;
- m_UniqueID = a_Clone.m_UniqueID;
- m_Type = a_Clone.m_Type;
- *m_Pos = *a_Clone.m_Pos;
- m_Yaw = a_Clone.m_Yaw;
- m_Pitch = a_Clone.m_Pitch;
- m_HeadYaw = a_Clone.m_HeadYaw;
-
- m_MetaDataSize = a_Clone.m_MetaDataSize;
- m_MetaData = new char[m_MetaDataSize];
- memcpy( m_MetaData, a_Clone.m_MetaData, sizeof( char ) * m_MetaDataSize );
-}
-
-
-
-
-
-void cPacket_SpawnMob::Serialize(AString & a_Data) const
-{
- AppendByte (a_Data, m_PacketID);
- AppendInteger (a_Data, m_UniqueID);
- AppendByte (a_Data, m_Type);
- AppendInteger (a_Data, m_Pos->x);
- AppendInteger (a_Data, m_Pos->y);
- AppendInteger (a_Data, m_Pos->z);
- AppendByte (a_Data, m_Yaw);
- AppendByte (a_Data, m_Pitch);
- AppendByte (a_Data, m_HeadYaw);
- AppendData (a_Data, m_MetaData, m_MetaDataSize);
-}
-
-
-
-
+
+#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
+
+#include "cPacket_SpawnMob.h"
+#include "../Vector3i.h"
+
+
+
+
+
+cPacket_SpawnMob::~cPacket_SpawnMob()
+{
+ if( m_MetaData ) delete [] m_MetaData;
+ delete m_Pos;
+}
+
+
+
+
+
+cPacket_SpawnMob::cPacket_SpawnMob()
+ : m_UniqueID( 0 )
+ , m_Type( 0 )
+ , m_Pos( new Vector3i() )
+ , m_Yaw( 0 )
+ , m_Pitch( 0 )
+ , m_MetaDataSize( 0 )
+ , m_MetaData( 0 )
+ , m_HeadYaw(0)
+{
+ m_PacketID = E_SPAWN_MOB;
+}
+
+
+
+
+
+cPacket_SpawnMob::cPacket_SpawnMob( const cPacket_SpawnMob & a_Clone )
+{
+ m_Pos = new Vector3i();
+
+ m_PacketID = E_SPAWN_MOB;
+ m_UniqueID = a_Clone.m_UniqueID;
+ m_Type = a_Clone.m_Type;
+ *m_Pos = *a_Clone.m_Pos;
+ m_Yaw = a_Clone.m_Yaw;
+ m_Pitch = a_Clone.m_Pitch;
+ m_HeadYaw = a_Clone.m_HeadYaw;
+
+ m_MetaDataSize = a_Clone.m_MetaDataSize;
+ m_MetaData = new char[m_MetaDataSize];
+ memcpy( m_MetaData, a_Clone.m_MetaData, sizeof( char ) * m_MetaDataSize );
+}
+
+
+
+
+
+void cPacket_SpawnMob::Serialize(AString & a_Data) const
+{
+ AppendByte (a_Data, m_PacketID);
+ AppendInteger (a_Data, m_UniqueID);
+ AppendByte (a_Data, m_Type);
+ AppendInteger (a_Data, m_Pos->x);
+ AppendInteger (a_Data, m_Pos->y);
+ AppendInteger (a_Data, m_Pos->z);
+ AppendByte (a_Data, m_Yaw);
+ AppendByte (a_Data, m_Pitch);
+ AppendByte (a_Data, m_HeadYaw);
+ AppendData (a_Data, m_MetaData, m_MetaDataSize);
+}
+
+
+
+