Clear out our body's location when we log off because with the new client
reference counting thing, we can't rely on a user's object being destroyed immediately after they log off. Better to ensure that their location will always be cleared so that location interested entities will be properly notified. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1991 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: CrowdClient.java,v 1.16 2002/11/05 05:48:18 mdb Exp $
|
||||
// $Id: CrowdClient.java,v 1.17 2002/11/26 02:46:01 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.server;
|
||||
|
||||
@@ -39,4 +39,17 @@ public class CrowdClient extends PresentsClient
|
||||
BodyProvider.updateOccupantStatus(
|
||||
bobj, bobj.location, OccupantInfo.ACTIVE);
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
protected void sessionDidEnd ()
|
||||
{
|
||||
// clear out our location so that anyone listening for such things
|
||||
// will know that we've left
|
||||
if (_clobj != null) {
|
||||
BodyObject bobj = (BodyObject)_clobj;
|
||||
bobj.setLocation(-1);
|
||||
}
|
||||
|
||||
super.sessionDidEnd();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user