Fixed code to detect invalid updates to not totally hose everything:
it was trying to print where() which failed because it was doing so before all the values were intialized. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3680 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -66,22 +66,22 @@ public class SceneManager extends PlaceManager
|
|||||||
protected void setSceneData (Scene scene, UpdateList updates,
|
protected void setSceneData (Scene scene, UpdateList updates,
|
||||||
SceneRegistry screg)
|
SceneRegistry screg)
|
||||||
{
|
{
|
||||||
|
_scene = scene;
|
||||||
|
_screg = screg;
|
||||||
|
_updates = updates;
|
||||||
|
|
||||||
// make sure the list and our version of the scene are in
|
// make sure the list and our version of the scene are in
|
||||||
// accordance
|
// accordance
|
||||||
if (!updates.validate(scene.getVersion())) {
|
if (!_updates.validate(scene.getVersion())) {
|
||||||
Log.warning("Provided with invalid updates; flushing " +
|
Log.warning("Provided with invalid updates; flushing " +
|
||||||
"[where=" + where() +
|
"[where=" + where() +
|
||||||
", sceneId=" + scene.getId() + "].");
|
", sceneId=" + scene.getId() + "].");
|
||||||
// clear out the update list as it will not allow us to bring
|
// clear out the update list as it will not allow us to bring
|
||||||
// clients up to date with our current scene version; instead
|
// clients up to date with our current scene version; instead
|
||||||
// they'll have to download the whole thing
|
// they'll have to download the whole thing
|
||||||
updates = new UpdateList();
|
_updates = new UpdateList();
|
||||||
}
|
}
|
||||||
|
|
||||||
_scene = scene;
|
|
||||||
_screg = screg;
|
|
||||||
_updates = updates;
|
|
||||||
|
|
||||||
// let derived classes react to the receipt of scene data
|
// let derived classes react to the receipt of scene data
|
||||||
gotSceneData();
|
gotSceneData();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user