Fix weird issue with asym akimbo magazine display

This commit is contained in:
Fesiug 2023-11-29 00:38:09 -05:00
parent 98fd7c5ce8
commit abf908c7c0
1 changed files with 7 additions and 3 deletions

View File

@ -503,7 +503,7 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function()
if wep:D_GetMagID( hand ) != "" then if wep:D_GetMagID( hand ) != "" then
table.insert( newmaglist, wep:D_GetMagID( hand ) ) table.insert( newmaglist, wep:D_GetMagID( hand ) )
end end
if wep:D_GetMagID( !hand ) != "" then if false and (wep_table.Class == wep:BTable( !hand ).Class) and wep:D_GetMagID( !hand ) != "" then
table.insert( newmaglist, wep:D_GetMagID( !hand ) ) table.insert( newmaglist, wep:D_GetMagID( !hand ) )
end end
for i, v in ipairs( maglist ) do for i, v in ipairs( maglist ) do
@ -518,8 +518,6 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function()
surface.SetDrawColor( scheme["fg"] ) surface.SetDrawColor( scheme["fg"] )
surface.DrawOutlinedRect( m_x + bb - chunk, m_y + bb, m_w - b2, m_h - b2, ss( 0.5 ) ) surface.DrawOutlinedRect( m_x + bb - chunk, m_y + bb, m_w - b2, m_h - b2, ss( 0.5 ) )
local perc = math.abs( math.cos( CurTime() ) )
local s1 = (m_h - b2 - b2) local s1 = (m_h - b2 - b2)
local s2 = (m_h - b2 - b2) * (inv[tag] and ( inv[tag].Ammo / WEAPONS[inv[tag].Class].Ammo ) or 8) local s2 = (m_h - b2 - b2) * (inv[tag] and ( inv[tag].Ammo / WEAPONS[inv[tag].Class].Ammo ) or 8)
local s3 = math.floor( s2 - s1 ) local s3 = math.floor( s2 - s1 )
@ -719,6 +717,12 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function()
end end
end end
if wep then -- Fatinv
local inv = p:INV_Get()
local b_x, b_y = Wb, Hb
end
do -- Captions do -- Captions
local space = Hb local space = Hb
for aaa, caption in pairs(captions) do for aaa, caption in pairs(captions) do