diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-30 21:01:18 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-30 21:01:18 -0400 |
| commit | d62058fcdea5fc6736a2a373f47dc6c14c70c319 (patch) | |
| tree | 79a1325190e3f1f1b6d6a2dbcdfc1ba3fa866ac9 /entities/effects/immolate | |
| parent | c38f00182ba6c282806eecb39a42e64d5feafa37 (diff) | |
| download | redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.tar.gz redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.tar.bz2 redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.zip | |
Removed exessive whitespace so future commits will be cleaner
Diffstat (limited to 'entities/effects/immolate')
| -rw-r--r-- | entities/effects/immolate/init.lua | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/entities/effects/immolate/init.lua b/entities/effects/immolate/init.lua index e6a7cc1..c562638 100644 --- a/entities/effects/immolate/init.lua +++ b/entities/effects/immolate/init.lua @@ -4,47 +4,47 @@ function EFFECT:Init( data ) self.DieTime = CurTime() + 5 self.SmokeTime = 0 self.Ent = data:GetEntity() - + if not IsValid( self.Ent ) then self.DieTime = 0 return end - + self.Emitter = ParticleEmitter( self.Ent:GetPos() ) - + if LocalPlayer() != self.Ent then return end - + LocalPlayer():EmitSound( "ambient/fire/ignite.wav", 100, 80 ) - + 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 local pos - + for i=1, 3 do - + pos = self.Ent:GetPos() + Vector(0,0,math.random(1,50)) + Vector(math.random(-10,10),math.random(-10,10),0) - + local particle = self.Emitter:Add( "effects/muzzleflash" .. math.random(1,4), pos ) particle:SetVelocity( Vector(0,0,80) ) particle:SetDieTime( math.Rand( 0.2, 0.4 ) ) @@ -55,13 +55,13 @@ function EFFECT:Think() particle:SetRoll( math.random(-180,180) ) particle:SetColor( 255, 200, 200 ) particle:SetGravity( Vector( 0, 0, 500 ) ) - + end - + if self.SmokeTime < CurTime() then - + self.SmokeTime = CurTime() + 0.02 - + local particle = self.Emitter:Add( "particles/smokey", pos ) particle:SetVelocity( Vector(0,0,30) ) particle:SetDieTime( math.Rand( 1.0, 2.5 ) ) @@ -72,17 +72,13 @@ function EFFECT:Think() particle:SetRoll( 0 ) particle:SetColor( 50, 50, 50 ) particle:SetGravity( Vector( 0, 0, 30 ) ) - + end return true - -end -function EFFECT:Render() - end +function EFFECT:Render() - - +end |
