golf: it's done
This commit is contained in:
parent
f73acc5598
commit
c8d0a10b2f
3 changed files with 5 additions and 4 deletions
|
@ -2817,7 +2817,7 @@ dclass DistributedGolfCourse : DistributedObject {
|
||||||
setCurHoleIndex(int8) broadcast ram required;
|
setCurHoleIndex(int8) broadcast ram required;
|
||||||
setCurHoleDoId(uint32) broadcast ram required;
|
setCurHoleDoId(uint32) broadcast ram required;
|
||||||
setDoneReward() airecv clsend;
|
setDoneReward() airecv clsend;
|
||||||
setReward(uint8[] [4], int8[], uint8[] [4], uint8[] [4], uint8[] [4], uint32, uint32/100, uint32/100, uint32/100, uint32/100) broadcast;
|
setReward(uint8[] [], int8[], uint8[] [], uint8[] [], uint8[] [], uint32, uint32/100, uint32/100, uint32/100, uint32/100) broadcast;
|
||||||
setCourseReady(int8, int16[], int8) broadcast;
|
setCourseReady(int8, int16[], int8) broadcast;
|
||||||
setHoleStart(int16) broadcast;
|
setHoleStart(int16) broadcast;
|
||||||
setCourseExit() broadcast;
|
setCourseExit() broadcast;
|
||||||
|
|
|
@ -6,6 +6,7 @@ from pandac.PandaModules import *
|
||||||
from direct.fsm.FSM import FSM
|
from direct.fsm.FSM import FSM
|
||||||
from toontown.ai.ToonBarrier import *
|
from toontown.ai.ToonBarrier import *
|
||||||
from toontown.golf import GolfGlobals
|
from toontown.golf import GolfGlobals
|
||||||
|
import functools
|
||||||
INITIAL = 0
|
INITIAL = 0
|
||||||
EXITED = 1
|
EXITED = 1
|
||||||
EXPECTED = 2
|
EXPECTED = 2
|
||||||
|
@ -682,9 +683,9 @@ class DistributedGolfCourseAI(DistributedObjectAI.DistributedObjectAI, FSM):
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
if GolfGlobals.TIME_TIE_BREAKER:
|
if GolfGlobals.TIME_TIE_BREAKER:
|
||||||
totalScores.sort(scoreCompareWithTime)
|
totalScores.sort(key=functools.cmp_to_key(scoreCompareWithTime))
|
||||||
else:
|
else:
|
||||||
totalScores.sort(scoreCompareNoTime)
|
totalScores.sort(key=functools.cmp_to_key(scoreCompareNoTime))
|
||||||
curRank = 0
|
curRank = 0
|
||||||
oldScore = 0
|
oldScore = 0
|
||||||
oldTime = 0
|
oldTime = 0
|
||||||
|
|
|
@ -398,7 +398,7 @@ for key in TrophyRequirements:
|
||||||
NumTrophies += len(TrophyRequirements[key])
|
NumTrophies += len(TrophyRequirements[key])
|
||||||
|
|
||||||
NumCups = 3
|
NumCups = 3
|
||||||
TrophiesPerCup = NumTrophies / NumCups
|
TrophiesPerCup = NumTrophies // NumCups
|
||||||
|
|
||||||
def calcTrophyListFromHistory(history):
|
def calcTrophyListFromHistory(history):
|
||||||
retval = []
|
retval = []
|
||||||
|
|
Loading…
Reference in a new issue