From afaf104b4086dbc5245f92a209cb68a088780ebb Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 21 Dec 2012 12:52:14 +0000 Subject: Added more constants into eEntityType; made them a compulsory parameter to the constructor, so that all entities have proper type. Also added a few utility functions to cEntity for distinguishing the types (IsPlayer(), IsPickup() etc.) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1092 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/Player.cpp') diff --git a/source/Player.cpp b/source/Player.cpp index c5779ef5a..a5d915572 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -33,7 +33,8 @@ cPlayer::cPlayer(cClientHandle* a_Client, const AString & a_PlayerName) - : m_GameMode(eGameMode_NotSet) + : super(etPlayer) + , m_GameMode(eGameMode_NotSet) , m_IP("") , m_LastBlockActionTime( 0 ) , m_LastBlockActionCnt( 0 ) @@ -54,7 +55,6 @@ cPlayer::cPlayer(cClientHandle* a_Client, const AString & a_PlayerName) a_PlayerName.c_str(), a_Client->GetIPString().c_str(), this, GetUniqueID() ); - m_EntityType = eEntityType_Player; m_InventoryWindow = new cInventoryWindow(*this); m_CurrentWindow = m_InventoryWindow; -- cgit v1.2.3