From 34cd6f0b5bff8b051f25ad2833a39793614604de Mon Sep 17 00:00:00 2001 From: Blur Date: Sun, 19 Nov 2023 01:51:14 -0600 Subject: [PATCH] comment broken rank functionality+tweakrankspacing --- src/Lua/Hooks/PlayerThinks.lua | 10 +++++++--- src/Lua/main_hud.lua | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Lua/Hooks/PlayerThinks.lua b/src/Lua/Hooks/PlayerThinks.lua index 37c3970..5c552f9 100644 --- a/src/Lua/Hooks/PlayerThinks.lua +++ b/src/Lua/Hooks/PlayerThinks.lua @@ -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) diff --git a/src/Lua/main_hud.lua b/src/Lua/main_hud.lua index cb3327d..bcd051a 100644 --- a/src/Lua/main_hud.lua +++ b/src/Lua/main_hud.lua @@ -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 @@ -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))