Skip to content

Commit

Permalink
comment broken rank functionality+tweakrankspacing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiskster committed Nov 19, 2023
1 parent 46c4b4b commit 34cd6f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Lua/Hooks/PlayerThinks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,22 @@ addHook("PlayerThink", function(player)
elseif player.score <= pec*2 then
player.ptsr_rank = "C"

elseif player.score <= pec*3 then
elseif player.score <= pec*4 then
player.ptsr_rank = "B"
elseif player.score <= pec*10 then
elseif player.score <= pec*8 then
player.ptsr_rank = "A"
elseif player.score <= pec*15 then
elseif player.score <= pec*13 then
player.ptsr_rank = "S"
else
/*
if player.timeshit then
player.ptsr_rank = "S"
else
player.ptsr_rank = "P"
end
*/

player.ptsr_rank = "P"
end

end)
Expand Down
5 changes: 5 additions & 0 deletions src/Lua/main_hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,11 @@ local rank_hud = function(v, player)
if player.pizzaface then return end
if player.ptsr_rank then
v.drawScaled(rankpos.x, rankpos.y,FRACUNIT/3, PTSR.r2p(v,player.ptsr_rank), V_SNAPTOLEFT|V_SNAPTOTOP)
/*
if player.timeshit then -- no p rank for you noob
v.drawScaled(rankpos.x, rankpos.y,FRACUNIT/3, PTSR.r2p(v, "BROKEN"), V_SNAPTOLEFT|V_SNAPTOTOP|V_20TRANS)
end
*/
end
end

Expand Down Expand Up @@ -354,10 +356,13 @@ local scoreboard_hud = function(v, player)
v.drawScaled(_xcoord - 16*FRACUNIT, _ycoord, FRACUNIT/4,
PTSR.r2p(v,_player.ptsr_rank), commonflags)

/*
if _player.timeshit then -- no p rank for you noob, but on score hud
v.drawScaled(_xcoord - 16*FRACUNIT, _ycoord, FRACUNIT/4,
PTSR.r2p(v, "BROKEN"), commonflags|V_20TRANS)
end
*/

local scorewidth = v.stringWidth(tostring(_player.score), (commonflags|playernameflags))
local scoreandpingwidth = v.stringWidth(tostring(_player.score)..tostring(_player.ping), (commonflags))

Expand Down

0 comments on commit 34cd6f0

Please sign in to comment.