Ensure average players stat is never more than max player count.
parent
e84d73dbdc
commit
78f9087c4f
|
@ -40,8 +40,11 @@ function lobby.retrieve_stats(map_id)
|
||||||
local traitor = stats.winner_traitor
|
local traitor = stats.winner_traitor
|
||||||
local team = stats.winner_team
|
local team = stats.winner_team
|
||||||
local avg_players = stats.player_count
|
local avg_players = stats.player_count
|
||||||
local avg = string.format("%.2f", avg_players)
|
|
||||||
local max = stats.max_players or 0
|
local max = stats.max_players or 0
|
||||||
|
if avg_players > max then
|
||||||
|
avg_players = max
|
||||||
|
end
|
||||||
|
local avg = string.format("%.2f", avg_players)
|
||||||
formspec =
|
formspec =
|
||||||
'formspec_version[3]'..
|
'formspec_version[3]'..
|
||||||
'size[16,9]'..
|
'size[16,9]'..
|
||||||
|
|
Loading…
Reference in New Issue