Grenades have a light on them

This commit is contained in:
Fesiug 2023-12-17 23:10:28 -05:00
parent ae952b9a44
commit eb5eb47b17
1 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,18 @@ end
function ENT:Think() function ENT:Think()
if SERVER and self.Fuse <= CurTime() then if SERVER and self.Fuse <= CurTime() then
self:Explode() self:Explode()
else
if CLIENT then
local li = DynamicLight( self:EntIndex() )
li.pos = self:GetPos() + vector_up*8
li.r = 255
li.g = 200
li.b = 100
li.brightness = 8
li.decay = 0
li.size = 32
li.dietime = CurTime() + 0
end
end end
self:NextThink( CurTime() ) self:NextThink( CurTime() )
return true return true