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:
@@ -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;
|
package com.threerings.whirled.spot.data;
|
||||||
|
|
||||||
@@ -16,14 +16,8 @@ public class Cluster extends SimpleStreamableObject
|
|||||||
* id of the cluster chat object). */
|
* id of the cluster chat object). */
|
||||||
public int clusterOid;
|
public int clusterOid;
|
||||||
|
|
||||||
/** The x-coordinate of the cluster in the scene. */
|
/** The bounds of the cluster in the scene. */
|
||||||
public int x;
|
public int x, y, width, height;
|
||||||
|
|
||||||
/** The y-coordinate of the cluster in the scene. */
|
|
||||||
public int y;
|
|
||||||
|
|
||||||
/** The number of occupants in this cluster. */
|
|
||||||
public int occupants;
|
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
public Comparable getKey ()
|
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;
|
package com.threerings.whirled.spot.server;
|
||||||
|
|
||||||
@@ -360,7 +360,6 @@ public class SpotSceneManager extends SceneManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
put(body.getOid(), body);
|
put(body.getOid(), body);
|
||||||
_cluster.occupants++;
|
|
||||||
try {
|
try {
|
||||||
body.startTransaction();
|
body.startTransaction();
|
||||||
_ssobj.startTransaction();
|
_ssobj.startTransaction();
|
||||||
@@ -403,7 +402,6 @@ public class SpotSceneManager extends SceneManager
|
|||||||
body.startTransaction();
|
body.startTransaction();
|
||||||
_ssobj.startTransaction();
|
_ssobj.startTransaction();
|
||||||
((ClusteredBodyObject)body).setClusterOid(-1);
|
((ClusteredBodyObject)body).setClusterOid(-1);
|
||||||
_cluster.occupants--;
|
|
||||||
bodyRemoved(this, body); // do the hokey pokey
|
bodyRemoved(this, body); // do the hokey pokey
|
||||||
|
|
||||||
if (_clobj != null) {
|
if (_clobj != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user