Browse Source

immobilize the avatar

Asad M. Zaman 19 years ago
parent
commit
cf7a21d264
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/distributed/DistributedCartesianGrid.py

+ 3 - 0
direct/src/distributed/DistributedCartesianGrid.py

@@ -118,6 +118,9 @@ class DistributedCartesianGrid(DistributedNode, CartesianGridBase):
             self.cr.doId2do[self.parentId].worldGrid.stopProcessVisibility(event=parentEvent)
             self.cr.doId2do[self.parentId].worldGrid.stopProcessVisibility(event=parentEvent)
 
 
     def processVisibility(self, task):
     def processVisibility(self, task):
+        if self.visAvatar.immobilized:
+            return Task.cont
+        
         pos = self.visAvatar.getPos(self)
         pos = self.visAvatar.getPos(self)
         # Check to make sure our x and y are positive
         # Check to make sure our x and y are positive
         dx = self.cellWidth * self.gridSize * .5
         dx = self.cellWidth * self.gridSize * .5