mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
39
lua/effects/combvort_orbfx/init.lua
Normal file
39
lua/effects/combvort_orbfx/init.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local mat = Material("effects/strider_muzzle")
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Init(data)
|
||||
|
||||
self.Ent = data:GetEntity()
|
||||
self.RandSinMult = math.Rand(0.8, 1.2)
|
||||
end
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
if !IsValid(self.Ent) then
|
||||
return false
|
||||
end
|
||||
|
||||
self.Start = self.Ent:GetPos()
|
||||
self:SetRenderBoundsWS(self.Start - Vector(15,15,15), self.Start + Vector(15,15,15))
|
||||
return true
|
||||
end
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
if !IsValid(self.Ent) then return end
|
||||
|
||||
self.brightnessMult = ( 2+math.sin(CurTime()*10)*self.RandSinMult )*0.5
|
||||
render.SetMaterial(mat)
|
||||
render.DrawSprite(self.Ent:GetPos(),30,30,Color(0,115*self.brightnessMult,155*self.brightnessMult))
|
||||
|
||||
return true
|
||||
end
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user