mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 23:13:46 +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()))
|
self.map.get_start_position(team.get_id()))
|
||||||
points.append(
|
points.append(
|
||||||
((start_pos - player_pos).length(), start_pos))
|
((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 points[-1][1]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user