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:
Andrzej Kapolka
2010-05-28 01:19:42 +00:00
parent fb3c4d73fb
commit e320f8fca2
2 changed files with 11 additions and 3 deletions
@@ -208,6 +208,15 @@ public class SceneDirector extends BasicDirector
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
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
// we were unable to load it, assume a cached version of zero
int sceneVers = 0;
int sceneId = -1;
int sceneId = _scdir.getPendingSceneId();
SceneModel pendingModel = _scdir.getPendingModel();
if (pendingModel != null) {
sceneVers = pendingModel.version;
sceneId = pendingModel.sceneId;
}
// issue a moveTo request
log.info("Issuing zoned moveTo(" + ZoneUtil.toString(_pendingZoneId) +
", " + sceneId + ", " + sceneVers + ").");
_zservice.moveTo(_ctx.getClient(), _pendingZoneId, + sceneId, sceneVers, this);
_zservice.moveTo(_ctx.getClient(), _pendingZoneId, sceneId, sceneVers, this);
}
@Override