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/head_gib/init.lua | |
| 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/head_gib/init.lua')
| -rw-r--r-- | entities/effects/head_gib/init.lua | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/entities/effects/head_gib/init.lua b/entities/effects/head_gib/init.lua index 8a36dd9..6258735 100644 --- a/entities/effects/head_gib/init.lua +++ b/entities/effects/head_gib/init.lua @@ -1,10 +1,10 @@ function EFFECT:Init( data ) - - local pos = data:GetOrigin() + + local pos = data:GetOrigin() local emitter = ParticleEmitter( pos ) - + local particle = emitter:Add( "effects/blood_core", pos ) particle:SetDieTime( 0.5 ) particle:SetStartAlpha( 255 ) @@ -13,7 +13,7 @@ function EFFECT:Init( data ) particle:SetEndSize( math.random( 50, 100 ) ) particle:SetRoll( math.random( -360, 360 ) ) particle:SetColor( 50, 0, 0 ) - + local particle = emitter:Add( "effects/blood_core", pos ) particle:SetDieTime( math.Rand( 5.0, 7.0 ) ) particle:SetStartAlpha( 50 ) @@ -23,9 +23,9 @@ function EFFECT:Init( data ) particle:SetRoll( math.Rand( -360, 360 ) ) particle:SetColor( 50, 0, 0 ) particle:SetGravity( Vector( 0, 0, -5 ) ) - + for i=1, math.random(5,10) do - + local particle = emitter:Add( "effects/blood", pos ) particle:SetVelocity( VectorRand() * 100 + Vector(0,math.random(-25,25),50) ) particle:SetDieTime( 1.0 ) @@ -36,11 +36,11 @@ function EFFECT:Init( data ) particle:SetRoll( math.random( -360, 360 ) ) particle:SetColor( 50, 0, 0 ) particle:SetGravity( Vector( 0, 0, -300 ) ) - + end - + for i=1, 6 do - + local particle = emitter:Add( "nuke/gore" .. math.random(1,2), pos ) particle:SetVelocity( VectorRand() * 100 + Vector(0,0,75) ) particle:SetDieTime( 0.5 ) @@ -51,41 +51,40 @@ function EFFECT:Init( data ) particle:SetRoll( math.random( -360, 360 ) ) particle:SetColor( 50, 0, 0 ) particle:SetGravity( Vector( 0, 0, -300 ) ) - + end emitter:Finish() - + for i=1, 3 do - + local ed = EffectData() ed:SetOrigin( pos ) ed:SetScale( 1 ) util.Effect( "player_gib", ed, true, true ) - + end - + if LocalPlayer():GetPos():Distance( pos ) <= 100 then - + local frac = 1 - ( LocalPlayer():GetPos():Distance( pos ) / 100 ) - + for i=1, math.Round( frac * 6 ) do - + AddStain() - + end - + end - + end function EFFECT:Think( ) return false - + end function EFFECT:Render() - -end +end |
