Added a method to get player index by Oid.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@38 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -374,6 +374,16 @@ public class GameManager extends PlaceManager
|
||||
return (_gameobj == null) ? -1 : _gameobj.getPlayerIndex(username);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the specified oid that of a player in this game?
|
||||
*/
|
||||
public int getPlayerIndex (int bodyOid)
|
||||
{
|
||||
return (_playerOids == null)
|
||||
? -1
|
||||
: IntListUtil.indexOf(_playerOids, bodyOid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the user object oid of the player with the specified index.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user