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
This commit is contained in:
Michael Bayne
2003-03-26 02:37:08 +00:00
parent 5d6883c75c
commit 590c993599
2 changed files with 4 additions and 12 deletions
@@ -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 ()
@@ -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) {