mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-26 00:47:10 +08:00
specify sorting key for sorting nested lists in elimination game
This commit is contained in:
parent
b13df59274
commit
93c407cccc
@ -400,7 +400,8 @@ class EliminationGame(ba.TeamGameActivity):
|
||||
self.map.get_start_position(team.get_id()))
|
||||
points.append(
|
||||
((start_pos - player_pos).length(), start_pos))
|
||||
points.sort()
|
||||
# Hmm.. we need to sorting vectors too?
|
||||
points.sort(key=lambda x: x[0])
|
||||
return points[-1][1]
|
||||
return None
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user