battle: fix crash when battling cog
This commit is contained in:
parent
f4f9033f63
commit
e87f30a135
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ from pandac.PandaModules import *
|
||||||
from toontown.toonbase.ToontownBattleGlobals import *
|
from toontown.toonbase.ToontownBattleGlobals import *
|
||||||
from direct.task.Timer import *
|
from direct.task.Timer import *
|
||||||
import math
|
import math
|
||||||
|
import functools
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from toontown.toon import NPCToons
|
from toontown.toon import NPCToons
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer
|
||||||
|
@ -157,7 +158,7 @@ def findToonAttack(toons, attacks, track):
|
||||||
return -1
|
return -1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
foundAttacks.sort(compFunc)
|
foundAttacks.sort(key=functools.cmp_to_key(compFunc))
|
||||||
return foundAttacks
|
return foundAttacks
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue