getPresentPlayer() fails after the game is ended because _playerOids is cleared

out. Use the caller's name instead.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@337 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-06-28 06:37:17 +00:00
parent b7f32ddd96
commit 33fbff4aba
@@ -446,12 +446,14 @@ public class EZGameManager extends GameManager
protected void validateUser (ClientObject caller) protected void validateUser (ClientObject caller)
throws InvocationException throws InvocationException
{ {
BodyObject body = (BodyObject)caller;
switch (getMatchType()) { switch (getMatchType()) {
case GameConfig.PARTY: case GameConfig.PARTY:
return; // always validate. return; // always validate.
default: default:
if (getPresentPlayerIndex(caller.getOid()) == -1) { if (getPlayerIndex(body.getVisibleName()) == -1) {
throw new InvocationException(InvocationCodes.ACCESS_DENIED); throw new InvocationException(InvocationCodes.ACCESS_DENIED);
} }
return; return;