Nice edits to the muzzle flash
This commit is contained in:
parent
06f79d633a
commit
eaa404bef1
|
@ -74,7 +74,7 @@ function EFFECT:Init( data )
|
|||
|
||||
-- Spark!
|
||||
local atti = self.en:GetAttachment( self.ea )
|
||||
if true then
|
||||
if false then
|
||||
local emitter = ParticleEmitter( atti.Pos, false )
|
||||
for i=1, 8 do
|
||||
local p = emitter:Add( mat_spark, atti.Pos )
|
||||
|
@ -119,8 +119,10 @@ function EFFECT:Render()
|
|||
p:SetDieTime( FrameTime()+0.001 )
|
||||
p:SetStartAlpha( 255 )
|
||||
p:SetEndAlpha( 255 )
|
||||
p:SetStartSize( Lerp( tf, 6, 4 ) )
|
||||
p:SetEndSize( Lerp( tf, 6, 4 ) )
|
||||
p:SetStartSize( Lerp( tf, 2, 16 ) )
|
||||
p:SetEndSize( Lerp( tf, 2, 16 ) )
|
||||
p:SetStartAlpha( Lerp( tf, 255, 127 ) )
|
||||
p:SetEndAlpha( Lerp( tf, 255, 127 ) )
|
||||
p:SetNextThink( UnPredictedCurTime() )
|
||||
p:SetThinkFunction( function( pa )
|
||||
timer.Simple( 0, function()
|
||||
|
@ -138,7 +140,7 @@ function EFFECT:Render()
|
|||
if true then
|
||||
local emitter = ParticleEmitter( atti.Pos, false )
|
||||
for i=1, 1 do
|
||||
local p = emitter:Add( mat_beam, atti.Pos )
|
||||
local p = emitter:Add( mat_arm, atti.Pos )
|
||||
if p then
|
||||
p:SetAngles( atti.Ang )
|
||||
p:SetVelocity( atti.Ang:Forward() / (2^16) )
|
||||
|
@ -147,12 +149,12 @@ function EFFECT:Render()
|
|||
p:SetColor( 255, 250, 150 )
|
||||
p:SetLifeTime( 0 )
|
||||
p:SetDieTime( FrameTime()+0.001 )
|
||||
p:SetStartAlpha( math.Clamp( Lerp( tf, 127, -127 ), 0, 255 ) )
|
||||
p:SetEndAlpha( math.Clamp( Lerp( tf, 127, -127 ), 0, 255 ) )
|
||||
p:SetStartAlpha( Lerp( tf, 255, 0 ) )
|
||||
p:SetEndAlpha( Lerp( tf, 255, 0 ) )
|
||||
p:SetStartSize( Lerp( tf, 16, 4 ) )
|
||||
p:SetStartLength( Lerp( tf, 12, 16 ) )
|
||||
p:SetStartLength( Lerp( tf, 0, 32 ) )
|
||||
p:SetEndSize( Lerp( tf, 16, 4 ) )
|
||||
p:SetEndLength( Lerp( tf, 12, 16 ) )
|
||||
p:SetEndLength( Lerp( tf, 0, 32 ) )
|
||||
p:SetNextThink( UnPredictedCurTime() )
|
||||
p:SetThinkFunction( function( pa )
|
||||
timer.Simple( 0, function()
|
||||
|
@ -189,10 +191,10 @@ function EFFECT:Render()
|
|||
p:SetDieTime( FrameTime()+0.001 )
|
||||
p:SetStartAlpha( Lerp( tf, 64, 0 ) )
|
||||
p:SetEndAlpha( Lerp( tf, 64, 0 ) )
|
||||
p:SetStartSize( Lerp( tf, 1, 12 ) )
|
||||
p:SetStartLength( Lerp( tf, 10, 1 ) )
|
||||
p:SetEndSize( Lerp( tf, 1, 12 ) )
|
||||
p:SetEndLength( Lerp( tf, 10, 1 ) )
|
||||
p:SetStartSize( Lerp( tf, 8, 16 ) )
|
||||
p:SetStartLength( Lerp( tf, 16, 24 ) )
|
||||
p:SetEndSize( Lerp( tf, 8, 16 ) )
|
||||
p:SetEndLength( Lerp( tf, 16, 24 ) )
|
||||
p:SetNextThink( UnPredictedCurTime() )
|
||||
p:SetThinkFunction( function( pa )
|
||||
timer.Simple( 0, function()
|
||||
|
|
Loading…
Reference in New Issue