From 8dd6ac2b329f3174f33d59c075d1bae5b11dc027 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 5 Feb 2002 22:11:51 +0000 Subject: [PATCH] Need to be provided with an omgr rather than referencing it via the SimulatorServer. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@937 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../micasa/simulator/server/Simulant.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/micasa/simulator/server/Simulant.java b/src/java/com/threerings/micasa/simulator/server/Simulant.java index fd8aecd3b..0db4e7d5a 100644 --- a/src/java/com/threerings/micasa/simulator/server/Simulant.java +++ b/src/java/com/threerings/micasa/simulator/server/Simulant.java @@ -1,8 +1,9 @@ // -// $Id: Simulant.java,v 1.2 2001/12/19 23:30:47 shaper Exp $ +// $Id: Simulant.java,v 1.3 2002/02/05 22:11:51 mdb Exp $ package com.threerings.micasa.simulator.client; +import com.threerings.presents.dobj.DObjectManager; import com.threerings.presents.dobj.MessageEvent; import com.threerings.crowd.data.BodyObject; @@ -11,18 +12,17 @@ import com.threerings.crowd.data.PlaceObject; import com.threerings.parlor.game.GameCodes; import com.threerings.parlor.game.GameConfig; -import com.threerings.micasa.simulator.server.SimulatorServer; - public abstract class Simulant implements GameCodes { /** * Initializes the simulant with a body object and the game config for * the game they'll be engaged in. */ - public void init (BodyObject self, GameConfig config) + public void init (BodyObject self, GameConfig config, DObjectManager omgr) { _self = self; _config = config; + _omgr = omgr; } /** @@ -53,7 +53,7 @@ public abstract class Simulant implements GameCodes protected void postEvent (MessageEvent mevt) { mevt.setSourceOid(_self.getOid()); - SimulatorServer.omgr.postEvent(mevt); + _omgr.postEvent(mevt); } /** The game config object. */ @@ -61,4 +61,7 @@ public abstract class Simulant implements GameCodes /** Our body object. */ protected BodyObject _self; + + /** The object manager with which we're interacting. */ + protected DObjectManager _omgr; }