Have to check that the user exists in sessionConnectionClosed() before
setting their status to disconnected; don't have to check that the user exists in sessionDidEnd(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2028 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: CrowdClient.java,v 1.20 2002/12/04 02:47:03 mdb Exp $
|
// $Id: CrowdClient.java,v 1.21 2002/12/05 16:39:21 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.crowd.server;
|
package com.threerings.crowd.server;
|
||||||
|
|
||||||
@@ -19,14 +19,16 @@ import com.threerings.crowd.server.CrowdServer;
|
|||||||
public class CrowdClient extends PresentsClient
|
public class CrowdClient extends PresentsClient
|
||||||
{
|
{
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
protected void sessionConnectionClosed (ClientObject clobj)
|
protected void sessionConnectionClosed ()
|
||||||
{
|
{
|
||||||
super.sessionConnectionClosed(clobj);
|
super.sessionConnectionClosed();
|
||||||
|
|
||||||
// note that the user's disconnected
|
if (_clobj != null) {
|
||||||
BodyObject bobj = (BodyObject)clobj;
|
// note that the user is disconnected
|
||||||
BodyProvider.updateOccupantStatus(
|
BodyObject bobj = (BodyObject)_clobj;
|
||||||
bobj, bobj.location, OccupantInfo.DISCONNECTED);
|
BodyProvider.updateOccupantStatus(
|
||||||
|
bobj, bobj.location, OccupantInfo.DISCONNECTED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
@@ -43,13 +45,11 @@ public class CrowdClient extends PresentsClient
|
|||||||
// documentation inherited
|
// documentation inherited
|
||||||
protected void sessionDidEnd ()
|
protected void sessionDidEnd ()
|
||||||
{
|
{
|
||||||
|
super.sessionDidEnd();
|
||||||
|
|
||||||
// clear out our location so that anyone listening for such things
|
// clear out our location so that anyone listening for such things
|
||||||
// will know that we've left
|
// will know that we've left
|
||||||
if (_clobj != null) {
|
clearLocation((BodyObject)_clobj);
|
||||||
clearLocation((BodyObject)_clobj);
|
|
||||||
}
|
|
||||||
|
|
||||||
super.sessionDidEnd();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user