Browse Source

wantsSmoothing

David Rose 23 năm trước cách đây
mục cha
commit
ad314b4dbd
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      direct/src/distributed/DistributedSmoothNode.py

+ 8 - 0
direct/src/distributed/DistributedSmoothNode.py

@@ -103,6 +103,11 @@ class DistributedSmoothNode(DistributedNode.DistributedNode):
         self.smoothPosition()
         return Task.cont
 
+    def wantsSmoothing(self):
+        # Override this function to return 0 if this particular kind
+        # of smooth node doesn't really want to be smoothed.
+        return 1
+
     def startSmooth(self):
         """startSmooth(self)
 
@@ -112,6 +117,9 @@ class DistributedSmoothNode(DistributedNode.DistributedNode):
         position it.
         
         """
+        if not self.wantsSmoothing():
+            return
+        
         if self.isLocal():
             # If we've just finished banging on localToon, reload the
             # drive interface's concept of our position.