Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mods/apis/mhud
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad rebase

10 changes: 7 additions & 3 deletions mods/ctf/ctf_modebase/features.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,18 @@ local teams_left

local function calculate_killscore(player)
local match_rank = recent_rankings.players()[player] or {}
local kd = (match_rank.kills or 1) / (match_rank.deaths or 1)
local flag_multiplier = 1
local kills = (match_rank.kills or 1) + (match_rank.kill_assists or 0) / 4
local deaths = match_rank.deaths or 1
local kd = kills / deaths
local hd = (match_rank.hp_healed or 1) / deaths
local flag_multiplier = 1
for tname, carrier in pairs(ctf_modebase.flag_taken) do
if carrier.p == player then
flag_multiplier = flag_multiplier * 2
end
end
return math.max(1, math.round(kd * 7 * flag_multiplier))

return math.max(1, math.round(kd * 7), math.round(hd * 0.12)) * flag_multiplier
end

local damage_group_textures = {
Expand Down