From 787382caf8d3f7f8df4598b29586b44b7b071c53 Mon Sep 17 00:00:00 2001 From: faketruth Date: Wed, 7 Mar 2012 13:36:30 +0000 Subject: Fixed bug where cPlayer's cClientHandle was used after cPlayer was destroyed http://forum.mc-server.org/showthread.php?tid=380 Also removed the SetClientHandle() function from cPlayer Added a Destroyed() function to cEntity that is called ONLY ONCE after an entity has been 'destroyed' Cleaned up some code, using enums for GameMode and Weather and replaced some 'const char *' with 'const AString &' Exposed some more functions to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@382 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cRoot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/cRoot.cpp') diff --git a/source/cRoot.cpp b/source/cRoot.cpp index 4178a4569..165c908ae 100644 --- a/source/cRoot.cpp +++ b/source/cRoot.cpp @@ -26,7 +26,7 @@ cRoot* cRoot::s_Root = 0; -typedef std::map< std::string, cWorld* > WorldMap; +typedef std::map< AString, cWorld* > WorldMap; struct cRoot::sRootState { cWorld* pDefaultWorld; @@ -291,7 +291,7 @@ cWorld* cRoot::GetDefaultWorld() -cWorld* cRoot::GetWorld( const char* a_WorldName ) +cWorld* cRoot::GetWorld( const AString & a_WorldName ) { WorldMap::iterator itr = m_pState->WorldsByName.find( a_WorldName ); if( itr != m_pState->WorldsByName.end() ) -- cgit v1.2.3