mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06: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)
|
nextLeg = self.legList.getLegIndexAtTime(elapsed, self.currentLeg)
|
||||||
numLegs = self.legList.getNumLegs()
|
numLegs = self.legList.getNumLegs()
|
||||||
if self.currentLeg != nextLeg:
|
if self.currentLeg != nextLeg:
|
||||||
|
if nextLeg >= numLegs:
|
||||||
|
self.flyAwayNow()
|
||||||
|
return Task.done
|
||||||
self.currentLeg = nextLeg
|
self.currentLeg = nextLeg
|
||||||
self.__beginLegType(self.legList.getType(nextLeg))
|
self.__beginLegType(self.legList.getType(nextLeg))
|
||||||
zoneId = self.legList.getZoneId(nextLeg)
|
zoneId = self.legList.getZoneId(nextLeg)
|
||||||
|
|
Loading…
Reference in a new issue