summaryrefslogtreecommitdiffstats
path: root/source/packets/cPacket_SpawnMob.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-24 09:58:26 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-24 09:58:26 +0200
commite92b9e7ecbdf2918aab59d4eeb7bb5966430b264 (patch)
tree1a998d44e5faab91c54ea8517dd9fa02b3732ef7 /source/packets/cPacket_SpawnMob.cpp
parentAdded plugin name to deprecation messages (diff)
downloadcuberite-e92b9e7ecbdf2918aab59d4eeb7bb5966430b264.tar
cuberite-e92b9e7ecbdf2918aab59d4eeb7bb5966430b264.tar.gz
cuberite-e92b9e7ecbdf2918aab59d4eeb7bb5966430b264.tar.bz2
cuberite-e92b9e7ecbdf2918aab59d4eeb7bb5966430b264.tar.lz
cuberite-e92b9e7ecbdf2918aab59d4eeb7bb5966430b264.tar.xz
cuberite-e92b9e7ecbdf2918aab59d4eeb7bb5966430b264.tar.zst
cuberite-e92b9e7ecbdf2918aab59d4eeb7bb5966430b264.zip
Diffstat (limited to '')
-rw-r--r--source/packets/cPacket_SpawnMob.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/packets/cPacket_SpawnMob.cpp b/source/packets/cPacket_SpawnMob.cpp
index 47339c7e0..e00952561 100644
--- a/source/packets/cPacket_SpawnMob.cpp
+++ b/source/packets/cPacket_SpawnMob.cpp
@@ -11,7 +11,6 @@
cPacket_SpawnMob::~cPacket_SpawnMob()
{
if( m_MetaData ) delete [] m_MetaData;
- delete m_Pos;
}
@@ -21,7 +20,6 @@ cPacket_SpawnMob::~cPacket_SpawnMob()
cPacket_SpawnMob::cPacket_SpawnMob()
: m_UniqueID( 0 )
, m_Type( 0 )
- , m_Pos( new Vector3i() )
, m_Yaw( 0 )
, m_Pitch( 0 )
, m_MetaDataSize( 0 )
@@ -37,12 +35,10 @@ cPacket_SpawnMob::cPacket_SpawnMob()
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_Pos = a_Clone.m_Pos;
m_Yaw = a_Clone.m_Yaw;
m_Pitch = a_Clone.m_Pitch;
m_HeadYaw = a_Clone.m_HeadYaw;
@@ -61,9 +57,9 @@ 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);
+ 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);