From 47a5ad9fb71347e2cb0ebc1bf6982e87bd2666bd Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 17 Apr 2002 22:02:08 +0000 Subject: [PATCH] We no longer need to set up our occupantInfo set with the type of object it holds and we can now create custom occupant info classes depending on the body that is entering the place. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1270 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/crowd/server/PlaceManager.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/java/com/threerings/crowd/server/PlaceManager.java b/src/java/com/threerings/crowd/server/PlaceManager.java index b6e8b0c1d..c8f8a84c2 100644 --- a/src/java/com/threerings/crowd/server/PlaceManager.java +++ b/src/java/com/threerings/crowd/server/PlaceManager.java @@ -1,5 +1,5 @@ // -// $Id: PlaceManager.java,v 1.28 2002/03/18 23:21:26 mdb Exp $ +// $Id: PlaceManager.java,v 1.29 2002/04/17 22:02:08 mdb Exp $ package com.threerings.crowd.server; @@ -135,9 +135,6 @@ public class PlaceManager // keep track of this _plobj = plobj; - // configure the occupant info set - plobj.occupantInfo.setEntryType(getOccupantInfoClass()); - // we'll need to hear about place object events plobj.addListener(this); @@ -188,13 +185,14 @@ public class PlaceManager } /** - * When the manager starts up, it configures its place object occupant - * info set by setting the type of occupant info objects it will - * contain. Managers that wish to use derived occupant info classes - * should override this function and return a reference to their - * derived class. + * Returns the appropriate derived class of {@link OccupantInfo} that + * will be used to provide occupant info for this body. An occupant + * info record is created when a body enters a place. + * + * @param body the body that is entering the place and for whom we are + * creating an occupant info record. */ - protected Class getOccupantInfoClass () + protected Class getOccupantInfoClass (BodyObject body) { return OccupantInfo.class; } @@ -211,7 +209,7 @@ public class PlaceManager // create a new occupant info instance try { OccupantInfo info = (OccupantInfo) - getOccupantInfoClass().newInstance(); + getOccupantInfoClass(body).newInstance(); populateOccupantInfo(info, body); return info;