Skip to content

Commit

Permalink
don't use a deprecated render function
Browse files Browse the repository at this point in the history
  • Loading branch information
Techbot121 committed Jun 14, 2024
1 parent fb65d1b commit 7a0f550
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lua/pac3/core/client/parts/model.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ local render = render
local render_CullMode = render.CullMode
local render_MaterialOverride = render.ModelMaterialOverride
local render_MaterialOverrideByIndex = render.MaterialOverrideByIndex
local render_RenderFlashlights = render.RenderFlashlights
local render_SetBlend = render.SetBlend
local render_SetColorModulation = render.SetColorModulation
local render_SuppressEngineLighting = render.SuppressEngineLighting
Expand Down Expand Up @@ -484,14 +485,12 @@ function PART:DrawModel(ent, pos, ang)
_self, _ent, _pos, _ang = self, ent, pos, ang

if self.ClassName ~= "entity2" then
render.PushFlashlightMode(true)

render_RenderFlashlights(function()
material_bound = self:BindMaterials(ent) or material_bound
ent.pac_drawing_model = true
ProtectedCall(protected_ent_draw_model)
ent.pac_drawing_model = false

render.PopFlashlightMode()
end)
end

if self.NoCulling then
Expand Down

0 comments on commit 7a0f550

Please sign in to comment.