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:
Ray Greenwell
2005-08-11 22:33:22 +00:00
parent b95a8056d1
commit 6e07b60f48
@@ -66,22 +66,22 @@ public class SceneManager extends PlaceManager
protected void setSceneData (Scene scene, UpdateList updates,
SceneRegistry screg)
{
_scene = scene;
_screg = screg;
_updates = updates;
// make sure the list and our version of the scene are in
// accordance
if (!updates.validate(scene.getVersion())) {
if (!_updates.validate(scene.getVersion())) {
Log.warning("Provided with invalid updates; flushing " +
"[where=" + where() +
", sceneId=" + scene.getId() + "].");
// clear out the update list as it will not allow us to bring
// clients up to date with our current scene version; instead
// 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
gotSceneData();
}