summaryrefslogtreecommitdiff
path: root/entities/effects/energy_explosion/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'entities/effects/energy_explosion/init.lua')
-rw-r--r--entities/effects/energy_explosion/init.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/entities/effects/energy_explosion/init.lua b/entities/effects/energy_explosion/init.lua
index d959e8a..8077791 100644
--- a/entities/effects/energy_explosion/init.lua
+++ b/entities/effects/energy_explosion/init.lua
@@ -3,13 +3,13 @@
function EFFECT:Init( data )
self.DieTime = CurTime() + 1.5
-
+
local pos = data:GetOrigin()
local normal = data:GetNormal()
local emitter = ParticleEmitter( pos )
-
+
for i=1, 20 do
-
+
local particle = emitter:Add( "effects/muzzleflash"..math.random(1,4), pos )
particle:SetVelocity( VectorRand() * 100 )
particle:SetDieTime( math.Rand( 0.3, 0.6 ) )
@@ -19,14 +19,14 @@ function EFFECT:Init( data )
particle:SetEndSize( math.Rand( 40, 80 ) )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetColor( 50, 100, 250 )
-
+
end
-
+
for i=1, math.random(3,6) do
-
+
local vec = normal * math.random( 150, 200 )+ VectorRand() * 50
local normalized = vec:GetNormal():Angle()
-
+
local particle = emitter:Add( "effects/yellowflare", pos )
particle:SetVelocity( normal * math.random(150,200) + VectorRand() * 50 )
particle:SetAngles( normalized )
@@ -39,16 +39,16 @@ function EFFECT:Init( data )
particle:SetEndLength( 20 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetColor( 50, 100, 200 )
-
+
particle:SetGravity( Vector( 0, 0, -300 ) )
-
+
end
-
+
for i=1, math.random(3,6) do
-
+
local vec = VectorRand() * 500
local normalized = vec:GetNormal():Angle()
-
+
local particle = emitter:Add( "effects/yellowflare", pos )
particle:SetVelocity( vec )
particle:SetAngles( normalized )
@@ -60,23 +60,23 @@ function EFFECT:Init( data )
particle:SetEndLength( 20 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetColor( 50, 100, 200 )
-
+
particle:SetGravity( Vector( 0, 0, -500 ) )
particle:SetCollide( true )
particle:SetBounce( 1.0 )
-
+
end
emitter:Finish()
-
+
end
function EFFECT:Think( )
return self.DieTime > CurTime()
-
+
end
function EFFECT:Render()
-
+
end