battle: fix crash when battling cog

This commit is contained in:
John Cote 2019-12-30 20:29:56 -05:00
parent f4f9033f63
commit e87f30a135

View file

@ -2,6 +2,7 @@ from pandac.PandaModules import *
from toontown.toonbase.ToontownBattleGlobals import *
from direct.task.Timer import *
import math
import functools
from direct.directnotify import DirectNotifyGlobal
from toontown.toon import NPCToons
from toontown.toonbase import TTLocalizer
@ -157,7 +158,7 @@ def findToonAttack(toons, attacks, track):
return -1
return 0
foundAttacks.sort(compFunc)
foundAttacks.sort(key=functools.cmp_to_key(compFunc))
return foundAttacks