mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 00:37:54 +00:00
Fix AI random crash
This commit is contained in:
parent
3c41567f52
commit
d975331905
1 changed files with 3 additions and 0 deletions
|
@ -230,6 +230,9 @@ class DistributedSuitAI(DistributedSuitBaseAI.DistributedSuitBaseAI):
|
|||
nextLeg = self.legList.getLegIndexAtTime(elapsed, self.currentLeg)
|
||||
numLegs = self.legList.getNumLegs()
|
||||
if self.currentLeg != nextLeg:
|
||||
if nextLeg >= numLegs:
|
||||
self.flyAwayNow()
|
||||
return Task.done
|
||||
self.currentLeg = nextLeg
|
||||
self.__beginLegType(self.legList.getType(nextLeg))
|
||||
zoneId = self.legList.getZoneId(nextLeg)
|
||||
|
|
Loading…
Reference in a new issue