summaryrefslogtreecommitdiff
path: root/entities/effects/smoke_crater
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/smoke_crater
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/smoke_crater')
-rw-r--r--entities/effects/smoke_crater/init.lua24
1 files changed, 12 insertions, 12 deletions
diff --git a/entities/effects/smoke_crater/init.lua b/entities/effects/smoke_crater/init.lua
index 68c713b..e16d873 100644
--- a/entities/effects/smoke_crater/init.lua
+++ b/entities/effects/smoke_crater/init.lua
@@ -4,7 +4,7 @@ function EFFECT:Init( data )
self.Pos = data:GetOrigin()
self.Magnitude = data:GetMagnitude() or 1
-
+
self.Emitter = ParticleEmitter( self.Pos )
self.DieTime = CurTime() + 15
self.Interval = 0
@@ -15,9 +15,9 @@ end
function EFFECT:Think( )
if self.Interval < CurTime() then
-
+
self.Interval = CurTime() + 0.2
-
+
local particle = self.Emitter:Add( "particles/smokey", self.Pos + VectorRand() * 10 )
particle:SetVelocity( Vector( math.Rand(-3,3), math.Rand(-3,3), math.Rand(20,40) ) + WindVector )
@@ -28,25 +28,25 @@ function EFFECT:Think( )
particle:SetEndSize( math.Rand( 50, 200 ) * self.Magnitude )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -0.1, 0.1 ) )
-
+
local rand = math.random(10,50)
- particle:SetColor( rand, rand, rand )
+ particle:SetColor( rand, rand, rand )
end
-
+
if self.DieTime > CurTime() then
-
+
return true
-
+
else
-
+
self.Emitter:Finish()
return false
-
+
end
-
+
end
function EFFECT:Render()
-
+
end