Improve team algorithm
This commit is contained in:
parent
7bd82dca86
commit
6b8049f1aa
1 changed files with 1 additions and 10 deletions
|
@ -50,18 +50,9 @@ function ctf_alloc.set_all()
|
||||||
return a.score > b.score
|
return a.score > b.score
|
||||||
end)
|
end)
|
||||||
|
|
||||||
for k=1, math.random(#players / 4) do
|
|
||||||
local i = math.random(#players)
|
|
||||||
local j = math.random(#players)
|
|
||||||
|
|
||||||
local tmp = players[i]
|
|
||||||
players[i] = players[j]
|
|
||||||
players[j] = tmp
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.log("warning", dump(players))
|
minetest.log("warning", dump(players))
|
||||||
|
|
||||||
local to_red = true
|
local to_red = math.random(2) == 2
|
||||||
for _, spair in pairs(players) do
|
for _, spair in pairs(players) do
|
||||||
local player = spair.player
|
local player = spair.player
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
|
Loading…
Reference in a new issue