Return if drawing skybox or depth

This commit is contained in:
Exotic 2023-07-12 15:15:07 +02:00 committed by GitHub
parent 6a2129a2da
commit 6ed5aa604a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,8 @@ local draws, emptyCSENT = tanktracktool.render.draws, tanktracktool.render.empty
local eyepos, eyedir = Vector(), Vector()
local flashlightMODE
hook.Add( "PostDrawOpaqueRenderables", "tanktracktoolRenderDraw", function()
hook.Add( "PostDrawOpaqueRenderables", "tanktracktoolRenderDraw", function(bDrawingDepth, bDrawingSkybox)
if bDrawingDepth or bDrawingSkybox then return end
flashlightMODE = LocalPlayer():FlashlightIsOn() --or #ents.FindByClass "*projectedtexture*" ~= 0
eyepos = EyePos()
eyedir = EyeVector()