summaryrefslogtreecommitdiff
path: root/entities/effects/fire_explosion/init.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-30 21:01:18 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-30 21:01:18 -0400
commitd62058fcdea5fc6736a2a373f47dc6c14c70c319 (patch)
tree79a1325190e3f1f1b6d6a2dbcdfc1ba3fa866ac9 /entities/effects/fire_explosion/init.lua
parentc38f00182ba6c282806eecb39a42e64d5feafa37 (diff)
downloadredead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.tar.gz
redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.tar.bz2
redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.zip
Removed exessive whitespace so future commits will be cleaner
Diffstat (limited to 'entities/effects/fire_explosion/init.lua')
-rw-r--r--entities/effects/fire_explosion/init.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/entities/effects/fire_explosion/init.lua b/entities/effects/fire_explosion/init.lua
index d51b1c3..f4fe339 100644
--- a/entities/effects/fire_explosion/init.lua
+++ b/entities/effects/fire_explosion/init.lua
@@ -3,11 +3,11 @@
function EFFECT:Init( data )
self.DieTime = CurTime() + 1.5
-
+
local pos = data:GetOrigin()
local normal = data:GetNormal()
local emitter = ParticleEmitter( pos )
-
+
local particle = emitter:Add( "effects/blood_core", pos )
particle:SetDieTime( math.Rand( 1.0, 1.5 ) )
particle:SetStartAlpha( 255 )
@@ -16,9 +16,9 @@ function EFFECT:Init( data )
particle:SetEndSize( math.random( 50, 100 ) )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetColor( 50, 50, 50 )
-
+
for i=1, 10 do
-
+
local particle = emitter:Add( "effects/muzzleflash"..math.random(1,4), pos )
particle:SetVelocity( VectorRand() * 50 + normal * 50 )
particle:SetDieTime( math.Rand( 0.3, 0.6 ) )
@@ -28,14 +28,14 @@ function EFFECT:Init( data )
particle:SetEndSize( math.Rand( 30, 60 ) )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetColor( 200, 150, 100 )
-
+
end
-
+
for i=1, math.random(5,10) 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:SetLifeTime( 0 )
@@ -46,19 +46,19 @@ function EFFECT:Init( data )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetColor( 200, 100, 50 )
-
+
particle:SetGravity( Vector( 0, 0, -500 ) )
particle:SetCollide( true )
particle:SetBounce( math.Rand( 0, 0.2 ) )
-
+
end
emitter:Finish()
-
+
local dlight = DynamicLight( self:EntIndex() )
-
+
if dlight then
-
+
dlight.Pos = pos
dlight.r = 255
dlight.g = 150
@@ -67,17 +67,17 @@ function EFFECT:Init( data )
dlight.Decay = 512
dlight.size = 256 * math.Rand( 0.5, 1.0 )
dlight.DieTime = CurTime() + 5
-
+
end
-
+
end
function EFFECT:Think( )
return self.DieTime > CurTime()
-
+
end
function EFFECT:Render()
-
+
end