diff --git a/lua/wire/client/thrusterlib.lua b/lua/wire/client/thrusterlib.lua index c137f40e..dee80fcd 100644 --- a/lua/wire/client/thrusterlib.lua +++ b/lua/wire/client/thrusterlib.lua @@ -318,6 +318,68 @@ WireLib.ThrusterEffectThink.smoke_firecolors = smoke(function() return math.rand WireLib.ThrusterEffectThink.smoke_random = smoke(function() return math.random(100, 255), math.random(100, 255), math.random(100, 255) end) WireLib.ThrusterEffectThink.smoke_diy = smoke(function(self) local c = self:GetColor() return c.r, c.g, c.b end) +local function exhaust(color) + return function(self) + + self.SmokeTimer = self.SmokeTimer or 0 + if ( self.SmokeTimer > CurTime() ) then return end + + self.SmokeTimer = CurTime() + 0.015 + + local vOffset = self:LocalToWorld(self:GetOffset() + VectorRand(-1.5, 1.5) ) + local vNormal = self:CalcNormal() + + local particle = emitter:Add( "particles/smokey", vOffset ) + particle:SetVelocity( vNormal * math.Rand( 40, 60 ) ) + particle:SetGravity(Vector(0, 0, 25)) + particle:SetAirResistance(20) + particle:SetDieTime( 2.0 ) + particle:SetStartAlpha( math.Rand( 32, 64 ) ) + particle:SetStartSize( math.Rand( 3, 5 ) ) + particle:SetEndSize( math.Rand( 20, 26 ) ) + particle:SetRoll( math.Rand( -20, 20 ) ) + particle:SetRollDelta( math.Rand( -2.5, 2.5 )) + particle:SetColor(color(self)) + end +end +WireLib.ThrusterEffectThink.exhaust = exhaust(function() return 200, 200, 210 end) +WireLib.ThrusterEffectThink.exhaust_diy = exhaust(function(self) local c = self:GetColor() return c.r, c.g, c.b end) + +WireLib.ThrusterEffectThink.flamethrower = function(self) + + self.FlamethrowerTimer = self.FlamethrowerTimer or 0 + if ( self.FlamethrowerTimer > CurTime() ) then return end + + self.SmokeTimer = CurTime() + 0.003 + + local vOffset = self:LocalToWorld(self:GetOffset() + VectorRand(-3, 3)) + local vNormal = self:CalcNormal() + + local particle = emitter:Add( "sprites/physg_glow2", vOffset ) + particle:SetVelocity( vNormal * math.Rand( 500, 520 ) ) + particle:SetDieTime(0.4) + particle:SetCollide( true ) + particle:SetStartSize( math.Rand( 20, 30 ) ) + particle:SetEndSize( math.Rand( 100, 120 ) ) + particle:SetRoll( math.Rand( -180, 180 ) ) + particle:SetRollDelta( math.Rand( -20, 20 )) + particle:SetStartAlpha( math.Rand( 60, 130 ) ) + particle:SetAirResistance(100) + particle:SetColor(250, 100, 0) + + local particle2 = emitter:Add( "effects/fire_cloud2", vOffset ) + particle2:SetVelocity( vNormal * math.Rand( 500, 520 ) ) + particle2:SetDieTime(0.3) + particle2:SetCollide( true ) + particle2:SetStartSize( math.Rand( 3, 4 ) ) + particle2:SetEndSize( math.Rand( 10, 40 ) ) + particle2:SetRoll( math.Rand( -180, 180 ) ) + particle2:SetRollDelta( math.Rand( -20, 20 )) + particle2:SetStartAlpha( math.Rand( 30, 150 ) ) + particle2:SetAirResistance(100) + particle2:SetColor(255, 255, 255) +end + WireLib.ThrusterEffectDraw.color_magic = function(self) local vOffset = self:LocalToWorld(self:GetOffset()) diff --git a/lua/wire/stools/thruster.lua b/lua/wire/stools/thruster.lua index 18144b5f..56030907 100644 --- a/lua/wire/stools/thruster.lua +++ b/lua/wire/stools/thruster.lua @@ -52,6 +52,8 @@ function TOOL.BuildCPanel(panel) ["#Smoke"] = "smoke", ["#Smoke Random"] = "smoke_random", ["#Smoke Do it Youself"] = "smoke_diy", + ["#Exhaust"] = "exhaust", + ["#Exhaust Do it Yourself"] = "exhaust_diy", ["#Rings"] = "rings", ["#Rings Growing"] = "rings_grow", ["#Rings Shrinking"] = "rings_shrink", @@ -92,6 +94,7 @@ function TOOL.BuildCPanel(panel) --["#Debugger 60 Seconds"] = "debug_60", ["#Fire and Smoke"] = "fire_smoke", ["#Fire and Smoke Huge"] = "fire_smoke_big", + ["#Flamethrower"] = "flamethrower", ["#5 Growing Rings"] = "rings_grow_rings", ["#Color and Magic"] = "color_magic", } diff --git a/lua/wire/stools/vthruster.lua b/lua/wire/stools/vthruster.lua index 74fcdc7d..b1f6aace 100644 --- a/lua/wire/stools/vthruster.lua +++ b/lua/wire/stools/vthruster.lua @@ -133,6 +133,8 @@ function TOOL.BuildCPanel(panel) ["#Smoke"] = "smoke", ["#Smoke Random"] = "smoke_random", ["#Smoke Do it Youself"] = "smoke_diy", + ["#Exhaust"] = "exhaust", + ["#Exhaust Do it Yourself"] = "exhaust_diy", ["#Rings"] = "rings", ["#Rings Growing"] = "rings_grow", ["#Rings Shrinking"] = "rings_shrink", @@ -173,6 +175,7 @@ function TOOL.BuildCPanel(panel) --["#Debugger 60 Seconds"] = "debug_60", ["#Fire and Smoke"] = "fire_smoke", ["#Fire and Smoke Huge"] = "fire_smoke_big", + ["#Flamethrower"] = "flamethrower", ["#5 Growing Rings"] = "rings_grow_rings", ["#Color and Magic"] = "color_magic", } diff --git a/materials/gui/thrustereffects/exhaust.vmt b/materials/gui/thrustereffects/exhaust.vmt new file mode 100644 index 00000000..68b87e7a --- /dev/null +++ b/materials/gui/thrustereffects/exhaust.vmt @@ -0,0 +1,7 @@ +"UnlitGeneric" +{ + "$basetexture" "gui/thrustereffects/exhaust" + "$nolod" 1 + "$vertexalpha" 1 + "$vertexcolor" 1 +} diff --git a/materials/gui/thrustereffects/exhaust.vtf b/materials/gui/thrustereffects/exhaust.vtf new file mode 100644 index 00000000..f00695ab Binary files /dev/null and b/materials/gui/thrustereffects/exhaust.vtf differ diff --git a/materials/gui/thrustereffects/exhaust_diy.vmt b/materials/gui/thrustereffects/exhaust_diy.vmt new file mode 100644 index 00000000..68b87e7a --- /dev/null +++ b/materials/gui/thrustereffects/exhaust_diy.vmt @@ -0,0 +1,7 @@ +"UnlitGeneric" +{ + "$basetexture" "gui/thrustereffects/exhaust" + "$nolod" 1 + "$vertexalpha" 1 + "$vertexcolor" 1 +} diff --git a/materials/gui/thrustereffects/flamethrower.vmt b/materials/gui/thrustereffects/flamethrower.vmt new file mode 100644 index 00000000..a8ff6c1a --- /dev/null +++ b/materials/gui/thrustereffects/flamethrower.vmt @@ -0,0 +1,7 @@ +"UnlitGeneric" +{ + "$basetexture" "gui/thrustereffects/flamethrower" + "$nolod" 1 + "$vertexalpha" 1 + "$vertexcolor" 1 +} diff --git a/materials/gui/thrustereffects/flamethrower.vtf b/materials/gui/thrustereffects/flamethrower.vtf new file mode 100644 index 00000000..7f360d38 Binary files /dev/null and b/materials/gui/thrustereffects/flamethrower.vtf differ