update comment about off-by-1 error

This commit is contained in:
Kistaro Windrider 2024-12-29 23:41:47 -08:00
parent afa1f22170
commit 33fede4ed8
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -378,8 +378,10 @@ function drawhud()
else else
vertmeter(115,58,118,117,primary_ship.xp, primary_ship.xptarget, powcols) vertmeter(115,58,118,117,primary_ship.xp, primary_ship.xptarget, powcols)
end end
-- 59 px vertically? or 60? off-by-1 error somewhere here or in vertmeter? -- 60 px vertically. note that
-- it's here. I think -- there was at one point an
-- off-by-one and I'm not sure
-- it's actually fixed
local mxs, cs, mxh, ch = primary_ship.maxshield, primary_ship.shield, primary_ship.maxhp, primary_ship.hp local mxs, cs, mxh, ch = primary_ship.maxshield, primary_ship.shield, primary_ship.maxhp, primary_ship.hp
if (mxs > 0) and (mxh > 0) then if (mxs > 0) and (mxh > 0) then
local split = 59 * (mxs / (mxs + mxh)) \ 1 + 64 local split = 59 * (mxs / (mxs + mxh)) \ 1 + 64