- Start party games immediately.
- Validate users differently for party games. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@174 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -32,6 +32,7 @@ import com.threerings.crowd.data.PlaceObject;
|
||||
|
||||
import com.threerings.crowd.server.CrowdServer;
|
||||
|
||||
import com.threerings.parlor.game.data.PartyGameConfig;
|
||||
import com.threerings.parlor.game.server.GameManager;
|
||||
|
||||
import com.threerings.parlor.turn.server.TurnGameManager;
|
||||
@@ -382,8 +383,15 @@ public class EZGameManager extends GameManager
|
||||
protected void validateUser (ClientObject caller)
|
||||
throws InvocationException
|
||||
{
|
||||
if (getPresentPlayerIndex(caller.getOid()) == -1) {
|
||||
throw new InvocationException(InvocationCodes.ACCESS_DENIED);
|
||||
switch (getPartyGameType()) {
|
||||
case PartyGameConfig.FREE_FOR_ALL_PARTY_GAME:
|
||||
return; // always validate.
|
||||
|
||||
default:
|
||||
if (getPresentPlayerIndex(caller.getOid()) == -1) {
|
||||
throw new InvocationException(InvocationCodes.ACCESS_DENIED);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,6 +427,10 @@ public class EZGameManager extends GameManager
|
||||
_gameObj.setEzGameService(
|
||||
(EZGameMarshaller) CrowdServer.invmgr.registerDispatcher(
|
||||
new EZGameDispatcher(this), false));
|
||||
|
||||
if (isPartyGame()) {
|
||||
startGame();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user