That worked great for those of us with some version of the scene
already cached, but what about those poor new folks? git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@917 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -208,6 +208,15 @@ public class SceneDirector extends BasicDirector
|
|||||||
return _pendingModel;
|
return _pendingModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the scene id set in preparation for a scene transition. As with
|
||||||
|
* {@link #getPendingModel}, this is for cooperating directors.
|
||||||
|
*/
|
||||||
|
public int getPendingSceneId ()
|
||||||
|
{
|
||||||
|
return _pendingSceneId;
|
||||||
|
}
|
||||||
|
|
||||||
// from interface SceneService.SceneMoveListener
|
// from interface SceneService.SceneMoveListener
|
||||||
public void moveSucceeded (int placeId, PlaceConfig config)
|
public void moveSucceeded (int placeId, PlaceConfig config)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -143,17 +143,16 @@ public class ZoneDirector extends BasicDirector
|
|||||||
// check the version of our cached copy of the scene to which we're requesting to move; if
|
// check the version of our cached copy of the scene to which we're requesting to move; if
|
||||||
// we were unable to load it, assume a cached version of zero
|
// we were unable to load it, assume a cached version of zero
|
||||||
int sceneVers = 0;
|
int sceneVers = 0;
|
||||||
int sceneId = -1;
|
int sceneId = _scdir.getPendingSceneId();
|
||||||
SceneModel pendingModel = _scdir.getPendingModel();
|
SceneModel pendingModel = _scdir.getPendingModel();
|
||||||
if (pendingModel != null) {
|
if (pendingModel != null) {
|
||||||
sceneVers = pendingModel.version;
|
sceneVers = pendingModel.version;
|
||||||
sceneId = pendingModel.sceneId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// issue a moveTo request
|
// issue a moveTo request
|
||||||
log.info("Issuing zoned moveTo(" + ZoneUtil.toString(_pendingZoneId) +
|
log.info("Issuing zoned moveTo(" + ZoneUtil.toString(_pendingZoneId) +
|
||||||
", " + sceneId + ", " + sceneVers + ").");
|
", " + sceneId + ", " + sceneVers + ").");
|
||||||
_zservice.moveTo(_ctx.getClient(), _pendingZoneId, + sceneId, sceneVers, this);
|
_zservice.moveTo(_ctx.getClient(), _pendingZoneId, sceneId, sceneVers, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user