the Secret Hit Point: you have 1hp when the meter is empty
this won't work if your maxhp is 1, will need to special case that
This commit is contained in:
parent
51629376f2
commit
5dc259c094
@ -336,15 +336,12 @@ function drawhud()
|
|||||||
vertmeter(115,67,118,124,primary_ship.power, primary_ship.max_power, powcols)
|
vertmeter(115,67,118,124,primary_ship.power, primary_ship.max_power, powcols)
|
||||||
|
|
||||||
inset(120,66,125,125)
|
inset(120,66,125,125)
|
||||||
--line(120,96,125,96,119)
|
|
||||||
--line(120,97,125,97,85)
|
|
||||||
--pset(120, 125, 119)
|
|
||||||
-- 57 px vertically
|
-- 57 px vertically
|
||||||
local mxs, mxh = primary_ship.maxshield, primary_ship.maxhp
|
local mxs, mxh = primary_ship.maxshield, primary_ship.maxhp
|
||||||
local split = 57 * (mxs / (mxs + mxh)) \ 1 + 66
|
local split = 57 * (mxs / (mxs + mxh-1)) \ 1 + 66
|
||||||
line(121, split, 124, split, 0xba)
|
line(121, split, 124, split, 0xba)
|
||||||
vertmeter(121,67,124,split-1,primary_ship.shield, primary_ship.maxshield,{204,220,221})
|
vertmeter(121,67,124,split-1,primary_ship.shield, mxs,{204,220,221})
|
||||||
vertmeter(121,split+1,124,124,primary_ship.hp, primary_ship.maxhp, hpcols)
|
vertmeter(121,split+1,124,124,primary_ship.hp-1, mxh-1, hpcols)
|
||||||
fillp(0)
|
fillp(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user