mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
GroupManagerAI crash fix
This commit is contained in:
parent
56f312a1d7
commit
04dd4548e6
1 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
|
|||
def announceGenerate(self):
|
||||
DistributedObjectAI.DistributedObjectAI.announceGenerate(self)
|
||||
self.air.groupManager = self
|
||||
self.confirmActiveToons = taskMgr.doMethodLater(30, self.confirmToonsInGroup, 'confirmActiveToons')
|
||||
self.confirmActiveToons = taskMgr.doMethodLater(45, self.confirmToonsInGroup, 'confirmActiveToons')
|
||||
|
||||
def delete(self):
|
||||
DistributedObjectAI.DistributedObjectAI.delete(self)
|
||||
|
@ -66,8 +66,8 @@ class GroupManagerAI(DistributedObjectAI.DistributedObjectAI):
|
|||
def confirmToonsInGroup(self, task):
|
||||
for groupId, group in self.groupPlayers.items():
|
||||
for player in group:
|
||||
toon = base.cr.doId2do.get(player)
|
||||
if toon.getZoneId() != groupId:
|
||||
toon = simbase.air.doId2do.get(player)
|
||||
if toon.zoneId != groupId:
|
||||
self.removePlayerFromGroup(groupId, player)
|
||||
return task.again
|
||||
|
||||
|
|
Loading…
Reference in a new issue