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:
Ray Greenwell
2006-08-11 21:25:33 +00:00
parent 9be1f1db14
commit fc57d9bb8f
@@ -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.
*/