From e92b9e7ecbdf2918aab59d4eeb7bb5966430b264 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 24 Aug 2012 07:58:26 +0000 Subject: Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets. git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cMonster.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'source/cMonster.cpp') diff --git a/source/cMonster.cpp b/source/cMonster.cpp index a7c05977e..24d790dc3 100644 --- a/source/cMonster.cpp +++ b/source/cMonster.cpp @@ -11,8 +11,6 @@ #include "cMonsterConfig.h" #include "MersenneTwister.h" -#include "packets/cPacket_SpawnMob.h" - #include "Vector3f.h" #include "Vector3i.h" #include "Vector3d.h" @@ -78,18 +76,9 @@ bool cMonster::IsA( const char* a_EntityType ) -cPacket * cMonster::GetSpawnPacket(void) const +void cMonster::SpawnOn(cClientHandle & a_Client) { - cPacket_SpawnMob * Spawn = new cPacket_SpawnMob; - Spawn->m_UniqueID = GetUniqueID(); - Spawn->m_Type = m_MobType; - *Spawn->m_Pos = ((Vector3i)(m_Pos)) * 32; - Spawn->m_Yaw = 0; - Spawn->m_Pitch = 0; - Spawn->m_MetaDataSize = 1; - Spawn->m_MetaData = new char[Spawn->m_MetaDataSize]; - Spawn->m_MetaData[0] = 0x7f; // not on fire/crouching/riding - return Spawn; + a_Client.SendSpawnMob(*this); } -- cgit v1.2.3