From 590c9935995b372dfaad25f43655d32892b420a3 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 26 Mar 2003 02:37:08 +0000 Subject: [PATCH] Include the bounds in the cluster rather than a center and an occupant count. The client can figure out the occupants if it needs them. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2331 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/whirled/spot/data/Cluster.java | 12 +++--------- .../whirled/spot/server/SpotSceneManager.java | 4 +--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/java/com/threerings/whirled/spot/data/Cluster.java b/src/java/com/threerings/whirled/spot/data/Cluster.java index c912d3104..f30c90469 100644 --- a/src/java/com/threerings/whirled/spot/data/Cluster.java +++ b/src/java/com/threerings/whirled/spot/data/Cluster.java @@ -1,5 +1,5 @@ // -// $Id: Cluster.java,v 1.3 2003/03/25 03:16:11 mdb Exp $ +// $Id: Cluster.java,v 1.4 2003/03/26 02:37:08 mdb Exp $ package com.threerings.whirled.spot.data; @@ -16,14 +16,8 @@ public class Cluster extends SimpleStreamableObject * id of the cluster chat object). */ public int clusterOid; - /** The x-coordinate of the cluster in the scene. */ - public int x; - - /** The y-coordinate of the cluster in the scene. */ - public int y; - - /** The number of occupants in this cluster. */ - public int occupants; + /** The bounds of the cluster in the scene. */ + public int x, y, width, height; // documentation inherited public Comparable getKey () diff --git a/src/java/com/threerings/whirled/spot/server/SpotSceneManager.java b/src/java/com/threerings/whirled/spot/server/SpotSceneManager.java index 43cdbf944..39095a63e 100644 --- a/src/java/com/threerings/whirled/spot/server/SpotSceneManager.java +++ b/src/java/com/threerings/whirled/spot/server/SpotSceneManager.java @@ -1,5 +1,5 @@ // -// $Id: SpotSceneManager.java,v 1.30 2003/03/26 02:06:06 mdb Exp $ +// $Id: SpotSceneManager.java,v 1.31 2003/03/26 02:37:08 mdb Exp $ package com.threerings.whirled.spot.server; @@ -360,7 +360,6 @@ public class SpotSceneManager extends SceneManager } put(body.getOid(), body); - _cluster.occupants++; try { body.startTransaction(); _ssobj.startTransaction(); @@ -403,7 +402,6 @@ public class SpotSceneManager extends SceneManager body.startTransaction(); _ssobj.startTransaction(); ((ClusteredBodyObject)body).setClusterOid(-1); - _cluster.occupants--; bodyRemoved(this, body); // do the hokey pokey if (_clobj != null) {