Skip to content

Commit

Permalink
Fix rounding in rank command result
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWolfHT committed Jul 2, 2023
1 parent 6c0cd7d commit 48fcab4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mods/ctf/ctf_modebase/ranking_commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ ctf_core.register_chatcommand_alias("rank", "r", {
return_str = string.format("%s%s: %s,\n\t",
return_str,
minetest.colorize("#63d437", HumanReadable(pair[1].."/"..pair[2])),
minetest.colorize("#ffea00", math.round(
minetest.colorize("#ffea00", 0.1 * math.round(10 * (
(prank[pair[1]] or 0 ) /
math.max(prank[pair[2]] or 0, 1)
))
)))
)
end

Expand Down

0 comments on commit 48fcab4

Please sign in to comment.