From 14584f69e69ced03446dac6d30d033f63b4dc5a6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 2 Jul 2012 11:21:21 +0000 Subject: Added the cWorld::DoWithPlayer() function and exported it in the Lua API. Removed the obsolete cWorld::GetPlayer() function. git-svn-id: http://mc-server.googlecode.com/svn/trunk@639 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorld.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/cWorld.h') diff --git a/source/cWorld.h b/source/cWorld.h index b356bdf0a..f885bfd35 100644 --- a/source/cWorld.h +++ b/source/cWorld.h @@ -133,12 +133,12 @@ public: /// Calls the callback for each player in the list; returns true if all players processed, false if the callback aborted by returning true bool ForEachPlayer(cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << + + /// Calls the callback for the player of the given name; returns true if the player was found and the callback called, false if player not found. Callback return ignored + bool DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << unsigned int GetNumPlayers(); //tolua_export - // TODO: This interface is dangerous - rewrite to DoWithPlayer(playername, action) - cPlayer * GetPlayer( const char * a_PlayerName ); //tolua_export - // TODO: This interface is dangerous - rewrite to DoWithClosestPlayer(pos, sight, action) cPlayer * FindClosestPlayer(const Vector3f & a_Pos, float a_SightLimit); -- cgit v1.2.3