use self.air instead of simbase.air and uniquify task names to eliminate cross-talk between shards
This commit is contained in:
parent
aba5f97b25
commit
55a9716356
|
|
@ -1465,6 +1465,12 @@ class Actor(PandaObject, NodePath):
|
|||
if effect > 0.:
|
||||
totalEffect += effect
|
||||
thisAnim += ('%s:%.3f, ' % (name, effect))
|
||||
thisAnim += "\n"
|
||||
for control in controls:
|
||||
part = control.getPart()
|
||||
name = part.getName()
|
||||
rate = control.getPlayRate()
|
||||
thisAnim += ('%s:%.1f, ' % (name, rate))
|
||||
# don't display anything if this animation is not being played
|
||||
itemName = 'anim %s' % animName
|
||||
if totalEffect > 0.:
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
|||
self.DOIDnext = 0
|
||||
self.DOIDlast = 0
|
||||
|
||||
# Define uniqueName
|
||||
def uniqueName(self, desc):
|
||||
return desc
|
||||
|
||||
def abruptCleanup(self):
|
||||
"""
|
||||
Call this method to clean up any pending hooks or tasks on
|
||||
|
|
|
|||
|
|
@ -324,11 +324,11 @@ class ConnectionRepository(DoInterestManager, CConnectionRepository):
|
|||
self.stopReaderPollTask()
|
||||
self.accept(CConnectionRepository.getOverflowEventName(),
|
||||
self.handleReaderOverflow)
|
||||
taskMgr.add(self.readerPollUntilEmpty, "readerPollTask",
|
||||
taskMgr.add(self.readerPollUntilEmpty, self.uniqueName("readerPollTask"),
|
||||
priority = self.taskPriority)
|
||||
|
||||
def stopReaderPollTask(self):
|
||||
taskMgr.remove("readerPollTask")
|
||||
taskMgr.remove(self.uniqueName("readerPollTask"))
|
||||
self.ignore(CConnectionRepository.getOverflowEventName())
|
||||
|
||||
def readerPollUntilEmpty(self, task):
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class DistributedCartesianGridAI(DistributedNodeAI.DistributedNodeAI,
|
|||
def removeObjectFromGrid(self, av):
|
||||
# TODO: WHAT LOCATION SHOULD WE SET THIS TO?
|
||||
#av.wrtReparentTo(self.parentNP)
|
||||
av.setLocation(simbase.air.districtId, PiratesGlobals.TestZone)
|
||||
av.setLocation(self.air.districtId, PiratesGlobals.TestZone)
|
||||
|
||||
# Remove grid parent for this av
|
||||
avId = av.doId
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class DistributedObjectAI(DirectObject.DirectObject):
|
|||
lastLogicalZone = self.lastNonQuietZone
|
||||
self.handleLogicalZoneChange(zoneId, lastLogicalZone)
|
||||
self.lastNonQuietZone = zoneId
|
||||
# self.air.storeObjectLocation(self.doId, parentId, zoneId)
|
||||
#self.air.storeObjectLocation(self.doId, parentId, zoneId)
|
||||
self.__location = (parentId, zoneId)
|
||||
|
||||
def getLocation(self):
|
||||
|
|
@ -284,7 +284,7 @@ class DistributedObjectAI(DirectObject.DirectObject):
|
|||
if wantOtpServer:
|
||||
#HACK:
|
||||
if not hasattr(self, 'parentId'):
|
||||
parentId = simbase.air.districtId
|
||||
parentId = self.air.districtId
|
||||
self.parentId = parentId
|
||||
self.zoneId = zoneId
|
||||
self.generate()
|
||||
|
|
@ -303,7 +303,7 @@ class DistributedObjectAI(DirectObject.DirectObject):
|
|||
if wantOtpServer:
|
||||
#HACK:
|
||||
if not hasattr(self, 'parentId'):
|
||||
parentId = simbase.air.districtId
|
||||
parentId = self.air.districtId
|
||||
self.parentId = parentId
|
||||
self.zoneId = zoneId
|
||||
self.generate()
|
||||
|
|
|
|||
Loading…
Reference in New Issue