From bd1013fa70756902225e43725d5963106e816652 Mon Sep 17 00:00:00 2001 From: Blur Date: Wed, 9 Oct 2024 21:02:41 -0500 Subject: [PATCH] pf player pull strength in overtime now gets multi --- src/Lua/HUD/hud_overtimemulti.lua | 10 ++++++++-- src/Lua/pizzaface.lua | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Lua/HUD/hud_overtimemulti.lua b/src/Lua/HUD/hud_overtimemulti.lua index 361bdcf..382812c 100644 --- a/src/Lua/HUD/hud_overtimemulti.lua +++ b/src/Lua/HUD/hud_overtimemulti.lua @@ -32,13 +32,19 @@ local overtimemulti_hud = function(v, player) local gm_metadata = PTSR.currentModeMetadata() if gm_metadata.core_endurance then return end + local text = "PF SPEED: " + + if gm_metadata.player_pizzaface then + text = "PF PULL STRENGTH: " + end + local speed = (PTSR.timeover_tics*CV_PTSR.overtime_speed.value) local speedtext = L_FixedDecimal(FRACUNIT + speed,2) local totics = PTSR.timeover_tics local t = min(FixedDiv(totics, 5*TICRATE), FU) - local tw = v.stringWidth("PF SPEED: "..speedtext.."X", V_SNAPTOLEFT|V_SNAPTOTOP, "thin")*FU + local tw = v.stringWidth(text..speedtext.."X", V_SNAPTOLEFT|V_SNAPTOTOP, "thin")*FU local y = 58*FU local x = ease.outcubic(t, -tw, 16*FU) @@ -47,7 +53,7 @@ local overtimemulti_hud = function(v, player) local prog = min(FixedMul(limit, FixedDiv(speed, FU*2)), limit) -- barfill(v, x, y, FU/3, prog, V_SNAPTOBOTTOM) - v.drawString(x, y, "PIZZA SPEED: "..speedtext.."X", V_SNAPTOTOP|V_SNAPTOLEFT|V_REDMAP|V_20TRANS, "thin-fixed") + v.drawString(x, y, text..speedtext.."X", V_SNAPTOTOP|V_SNAPTOLEFT|V_REDMAP|V_20TRANS, "thin-fixed") end customhud.SetupItem("PTSR_overtimemulti", ptsr_hudmodname, overtimemulti_hud, "game", 0) \ No newline at end of file diff --git a/src/Lua/pizzaface.lua b/src/Lua/pizzaface.lua index 7cf4e3b..e85f7e7 100644 --- a/src/Lua/pizzaface.lua +++ b/src/Lua/pizzaface.lua @@ -849,6 +849,10 @@ addHook("PlayerThink", function(player) local zrange = 400*FU searchBlockmap("objects", function(refmobj, foundmobj) local strength = 3*FRACUNIT + local speed = FU + (PTSR.timeover_tics*CV_PTSR.overtime_speed.value) + + strength = FixedMul(strength, speed) + if foundmobj and abs(pmo.z-foundmobj.z) < zrange and foundmobj.valid and P_CheckSight(pmo, foundmobj) then if (foundmobj.type == MT_PLAYER) and ((leveltime/2)%2) == 0 then