GroupManagerAI crash fix

This commit is contained in:
Zach 2015-04-21 22:31:41 -05:00
parent 56f312a1d7
commit 04dd4548e6

View file

@ -37,7 +37,7 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
def announceGenerate(self): def announceGenerate(self):
DistributedObjectAI.DistributedObjectAI.announceGenerate(self) DistributedObjectAI.DistributedObjectAI.announceGenerate(self)
self.air.groupManager = self self.air.groupManager = self
self.confirmActiveToons = taskMgr.doMethodLater(30, self.confirmToonsInGroup, 'confirmActiveToons') self.confirmActiveToons = taskMgr.doMethodLater(45, self.confirmToonsInGroup, 'confirmActiveToons')
def delete(self): def delete(self):
DistributedObjectAI.DistributedObjectAI.delete(self) DistributedObjectAI.DistributedObjectAI.delete(self)
@ -66,8 +66,8 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
def confirmToonsInGroup(self, task): def confirmToonsInGroup(self, task):
for groupId, group in self.groupPlayers.items(): for groupId, group in self.groupPlayers.items():
for player in group: for player in group:
toon = base.cr.doId2do.get(player) toon = simbase.air.doId2do.get(player)
if toon.getZoneId() != groupId: if toon.zoneId != groupId:
self.removePlayerFromGroup(groupId, player) self.removePlayerFromGroup(groupId, player)
return task.again return task.again