From c8a66a4414baac0d1b9ece06a88e52f1c7e398db Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 11 Nov 2004 02:10:56 +0000 Subject: [PATCH] Don't assume we'll have a ClusteredBodyObject when we first log on. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3207 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../whirled/spot/client/SpotSceneDirector.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java b/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java index d406f8418..8d3e100ec 100644 --- a/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java +++ b/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java @@ -1,5 +1,5 @@ // -// $Id: SpotSceneDirector.java,v 1.36 2004/08/27 02:20:44 mdb Exp $ +// $Id: SpotSceneDirector.java,v 1.37 2004/11/11 02:10:56 mdb Exp $ // // Narya library - tools for developing networked games // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved @@ -334,12 +334,14 @@ public class SpotSceneDirector extends BasicDirector { super.clientDidLogon(client); - // listen to the client object - client.getClientObject().addListener(this); - _self = (ClusteredBodyObject)client.getClientObject(); + if (client instanceof ClusteredBodyObject) { + // listen to the client object + client.getClientObject().addListener(this); + _self = (ClusteredBodyObject)client.getClientObject(); - // we may need to subscribe to a cluster due to session resumption - maybeUpdateCluster(); + // we may need to subscribe to a cluster due to session resumption + maybeUpdateCluster(); + } } // documentation inherited