Improved comments for cWorld::DoWithPlayer().
This commit is contained in:
parent
d8e6931fe6
commit
a73c800377
|
@ -2678,7 +2678,7 @@ bool cWorld::ForEachPlayer(cPlayerListCallback & a_Callback)
|
||||||
|
|
||||||
bool cWorld::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback)
|
bool cWorld::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback)
|
||||||
{
|
{
|
||||||
// Calls the callback for each player in the list
|
// Calls the callback for the specified player in the list
|
||||||
cCSLock Lock(m_CSPlayers);
|
cCSLock Lock(m_CSPlayers);
|
||||||
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -315,7 +315,8 @@ public:
|
||||||
/** Calls the callback for each player in the list; returns true if all players processed, false if the callback aborted by returning true */
|
/** Calls the callback for each player in the list; returns true if all players processed, false if the callback aborted by returning true */
|
||||||
virtual bool ForEachPlayer(cPlayerListCallback & a_Callback) override; // >> EXPORTED IN MANUALBINDINGS <<
|
virtual bool ForEachPlayer(cPlayerListCallback & a_Callback) override; // >> 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 */
|
/** 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 value is ignored. If there are multiple players of the same name, only (random) one is processed by the callback. */
|
||||||
bool DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS <<
|
bool DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS <<
|
||||||
|
|
||||||
/** Finds a player from a partial or complete player name and calls the callback - case-insensitive */
|
/** Finds a player from a partial or complete player name and calls the callback - case-insensitive */
|
||||||
|
|
Loading…
Reference in New Issue