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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user