Skip to content

Commit

Permalink
Fix world-to-screening in Lua/HUD/hud_score.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Saxashitter committed Sep 3, 2024
1 parent 19bf382 commit 7ce80b5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Lua/HUD/hud_score.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@ function PTSR.add_wts_score(player, mobj, score)
local spr = score or 100

if player == displayplayer then
local ox = 0
local oy = 0

ox = ((v.width()/v.dupx)-320)*FU
oy = ((v.height()/v.dupy)-200)*FU

local wts = SG_ObjectTracking(fakeV,player,camera,mobj)

if wts.onScreen then
x = wts.x
y = wts.y
x = wts.x+ox
y = wts.y+ox
s = wts.scale/2
end
end
Expand Down Expand Up @@ -109,7 +115,7 @@ local score_hud = function(v, player)
drawY,
tostring(data.score),
"PTFNT",
V_PERPLAYER|V_SNAPTOBOTTOM,
V_PERPLAYER|V_SNAPTOLEFT|V_SNAPTOTOP,
"center",
data.s,
SKINCOLOR_WHITE)
Expand Down

0 comments on commit 7ce80b5

Please sign in to comment.