Added code to track a username to body object mapping for all users with

active sessions (even if they are currently disconnected).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@178 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-08-04 01:55:41 +00:00
parent 7688865b96
commit d2d9de37c1
2 changed files with 50 additions and 2 deletions
@@ -1,5 +1,5 @@
//
// $Id: CrowdClient.java,v 1.1 2001/08/03 02:28:20 mdb Exp $
// $Id: CrowdClient.java,v 1.2 2001/08/04 01:55:41 mdb Exp $
package com.threerings.cocktail.party.server;
@@ -14,15 +14,31 @@ public class PartyClient extends CherClient
{
protected void sessionWillStart ()
{
super.sessionWillStart();
// cast our client object to a body object
_bodobj = (BodyObject)_clobj;
// and configure our username
_bodobj.setUsername(_username);
// register our body object mapping
PartyServer.mapBody(_username, _bodobj);
}
protected void sessionWillResume ()
{
super.sessionWillResume();
// nothing to do here presently
}
protected void sessionDidTerminate ()
{
super.sessionDidTerminate();
// unregister our body object mapping
PartyServer.unmapBody(_username);
}
protected BodyObject _bodobj;