Files
wnsrc/lua/effects/lvs_exhaust_fire.lua
lifestorm 9c918c46e5 Upload
2024-08-04 23:12:27 +03:00

63 lines
1.5 KiB
Lua

--[[
| 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/
--]]
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Dir = data:GetNormal()
local Ent = data:GetEntity()
local Scale = data:GetMagnitude()
if not IsValid( Ent ) then return end
local emitter = Ent:GetParticleEmitter( Pos )
if not IsValid( emitter ) then return end
local particle = emitter:Add( "effects/lvs_base/fire", Pos )
if particle then
particle:SetVelocity( Dir * 70 )
particle:SetDieTime( 0.2 )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 + 18 * Scale )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-1,1) * 180 )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
for i = 1, 3 do
local particle = emitter:Add( "effects/lvs_base/flamelet"..math.random(1,5), Pos )
if particle then
particle:SetVelocity( Dir * 40 * i )
particle:SetDieTime( 0.2 )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( (5 + 5 * Scale) - i )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-1,1) * 180 )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end