Fixed health area model being too small sometimes.

This commit is contained in:
JetBoom 2014-11-08 22:35:59 -05:00
parent dca4ef001d
commit 59dc08372b

View file

@ -149,7 +149,7 @@ function PANEL:Think()
self:SetModel(model) self:SetModel(model)
if IsValid(self.Entity) then if IsValid(self.Entity) then
local mins, maxs = lp:GetRenderBounds() local mins, maxs = lp:OBBMins(), lp:OBBMaxs()
self:SetCamPos(mins:Distance(maxs) * Vector(0, -0.9, 0.4)) self:SetCamPos(mins:Distance(maxs) * Vector(0, -0.9, 0.4))
self:SetLookAt((mins + maxs) / 2) self:SetLookAt((mins + maxs) / 2)
self.Entity:SetModelScale(modelscale, 0) self.Entity:SetModelScale(modelscale, 0)