From d1496169b80a91e04a974074e5b8523b661fc70b Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 16 Sep 2002 22:36:56 +0000 Subject: [PATCH] reorder messages --- direct/src/distributed/DistributedObject.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/direct/src/distributed/DistributedObject.py b/direct/src/distributed/DistributedObject.py index f795d59bf8..f4182f42b9 100644 --- a/direct/src/distributed/DistributedObject.py +++ b/direct/src/distributed/DistributedObject.py @@ -109,8 +109,14 @@ class DistributedObject(PandaObject): """disableAndAnnounce(self) Inheritors should *not* redefine this function. """ - self.disable() + # We must send the disable announce message *before* we + # actually disable the object. That way, the various cleanup + # tasks can run first and take care of restoring the object to + # a normal, nondisabled state; and *then* the disable function + # can properly disable it (for instance, by parenting it to + # hidden). messenger.send(self.uniqueName("disable")) + self.disable() return None def announceGenerate(self):