Do some fiddly business to update our roundId locally in gameWillStart so that
all pre-game processing can properly know what round it is, but then actually publish that value to the clients so that we can trigger off ROUND_ID to call roundDidStart without having roundDidStart get called before gameDidStart. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@583 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -964,8 +964,9 @@ public class GameManager extends PlaceManager
|
|||||||
*/
|
*/
|
||||||
protected void gameWillStart ()
|
protected void gameWillStart ()
|
||||||
{
|
{
|
||||||
// increment the round identifier
|
// update our round id locally; see gameDidStart() for where we actually broadcast this
|
||||||
_gameobj.setRoundId(_gameobj.roundId + 1);
|
// change to the clients
|
||||||
|
_gameobj.roundId = _gameobj.roundId + 1;
|
||||||
|
|
||||||
// let our delegates do their business
|
// let our delegates do their business
|
||||||
applyToDelegates(new DelegateOp() {
|
applyToDelegates(new DelegateOp() {
|
||||||
@@ -1027,6 +1028,12 @@ public class GameManager extends PlaceManager
|
|||||||
_noShowInterval.cancel();
|
_noShowInterval.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// broadcast the increment of the round identifier (we set this value locally on the server
|
||||||
|
// in gameWillStart so that delegates and pre-game starters can know what the round is, but
|
||||||
|
// we don't want the client to hear the ROUND_ID update until after the STATE change has
|
||||||
|
// been dispatched)
|
||||||
|
_gameobj.setRoundId(_gameobj.roundId);
|
||||||
|
|
||||||
// let our delegates do their business
|
// let our delegates do their business
|
||||||
applyToDelegates(new DelegateOp() {
|
applyToDelegates(new DelegateOp() {
|
||||||
public void apply (PlaceManagerDelegate delegate) {
|
public void apply (PlaceManagerDelegate delegate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user