mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
*** empty log message ***
This commit is contained in:
parent
fcb83a251e
commit
2f5ab9378f
@ -108,7 +108,7 @@ class ClusterClient(DirectObject.DirectObject):
|
|||||||
|
|
||||||
def startControlObjectTask(self):
|
def startControlObjectTask(self):
|
||||||
self.notify.debug("moving control objects")
|
self.notify.debug("moving control objects")
|
||||||
taskMgr.add(self.controlObjectTask,"controlObjectTask")
|
taskMgr.add(self.controlObjectTask,"controlObjectTask",50)
|
||||||
|
|
||||||
def startSynchronizeTimeTask(self):
|
def startSynchronizeTimeTask(self):
|
||||||
self.notify.debug('broadcasting frame time')
|
self.notify.debug('broadcasting frame time')
|
||||||
@ -203,16 +203,36 @@ class ClusterClient(DirectObject.DirectObject):
|
|||||||
self.controlMappings[objectName] = [controlledName,serverList]
|
self.controlMappings[objectName] = [controlledName,serverList]
|
||||||
self.controlOffsets[objectName] = offset
|
self.controlOffsets[objectName] = offset
|
||||||
else:
|
else:
|
||||||
self.notify.debug('attempt to add duplicate controlled object: '+name)
|
oldList = self.controlMappings[objectName]
|
||||||
|
mergedList = []
|
||||||
|
for item in oldList:
|
||||||
|
mergedList.append(item)
|
||||||
|
for item in serverList:
|
||||||
|
if (item is not in mergedList):
|
||||||
|
mergedList.append(item)
|
||||||
|
|
||||||
|
#self.notify.debug('attempt to add duplicate controlled object: '+name)
|
||||||
|
|
||||||
def setControlMappingOffset(self,objectName,offset):
|
def setControlMappingOffset(self,objectName,offset):
|
||||||
if (self.controlMappings.has_key(objectName)):
|
if (self.controlMappings.has_key(objectName)):
|
||||||
self.controlOffsets[objectName] = offset
|
self.controlOffsets[objectName] = offset
|
||||||
|
|
||||||
def removeControlMapping(self,name):
|
def removeControlMapping(self,name, serverList = None):
|
||||||
if (self.controlMappings.has_key(name)):
|
if (self.controlMappings.has_key(name)):
|
||||||
self.controlMappings.pop(name)
|
|
||||||
|
|
||||||
|
if (serverList == None):
|
||||||
|
self.controlMappings.pop(name)
|
||||||
|
else:
|
||||||
|
list = self.controlMappings[key][1]
|
||||||
|
newList = []
|
||||||
|
for server in list:
|
||||||
|
if (server is not in serverList):
|
||||||
|
newList.append(server)
|
||||||
|
self.controlMappings[key][1] = newList
|
||||||
|
if (len(newList) == 0):
|
||||||
|
self.controlMappings.pop(name)
|
||||||
|
|
||||||
|
|
||||||
def getNodePathFindCmd(self, nodePath):
|
def getNodePathFindCmd(self, nodePath):
|
||||||
import string
|
import string
|
||||||
pathString = `nodePath`
|
pathString = `nodePath`
|
||||||
|
@ -110,6 +110,8 @@ class ClusterServer(DirectObject.DirectObject):
|
|||||||
self.objectMappings.pop(name)
|
self.objectMappings.pop(name)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def addControlMapping(self,objectName,controlledName, offset = None):
|
def addControlMapping(self,objectName,controlledName, offset = None):
|
||||||
if (not self.controlMappings.has_key(objectName)):
|
if (not self.controlMappings.has_key(objectName)):
|
||||||
self.controlMappings[objectName] = controlledName
|
self.controlMappings[objectName] = controlledName
|
||||||
@ -131,7 +133,7 @@ class ClusterServer(DirectObject.DirectObject):
|
|||||||
|
|
||||||
def startControlObjectTask(self):
|
def startControlObjectTask(self):
|
||||||
self.notify.debug("moving control objects")
|
self.notify.debug("moving control objects")
|
||||||
taskMgr.add(self.controlObjectTask,"controlObjectTask")
|
taskMgr.add(self.controlObjectTask,"controlObjectTask",50)
|
||||||
|
|
||||||
def controlObjectTask(self, task):
|
def controlObjectTask(self, task):
|
||||||
#print "running control object task"
|
#print "running control object task"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user