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/puke_spray/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/puke_spray/init.lua')
| -rw-r--r-- | entities/effects/puke_spray/init.lua | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/entities/effects/puke_spray/init.lua b/entities/effects/puke_spray/init.lua index b2d73ac..f7bb955 100644 --- a/entities/effects/puke_spray/init.lua +++ b/entities/effects/puke_spray/init.lua @@ -5,12 +5,12 @@ function EFFECT:Init( data ) self.DieTime = CurTime() + 1.5 self.SoundTime = 0 - + local pos = data:GetOrigin() + Vector(0,0,50) local emitter = ParticleEmitter( pos ) - + self.Pos = pos - + local particle = emitter:Add( "effects/blood_core", pos ) particle:SetDieTime( math.Rand( 0.5, 1.0 ) ) particle:SetStartAlpha( 255 ) @@ -19,9 +19,9 @@ function EFFECT:Init( data ) particle:SetEndSize( math.random( 100, 150 ) ) particle:SetRoll( math.Rand( -360, 360 ) ) particle:SetColor( self.Color.r, self.Color.g, 0 ) - + for i=1, math.random(4,8) do - + local particle = emitter:Add( "effects/blood", pos ) particle:SetVelocity( VectorRand() * 100 + Vector(0,math.random(-25,25),50) ) particle:SetDieTime( 1.0 ) @@ -32,14 +32,14 @@ function EFFECT:Init( data ) particle:SetRoll( math.Rand( -360, 360 ) ) particle:SetColor( self.Color.r, self.Color.g, 0 ) particle:SetGravity( Vector( 0, 0, -300 ) ) - + end - + for i=1, 10 do - + local vec = VectorRand() vec.z = math.Rand( -0.2, 1.0 ) - + local particle = emitter:Add( "nuke/gore" .. math.random(1,2), pos ) particle:SetVelocity( vec * 200 ) particle:SetDieTime( math.Rand( 0.8, 1.0 ) ) @@ -50,14 +50,14 @@ function EFFECT:Init( data ) particle:SetRoll( math.Rand( -360, 360 ) ) particle:SetColor( self.Color.r, self.Color.g + math.random(0,20), 0 ) particle:SetGravity( Vector( 0, 0, -300 ) ) - + end - + for i=1, math.random(3,6) do - + local vec = VectorRand() vec.z = math.Rand( -0.2, 1.0 ) - + local particle = emitter:Add( "nuke/gore" .. math.random(1,2), pos + Vector(0,0,math.random(-10,10)) ) particle:SetVelocity( vec * 300 ) particle:SetLifeTime( 0 ) @@ -68,52 +68,52 @@ function EFFECT:Init( data ) particle:SetEndSize( 1 ) particle:SetRoll( math.Rand( -360, 360 ) ) particle:SetColor( self.Color.r, self.Color.g, 0 ) - + particle:SetGravity( Vector( 0, 0, -500 ) ) particle:SetCollide( true ) particle:SetBounce( 0.5 ) - + particle:SetCollideCallback( function( part, pos, normal ) - + util.Decal( "yellowblood", pos + normal, pos - normal ) - + end ) - + end emitter:Finish() - + for i=1, 5 do - + local ed = EffectData() ed:SetOrigin( pos + Vector(0,0,math.random(0,30)) ) - + if i < 3 then ed:SetScale( 1 ) else ed:SetScale( 2 ) end - + util.Effect( "player_gib", ed, true, true ) - + end - + end function EFFECT:Think( ) if self.SoundTime < CurTime() then - + sound.Play( table.Random( GAMEMODE.GoreSplat ), self.Pos, 100, math.random(90,110) ) - + self.SoundTime = CurTime() + 0.5 - + end return self.DieTime > CurTime() - + end function EFFECT:Render() - + end |
