Browse Source

*** empty log message ***

Jesse Schell 25 years ago
parent
commit
41656709f5
1 changed files with 12 additions and 0 deletions
  1. 12 0
      direct/src/distributed/DistributedObject.py

+ 12 - 0
direct/src/distributed/DistributedObject.py

@@ -10,8 +10,20 @@ class DistributedObject(PandaObject):
         except:
             self.DistributedObject_initialized = 1
             self.cr = cr
+            # A few objects will set neverDisable to 1... Examples are localToon, and anything
+            # that lives in the UberZone. This keeps them from being disabled when you change
+            # zones, even to the quiet zone.
+            self.setNeverDisable(0)
         return None
 
+    def setNeverDisable(self, bool):
+        assert((bool == 1) or (bool == 0))
+        self.neverDisable = bool
+        return None
+
+    def getNeverDisable(self):
+        return self.neverDisable
+
     def disable(self):
         """disable(self)
         Inheritors should redefine this to take appropriate action on disable