//
// $Id: SimpleServer.java,v 1.2 2002/02/05 22:57:10 mdb Exp $

package com.threerings.micasa.simulator.server;

import com.threerings.crowd.data.BodyObject;
import com.threerings.crowd.server.CrowdServer;

/**
 * A simple simulator server implementation that extends the crowd server
 * and provides no special functionality.
 */
public class SimpleServer extends CrowdServer
    implements SimulatorServer
{
    // documentation inherited
    public void init ()
        throws Exception
    {
        super.init();

        // create the simulator manager
        SimulatorManager simmgr = new SimulatorManager();
        simmgr.init(config, invmgr, plreg, clmgr, omgr, this);
    }

    // documentation inherited
    public void fakeBodyMapping (String username, BodyObject bodobj)
    {
        _bodymap.put(username, bodobj);
    }
}

//
// $Id: SimpleServer.java,v 1.1 2002/02/05 22:12:42 mdb Exp $

package com.threerings.micasa.simulator.server;

import com.threerings.crowd.data.BodyObject;
import com.threerings.crowd.server.CrowdServer;

/**
 * A simple simulator server implementation that extends the crowd server
 * and provides no special functionality.
 */
public class SimpleServer extends CrowdServer
    implements SimulatorServer
{
    /**
     * Called by the simulator manager to map a username to a particular
     * body object. This should only be called from the dobjmgr thread.
     *
     * <p> This is copied from {@link CrowdServer#mapBody} as that
     * implementation is protected and cannot be referenced by classes in
     * the simulator package, but we know what we're doing and so we
     * knowingly expose this functionality to other classes in our
     * package.
     */
    public void fakeBodyMapping (String username, BodyObject bodobj)
    {
        _bodymap.put(username, bodobj);
    }
}

--- 
+++ 
@@ -1,5 +1,5 @@
 //
-// $Id: SimpleServer.java,v 1.1 2002/02/05 22:12:42 mdb Exp $
+// $Id: SimpleServer.java,v 1.2 2002/02/05 22:57:10 mdb Exp $
 
 package com.threerings.micasa.simulator.server;
 
@@ -13,16 +13,18 @@
 public class SimpleServer extends CrowdServer
     implements SimulatorServer
 {
-    /**
-     * Called by the simulator manager to map a username to a particular
-     * body object. This should only be called from the dobjmgr thread.
-     *
-     * <p> This is copied from {@link CrowdServer#mapBody} as that
-     * implementation is protected and cannot be referenced by classes in
-     * the simulator package, but we know what we're doing and so we
-     * knowingly expose this functionality to other classes in our
-     * package.
-     */
+    // documentation inherited
+    public void init ()
+        throws Exception
+    {
+        super.init();
+
+        // create the simulator manager
+        SimulatorManager simmgr = new SimulatorManager();
+        simmgr.init(config, invmgr, plreg, clmgr, omgr, this);
+    }
+
+    // documentation inherited
     public void fakeBodyMapping (String username, BodyObject bodobj)
     {
         _bodymap.put(username, bodobj);
Set up our SimulatorManager on init().


git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@940 542714f4-19e9-0310-aa3c-eee0fc999fb1
