summaryrefslogtreecommitdiff
path: root/entities/effects/radiation/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/radiation/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/radiation/init.lua')
-rw-r--r--entities/effects/radiation/init.lua42
1 files changed, 19 insertions, 23 deletions
diff --git a/entities/effects/radiation/init.lua b/entities/effects/radiation/init.lua
index e9021c9..5a4281e 100644
--- a/entities/effects/radiation/init.lua
+++ b/entities/effects/radiation/init.lua
@@ -4,43 +4,43 @@ function EFFECT:Init( data )
self.DieTime = CurTime() + 5
self.PartTime = 0
self.Ent = data:GetEntity()
-
+
if not IsValid( self.Ent ) then self.DieTime = 0 return end
-
+
self.Emitter = ParticleEmitter( self.Ent:GetPos() )
-
+
end
function EFFECT:Think()
if IsValid( self.Ent ) then
-
+
if self.Ent:IsPlayer() and ( !self.Ent:Alive() or self.Ent == LocalPlayer() ) then
-
+
self.DieTime = 0
-
+
end
-
+
end
if self.DieTime < CurTime() or not IsValid( self.Ent ) then
-
+
if self.Emitter then
-
+
self.Emitter:Finish()
-
+
end
-
+
return false
-
+
end
if self.PartTime < CurTime() then
-
+
self.PartTime = CurTime() + math.Rand( 0.2, 0.4 )
-
+
local pos = self.Ent:GetPos() + Vector(0,0,math.random(1,40)) + Vector(math.random(-10,10),math.random(-10,10),0)
-
+
local particle = self.Emitter:Add( "effects/yellowflare", pos )
particle:SetVelocity( VectorRand() * 5 )
particle:SetDieTime( math.Rand( 2.0, 4.0 ) )
@@ -51,20 +51,16 @@ function EFFECT:Think()
particle:SetRoll( math.random( -180, 180 ) )
particle:SetColor( 100, 200, 0 )
particle:SetGravity( Vector( 0, 0, -500 ) )
-
+
particle:SetCollide( true )
particle:SetBounce( math.Rand( 0, 0.2 ) )
-
+
end
return true
-
-end
-function EFFECT:Render()
-
end
+function EFFECT:Render()
-
-
+end