From f8a5a149b72facf0047b47133471604eaf1609cb Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 26 Nov 2002 02:46:01 +0000 Subject: [PATCH] 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 --- .../com/threerings/crowd/server/CrowdClient.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/crowd/server/CrowdClient.java b/src/java/com/threerings/crowd/server/CrowdClient.java index af5983ba3..d425f0089 100644 --- a/src/java/com/threerings/crowd/server/CrowdClient.java +++ b/src/java/com/threerings/crowd/server/CrowdClient.java @@ -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(); + } }