Make the spot services work if you don't implement ClusteredBodyObject. You
won't be able to use clusters but you'll still be able to use locations and portals. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@501 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -123,7 +123,8 @@ public class SpotSceneDirector extends BasicDirector
|
|||||||
|
|
||||||
// sanity check the server's notion of what scene we're in with our notion of it
|
// sanity check the server's notion of what scene we're in with our notion of it
|
||||||
var sceneId :int = _scdir.getScene().getId();
|
var sceneId :int = _scdir.getScene().getId();
|
||||||
var clSceneId :int = ScenePlace.getSceneId(_self as BodyObject);
|
var clSceneId :int = ScenePlace.getSceneId(
|
||||||
|
_wctx.getClient().getClientObject() as BodyObject);
|
||||||
if (sceneId != clSceneId) {
|
if (sceneId != clSceneId) {
|
||||||
log.warning("Client and server differ in opinion of what scene we're in " +
|
log.warning("Client and server differ in opinion of what scene we're in " +
|
||||||
"[sSceneId=" + clSceneId + ", cSceneId=" + sceneId + "].");
|
"[sSceneId=" + clSceneId + ", cSceneId=" + sceneId + "].");
|
||||||
@@ -385,7 +386,8 @@ public class SpotSceneDirector extends BasicDirector
|
|||||||
var scloc :SceneLocation = null;
|
var scloc :SceneLocation = null;
|
||||||
var ssobj :SpotSceneObject = (plobj as SpotSceneObject);
|
var ssobj :SpotSceneObject = (plobj as SpotSceneObject);
|
||||||
if (ssobj != null) {
|
if (ssobj != null) {
|
||||||
scloc = ssobj.occupantLocs.get((_self as BodyObject).getOid()) as SceneLocation;
|
scloc = ssobj.occupantLocs.get(
|
||||||
|
_wctx.getClient().getClientObject().getOid()) as SceneLocation;
|
||||||
}
|
}
|
||||||
_location = (scloc == null) ? null : scloc.loc;
|
_location = (scloc == null) ? null : scloc.loc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -378,8 +378,12 @@ public class SpotSceneManager extends SceneManager
|
|||||||
*/
|
*/
|
||||||
protected ClusterRecord getCluster (int bodyOid)
|
protected ClusterRecord getCluster (int bodyOid)
|
||||||
{
|
{
|
||||||
ClusteredBodyObject bobj = (ClusteredBodyObject)CrowdServer.omgr.getObject(bodyOid);
|
BodyObject bobj = (BodyObject)CrowdServer.omgr.getObject(bodyOid);
|
||||||
return (bobj == null) ? null : _clusters.get(bobj.getClusterOid());
|
if (bobj instanceof ClusteredBodyObject) {
|
||||||
|
return _clusters.get(((ClusteredBodyObject)bobj).getClusterOid());
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user