This commit is contained in:
lifestorm
2024-08-04 23:54:45 +03:00
parent 8064ba84d8
commit 6a58f406b1
7522 changed files with 4011896 additions and 15 deletions

View File

@@ -0,0 +1,87 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local images_smoke = {"particle/smokesprites_0001", "particle/smokesprites_0002", "particle/smokesprites_0003", "particle/smokesprites_0004", "particle/smokesprites_0005", "particle/smokesprites_0006", "particle/smokesprites_0007", "particle/smokesprites_0008", "particle/smokesprites_0009", "particle/smokesprites_0010", "particle/smokesprites_0011", "particle/smokesprites_0012", "particle/smokesprites_0013", "particle/smokesprites_0014", "particle/smokesprites_0015", "particle/smokesprites_0016"}
local function TableRandomChoice(tbl)
return tbl[math.random(#tbl)]
end
function EFFECT:Init(data)
self.Origin = data:GetOrigin()
util.Decal("FadingScorch", self.Origin, self.Origin - Vector(0, 0, 16))
local emitter = ParticleEmitter( self.Origin + Vector( 0, 0, 16 ) )
for i = 0,5 do
local particle = emitter:Add( TableRandomChoice(images_smoke) , self.Origin )
local scol = math.Rand( 200, 225 )
particle:SetVelocity( 250 * VectorRand() )
particle:SetDieTime( math.Rand(1.5, 5) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.Rand(100,200) )
particle:SetEndSize( math.Rand(300,400) )
particle:SetRoll( math.Rand(0,360) )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( scol,scol,scol )
particle:SetAirResistance( 100 )
particle:SetGravity( Vector( math.Rand(-30,30) ,math.Rand(-30,30),math.Rand(10,40)) )
particle:SetLighting( true )
particle:SetCollide( true )
particle:SetBounce( 0.5 )
end
local particle = emitter:Add( "sprites/heatwave", self.Origin )
particle:SetAirResistance( 0 )
particle:SetDieTime( 1.5 )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 255 )
particle:SetStartSize( 250 )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(180,480) )
particle:SetRollDelta( math.Rand(-5,5) )
particle:SetColor( 255, 255, 255 )
local fire = emitter:Add( "particle/fire", self.Origin )
fire:SetAirResistance( 0 )
fire:SetDieTime( 0.1 )
fire:SetStartAlpha( 255 )
fire:SetEndAlpha( 0 )
fire:SetEndSize( 0 )
fire:SetStartSize( 800 )
fire:SetRoll( math.Rand(180,480) )
fire:SetRollDelta( math.Rand(-1,1) )
fire:SetColor( 255, 255, 255 )
local light = DynamicLight(self:EntIndex())
if (light) then
light.Pos = self.Origin
light.r = 255
light.g = 255
light.b = 255
light.Brightness = 9
light.Decay = 2500
light.Size = 512
light.DieTime = CurTime() + 0.1
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,89 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local images_muzzle = {"effects/muzzleflash1", "effects/muzzleflash2", "effects/muzzleflash3", "effects/muzzleflash4"}
local images_smoke = {"particle/smokesprites_0001", "particle/smokesprites_0002", "particle/smokesprites_0003", "particle/smokesprites_0004", "particle/smokesprites_0005", "particle/smokesprites_0006", "particle/smokesprites_0007", "particle/smokesprites_0008", "particle/smokesprites_0009", "particle/smokesprites_0010", "particle/smokesprites_0011", "particle/smokesprites_0012", "particle/smokesprites_0013", "particle/smokesprites_0014", "particle/smokesprites_0015", "particle/smokesprites_0016"}
local function TableRandomChoice(tbl)
return tbl[math.random(#tbl)]
end
function EFFECT:Init(data)
self.Origin = data:GetOrigin()
local emitter = ParticleEmitter( self.Origin + Vector( 0, 0, 16 ) )
for i = 0,3 do
local particle = emitter:Add( TableRandomChoice(images_smoke) , self.Origin )
local scol = math.Rand( 200, 225 )
particle:SetVelocity( 50 * VectorRand() )
particle:SetDieTime( math.Rand(0.2, 0.5) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.Rand(20,30) )
particle:SetEndSize( math.Rand(50,75) )
particle:SetRoll( math.Rand(0,360) )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( scol,scol,scol )
particle:SetAirResistance( 100 )
particle:SetGravity( Vector( math.Rand(-30,30) ,math.Rand(-30,30),math.Rand(10,40)) )
particle:SetLighting( true )
particle:SetCollide( true )
particle:SetBounce( 0.5 )
end
local particle = emitter:Add( "sprites/heatwave", self.Origin )
particle:SetAirResistance( 0 )
particle:SetDieTime( 0.5 )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 255 )
particle:SetStartSize( 100 )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(180,480) )
particle:SetRollDelta( math.Rand(-5,5) )
particle:SetColor( 255, 255, 255 )
for i = 0, 2 do
local fire = emitter:Add( TableRandomChoice(images_muzzle), self.Origin )
fire:SetVelocity(VectorRand() * 100)
fire:SetAirResistance( 0 )
fire:SetDieTime( 0.25 )
fire:SetStartAlpha( 255 )
fire:SetEndAlpha( 0 )
fire:SetEndSize( 0 )
fire:SetStartSize( 50 )
fire:SetRoll( math.Rand(180,480) )
fire:SetRollDelta( math.Rand(-1,1) )
fire:SetColor( 255, 255, 255 )
end
local light = DynamicLight(self:EntIndex())
if (light) then
light.Pos = self.Origin
light.r = 255
light.g = 206
light.b = 122
light.Brightness = 5
light.Decay = 2500
light.Size = 256
light.DieTime = CurTime() + 0.1
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,113 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init(data)
local pos = data:GetOrigin()
local wpn = data:GetEntity()
if !IsValid(wpn) then return end
local muzzle = wpn.MuzzleEffect
local overridemuzzle = wpn:GetBuff_Override("Override_MuzzleEffect")
local gmmuzzle = wpn:GetBuff_Override("Override_GMMuzzleEffect") or wpn.GMMuzzleEffect
muzzle = overridemuzzle or muzzle
if wpn.GetInUBGL and wpn:GetInUBGL() then
muzzle = wpn:GetBuff_Override("UBGL_MuzzleEffect") or muzzle
end
if ArcCW.ConVars["fastmuzzles"]:GetBool() then
muzzle = wpn.FastMuzzleEffect or "CS_MuzzleFlash"
gmmuzzle = true
if overridemuzzle then
muzzle = nil
end
muzzle = wpn:GetBuff_Override("Override_FastMuzzleEffect") or muzzle
end
local att = data:GetAttachment() or 1
local wm = false
local Owner = wpn:GetOwner()
if (LocalPlayer():ShouldDrawLocalPlayer() or Owner != LocalPlayer()) and !wpn.AlwaysWM then
wm = true
att = 1
end
if Owner != LocalPlayer() and !ArcCW.ConVars["muzzleeffects"]:GetBool() then
return
end
local mdl = wpn:GetMuzzleDevice(wm)
local parent = mdl
if !wm then
parent = LocalPlayer():GetViewModel()
end
if !IsValid(mdl) then return end
pos = (mdl:GetAttachment(att) or {}).Pos
ang = (mdl:GetAttachment(att) or {}).Ang
if gmmuzzle then
if muzzle then
if !pos then return end
local fx = EffectData()
fx:SetOrigin(pos)
fx:SetEntity(parent)
fx:SetAttachment(att)
fx:SetNormal((ang or Angle(0, 0, 0)):Forward())
fx:SetStart(pos)
fx:SetScale(1)
util.Effect(muzzle, fx)
end
else
if muzzle then
ParticleEffectAttach(muzzle, PATTACH_POINT_FOLLOW, mdl, att)
end
end
if !pos then return end
if !ArcCW.ConVars["fastmuzzles"]:GetBool() and !wpn.NoFlash
and !wpn:GetBuff_Override("Silencer")
and !wpn:GetBuff_Override("FlashHider") then
local light = DynamicLight(self:EntIndex())
local clr = wpn:GetBuff_Override("Override_MuzzleFlashColor", wpn.MuzzleFlashColor) or Color(244, 209, 66)
if (light) then
light.Pos = pos
light.r = clr.r
light.g = clr.g
light.b = clr.b
light.Brightness = 2
light.Decay = 2500
light.Size = Owner == LocalPlayer() and 256 or 128
light.DieTime = CurTime() + 0.1
end
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
return false
end

View File

@@ -0,0 +1,63 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.StartPos = Vector(0, 0, 0)
EFFECT.EndPos = Vector(0, 0, 0)
EFFECT.StartTime = 0
EFFECT.LifeTime = 0.2
EFFECT.DieTime = 0
EFFECT.Color = Color(255, 255, 255)
-- EFFECT.Speed = 500
local head = Material("effects/whiteflare")
local tracer = Material("trails/smoke")
function EFFECT:Init(data)
local start = data:GetStart()
local hit = data:GetOrigin()
-- self.LifeTime = (hit - start):Length() / self.Speed
self.LifeTime = 0.25
self.StartTime = UnPredictedCurTime()
self.DieTime = UnPredictedCurTime() + self.LifeTime
self.StartPos = start
self.EndPos = hit
end
function EFFECT:Think()
return self.DieTime > UnPredictedCurTime()
end
local function LerpColor(d, col1, col2)
local r = Lerp(d, col1.r, col2.r)
local g = Lerp(d, col1.g, col2.g)
local b = Lerp(d, col1.b, col2.b)
local a = Lerp(d, col1.a, col2.a)
return Color(r, g, b, a)
end
function EFFECT:Render()
local d = (UnPredictedCurTime() - self.StartTime) / self.LifeTime
-- local endpos = self.StartPos + (d * (self.EndPos - self.StartPos))
local endpos = self.EndPos
local size = 1
local col = LerpColor(d, self.Color, Color(0, 0, 0, 0))
render.SetMaterial(head)
render.DrawSprite(endpos, size, size, col)
render.SetMaterial(tracer)
render.DrawBeam(endpos, self.StartPos, size * 0.75, 0, 1, col)
end

View File

@@ -0,0 +1,174 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.Sounds = {}
EFFECT.Pitch = 90
EFFECT.Scale = 1.5
EFFECT.PhysScale = 1
EFFECT.Model = "models/shells/shell_57.mdl"
EFFECT.Material = nil
EFFECT.JustOnce = true
EFFECT.AlreadyPlayedSound = false
EFFECT.ShellTime = 1
EFFECT.SpawnTime = 0
function EFFECT:Init(data)
local att = data:GetAttachment()
local ent = data:GetEntity()
local mag = data:GetMagnitude()
local mdl = LocalPlayer():GetViewModel()
if LocalPlayer():ShouldDrawLocalPlayer() then
mdl = ent.WMModel or ent
end
if !IsValid(ent) then self:Remove() return end
local owner = ent:GetOwner()
if owner != LocalPlayer() then
mdl = ent.WMModel or ent
end
if owner != LocalPlayer() and !ArcCW.ConVars["shelleffects"]:GetBool() then self:Remove() return end
if !IsValid(mdl) then self:Remove() return end
if !mdl:GetAttachment(att) then self:Remove() return end
local origin, ang = mdl:GetAttachment(att).Pos, mdl:GetAttachment(att).Ang
ang:RotateAroundAxis(ang:Right(), -90 + ent.ShellRotate)
ang:RotateAroundAxis(ang:Right(), (ent.ShellRotateAngle or Angle(0, 0, 0))[1])
ang:RotateAroundAxis(ang:Up(), (ent.ShellRotateAngle or Angle(0, 0, 0))[2])
ang:RotateAroundAxis(ang:Forward(), (ent.ShellRotateAngle or Angle(0, 0, 0))[3])
local dir = ang:Up()
local st = ArcCW.ConVars["shelltime"]:GetFloat()
if ent then
self.Model = ent:GetBuff_Override("Override_ShellModel") or ent.ShellModel
self.Material = ent:GetBuff_Override("Override_ShellMaterial") or ent.ShellMaterial
self.Scale = ent:GetBuff("ShellScale") or 1--ent:GetBuff_Override("Override_ShellScale") or ent.ShellScale or 1
self.PhysScale = ent:GetBuff_Override("Override_ShellPhysScale") or ent.ShellPhysScale or 1
self.Pitch = ent:GetBuff_Override("Override_ShellPitch") or ent.ShellPitch or 100
self.Sounds = ent:GetBuff_Override("Override_ShellSounds") or ent.ShellSounds
self.ShellTime = (ent.ShellTime or 0) + st
if self.Sounds == "autocheck" and ent:GetPrimaryAmmoType() then
local t = ent:GetPrimaryAmmoType()
if t == game.GetAmmoID("buckshot") then
self.Sounds = ArcCW.ShotgunShellSoundsTable
elseif ent.Trivia_Calibre and string.find(ent.Trivia_Calibre, ".22") then
self.Sounds = ArcCW.TinyShellSoundsTable
elseif t == game.GetAmmoID("pistol") or t == game.GetAmmoID("357") or t == game.GetAmmoID("AlyxGun") then
self.Sounds = ArcCW.PistolShellSoundsTable
elseif t == game.GetAmmoID("ar2") then
self.Sounds = ArcCW.MediumShellSoundsTable
else
self.Sounds = ArcCW.ShellSoundsTable
end
end
end
self:SetPos(origin)
self:SetModel(self.Model)
self:SetModelScale(self.Scale)
self:DrawShadow(true)
self:SetAngles(ang)
if self.Material then
self:SetMaterial(self.Material)
end
local pb_vert = 2 * self.Scale * self.PhysScale
local pb_hor = 0.5 * self.Scale * self.PhysScale
self:PhysicsInitBox(Vector(-pb_vert,-pb_hor,-pb_hor), Vector(pb_vert,pb_hor,pb_hor))
self:SetCollisionGroup(COLLISION_GROUP_INTERACTIVE_DEBRIS)
local phys = self:GetPhysicsObject()
local plyvel = Vector(0, 0, 0)
if IsValid(owner) then
plyvel = owner:GetAbsVelocity()
end
phys:Wake()
phys:SetDamping(0, 0)
phys:SetMass(1)
phys:SetMaterial("gmod_silent")
phys:SetVelocity((dir * mag * math.Rand(1, 2)) + plyvel)
phys:AddAngleVelocity(VectorRand() * 100)
phys:AddAngleVelocity(ang:Up() * 2500 * math.Rand(0.75, 1.25))
self.HitPitch = self.Pitch + math.Rand(-5,5)
local emitter = ParticleEmitter(origin)
for i = 1, 3 do
local particle = emitter:Add("particles/smokey", origin + (dir * 2))
if (particle) then
particle:SetVelocity(VectorRand() * 10 + (dir * i * math.Rand(48, 64)) + plyvel)
particle:SetLifeTime(0)
particle:SetDieTime(math.Rand(0.05, 0.15))
particle:SetStartAlpha(math.Rand(40, 60))
particle:SetEndAlpha(0)
particle:SetStartSize(0)
particle:SetEndSize(math.Rand(18, 24))
particle:SetRoll(math.rad(math.Rand(0, 360)))
particle:SetRollDelta(math.Rand(-1, 1))
particle:SetLighting(true)
particle:SetAirResistance(96)
particle:SetGravity(Vector(-7, 3, 20))
particle:SetColor(150, 150, 150)
end
end
self.SpawnTime = CurTime()
end
function EFFECT:PhysicsCollide()
if self.AlreadyPlayedSound and self.JustOnce then return end
sound.Play(self.Sounds[math.random(#self.Sounds)], self:GetPos(), 65, self.HitPitch, 1)
self.AlreadyPlayedSound = true
end
function EFFECT:Think()
if (self.SpawnTime + self.ShellTime) <= CurTime() then
if !IsValid(self) then return end
self:SetRenderFX( kRenderFxFadeFast )
if (self.SpawnTime + self.ShellTime + 1) <= CurTime() then
if !IsValid(self:GetPhysicsObject()) then return end
self:GetPhysicsObject():EnableMotion(false)
if (self.SpawnTime + self.ShellTime + 1.5) <= CurTime() then
self:Remove()
return
end
end
end
return true
end
function EFFECT:Render()
if !IsValid(self) then return end
self:DrawModel()
end

View File

@@ -0,0 +1,95 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.StartPos = Vector(0, 0, 0)
EFFECT.EndPos = Vector(0, 0, 0)
EFFECT.StartTime = 0
EFFECT.LifeTime = 0.2
EFFECT.LifeTime2 = 0.2
EFFECT.DieTime = 0
EFFECT.Color = Color(255, 255, 255)
EFFECT.Speed = 5000
-- local head = Material("effects/whiteflare")
local tracer = Material("effects/smoke_trail")
local smoke = Material("trails/smoke")
function EFFECT:Init(data)
local hit = data:GetOrigin()
local wep = data:GetEntity()
if !IsValid(wep) then return end
local speed = data:GetScale()
local start = (wep.GetTracerOrigin and wep:GetTracerOrigin()) or data:GetStart()
if ArcCW.ConVars["fasttracers"]:GetBool() then
local fx = EffectData()
fx:SetOrigin(hit)
fx:SetEntity(wep)
fx:SetStart(start)
fx:SetScale(4000)
util.Effect("tracer", fx)
self:Remove()
return
end
if speed > 0 then
self.Speed = speed
end
local profile = 0
if wep.GetBuff_Override then
profile = wep:GetBuff_Override("Override_PhysTracerProfile", wep.PhysTracerProfile) or 0
if isnumber(profile) then profile = ArcCW.BulletProfileDict[ArcCW.BulletProfiles[profile]] end
end
self.LifeTime = (hit - start):Length() / self.Speed
self.StartTime = UnPredictedCurTime()
self.DieTime = UnPredictedCurTime() + math.max(self.LifeTime, self.LifeTime2)
self.StartPos = start
self.EndPos = hit
self.Color = (ArcCW.BulletProfileDict[profile] or ArcCW.BulletProfileDict["default0"]).color
end
function EFFECT:Think()
return self.DieTime > UnPredictedCurTime()
end
local function LerpColor(d, col1, col2)
local r = Lerp(d, col1.r, col2.r)
local g = Lerp(d, col1.g, col2.g)
local b = Lerp(d, col1.b, col2.b)
local a = Lerp(d, col1.a, col2.a)
return Color(r, g, b, a)
end
function EFFECT:Render()
local d = (UnPredictedCurTime() - self.StartTime) / self.LifeTime
local d2 = (UnPredictedCurTime() - self.StartTime) / self.LifeTime2
local startpos = self.StartPos + (d * 0.1 * (self.EndPos - self.StartPos))
local endpos = self.StartPos + (d * (self.EndPos - self.StartPos))
local size = 1
local col = LerpColor(d, self.Color, Color(0, 0, 0, 0))
local col2 = LerpColor(d2, Color(255, 255, 255, 255), Color(0, 0, 0, 0))
-- render.SetMaterial(head)
-- render.DrawSprite(endpos, size * 3, size * 3, col)
render.SetMaterial(tracer)
render.DrawBeam(endpos, startpos, size, 0, 1, col)
render.SetMaterial(smoke)
render.DrawBeam(self.EndPos, self.StartPos, size * 0.5 * d2, 0, 1, col2)
end

View File

@@ -0,0 +1,70 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init( data )
local vOffset = data:GetOrigin()
sound.Play( "garrysmod/balloon_pop_cute.wav", vOffset, 90, math.random( 90, 120 ) )
local NumParticles = 48
local emitter = ParticleEmitter( vOffset, true )
for i = 0, NumParticles do
local Color = Color(math.random(255), math.random(255), math.random(255))
local Pos = Vector( math.Rand( -0.5, 0.5 ), math.Rand( -0.5, 0.5 ), math.Rand( -0.5, 0.5 ) ) + data:GetStart()
local particle = emitter:Add( "particles/balloon_bit", vOffset + Pos * 8 )
if ( particle ) then
particle:SetVelocity( Pos * 600 )
particle:SetLifeTime( 0 )
particle:SetDieTime( 10 )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 255 )
local Size = math.Rand( 1, 2 )
particle:SetStartSize( Size )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( 0, 360 ) )
particle:SetRollDelta( math.Rand( -2, 2 ) )
particle:SetAirResistance( 80 )
particle:SetGravity( Vector( 0, 0, -300 ) )
local RandDarkness = math.Rand( 0.8, 1.0 )
particle:SetColor( Color.r * RandDarkness, Color.g * RandDarkness, Color.b * RandDarkness )
particle:SetCollide( true )
particle:SetAngleVelocity( Angle( math.Rand( -160, 160 ), math.Rand( -160, 160 ), math.Rand( -160, 160 ) ) )
particle:SetBounce( 0 )
particle:SetLighting( true )
end
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,178 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.Sounds = {}
EFFECT.Pitch = 90
EFFECT.Scale = 1.5
EFFECT.PhysScale = 1
EFFECT.Model = "models/shells/shell_57.mdl"
EFFECT.Material = nil
EFFECT.JustOnce = true
EFFECT.AlreadyPlayedSound = false
EFFECT.ShellTime = 1
EFFECT.SpawnTime = 0
EFFECT.UC_ShellColor = color_white
function EFFECT:Init(data)
local att = data:GetAttachment()
local ent = data:GetEntity()
local mag = data:GetMagnitude()
local mdl = LocalPlayer():GetViewModel()
if LocalPlayer():ShouldDrawLocalPlayer() then
mdl = ent.WMModel or ent
end
if !IsValid(ent) then self:Remove() return end
local owner = ent:GetOwner()
if owner != LocalPlayer() then
mdl = ent.WMModel or ent
end
if owner != LocalPlayer() and !GetConVar("arccw_shelleffects"):GetBool() then self:Remove() return end
if !IsValid(mdl) then self:Remove() return end
if !mdl:GetAttachment(att) then self:Remove() return end
local origin, ang = mdl:GetAttachment(att).Pos, mdl:GetAttachment(att).Ang
ang:RotateAroundAxis(ang:Right(), -90 + ent.ShellRotate)
ang:RotateAroundAxis(ang:Right(), (ent.ShellRotateAngle or Angle(0, 0, 0))[1])
ang:RotateAroundAxis(ang:Up(), (ent.ShellRotateAngle or Angle(0, 0, 0))[2])
ang:RotateAroundAxis(ang:Forward(), (ent.ShellRotateAngle or Angle(0, 0, 0))[3])
local dir = ang:Up()
local st = GetConVar("arccw_shelltime"):GetFloat()
if ent then
self.Model = ent:GetBuff_Override("Override_ShellModel") or ent.ShellModel
self.Material = ent:GetBuff_Override("Override_ShellMaterial") or ent.ShellMaterial
self.Scale = ent:GetBuff("ShellScale") or 1--ent:GetBuff_Override("Override_ShellScale") or ent.ShellScale or 1
self.PhysScale = ent:GetBuff_Override("Override_ShellPhysScale") or ent.ShellPhysScale or 1
self.Pitch = ent:GetBuff_Override("Override_ShellPitch") or ent.ShellPitch or 100
self.Sounds = ent:GetBuff_Override("Override_ShellSounds") or ent.ShellSounds
self.ShellTime = (ent.ShellTime or 0) + st
if self.Sounds == "autocheck" and ent:GetPrimaryAmmoType() then
local t = ent:GetPrimaryAmmoType()
if t == game.GetAmmoID("buckshot") then
self.Sounds = ArcCW.ShotgunShellSoundsTable
elseif ent.Trivia_Calibre and string.find(ent.Trivia_Calibre, ".22") then
self.Sounds = ArcCW.TinyShellSoundsTable
elseif t == game.GetAmmoID("pistol") or t == game.GetAmmoID("357") or t == game.GetAmmoID("AlyxGun") then
self.Sounds = ArcCW.PistolShellSoundsTable
elseif t == game.GetAmmoID("ar2") then
self.Sounds = ArcCW.MediumShellSoundsTable
else
self.Sounds = ArcCW.ShellSoundsTable
end
end
self.UC_ShellColor = ent:GetBuff_Override("Override_UC_ShellColor") or ent.UC_ShellColor or self.UC_ShellColor
end
self:SetPos(origin)
self:SetModel(self.Model)
self:SetModelScale(self.Scale)
self:DrawShadow(true)
self:SetAngles(ang)
if self.Material then
self:SetMaterial(self.Material)
end
local pb_vert = 2 * self.Scale * self.PhysScale
local pb_hor = 0.5 * self.Scale * self.PhysScale
self:PhysicsInitBox(Vector(-pb_vert,-pb_hor,-pb_hor), Vector(pb_vert,pb_hor,pb_hor))
self:SetCollisionGroup(COLLISION_GROUP_INTERACTIVE_DEBRIS)
local phys = self:GetPhysicsObject()
local plyvel = Vector(0, 0, 0)
if IsValid(owner) then
plyvel = owner:GetAbsVelocity()
end
phys:Wake()
phys:SetDamping(0, 0)
phys:SetMass(1)
phys:SetMaterial("gmod_silent")
phys:SetVelocity((dir * mag * math.Rand(1, 2)) + plyvel)
phys:AddAngleVelocity(VectorRand() * 100)
phys:AddAngleVelocity(ang:Up() * 2500 * math.Rand(0.75, 1.25))
self.HitPitch = self.Pitch + math.Rand(-5,5)
local emitter = ParticleEmitter(origin)
for i = 1, 3 do
local particle = emitter:Add("particles/smokey", origin + (dir * 2))
if (particle) then
particle:SetVelocity(VectorRand() * 10 + (dir * i * math.Rand(48, 64)) + plyvel)
particle:SetLifeTime(0)
particle:SetDieTime(math.Rand(0.05, 0.15))
particle:SetStartAlpha(math.Rand(40, 60))
particle:SetEndAlpha(0)
particle:SetStartSize(0)
particle:SetEndSize(math.Rand(18, 24))
particle:SetRoll(math.rad(math.Rand(0, 360)))
particle:SetRollDelta(math.Rand(-1, 1))
particle:SetLighting(true)
particle:SetAirResistance(96)
particle:SetGravity(Vector(-7, 3, 20))
particle:SetColor(150, 150, 150)
end
end
self.SpawnTime = CurTime()
end
function EFFECT:PhysicsCollide()
if self.AlreadyPlayedSound and self.JustOnce then return end
sound.Play(self.Sounds[math.random(#self.Sounds)], self:GetPos(), 65, self.HitPitch, 1)
self.AlreadyPlayedSound = true
end
function EFFECT:Think()
if (self.SpawnTime + self.ShellTime) <= CurTime() then
if !IsValid(self) then return end
self:SetRenderFX( kRenderFxFadeFast )
if (self.SpawnTime + self.ShellTime + 1) <= CurTime() then
if !IsValid(self:GetPhysicsObject()) then return end
self:GetPhysicsObject():EnableMotion(false)
if (self.SpawnTime + self.ShellTime + 1.5) <= CurTime() then
self:Remove()
return
end
end
end
return true
end
function EFFECT:Render()
if !IsValid(self) then return end
self:DrawModel()
end

View File

@@ -0,0 +1,99 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.StartPos = Vector(0, 0, 0)
EFFECT.EndPos = Vector(0, 0, 0)
EFFECT.StartTime = 0
EFFECT.LifeTime = 0.2
EFFECT.LifeTime2 = 0.15
EFFECT.DieTime = 0
EFFECT.Color = Color(255, 255, 255)
EFFECT.Speed = 6000
local head = Material("effects/whiteflare")
local tracer = Material("effects/smoke_trail")
local smoke = Material("trails/smoke")
function EFFECT:Init(data)
local hit = data:GetOrigin()
local wep = data:GetEntity()
if !IsValid(wep) then return end
local speed = data:GetScale()
local start = (wep.GetTracerOrigin and wep:GetTracerOrigin()) or data:GetStart()
--[[]
if GetConVar("arccw_fasttracers"):GetBool() then
local fx = EffectData()
fx:SetOrigin(hit)
fx:SetEntity(wep)
fx:SetStart(start)
fx:SetScale(4000)
util.Effect("tracer", fx)
self:Remove()
return
end
]]
if speed > 0 then
self.Speed = speed
end
local profile = 0
if wep.GetBuff_Override then
profile = wep:GetBuff_Override("Override_PhysTracerProfile", wep.PhysTracerProfile) or 0
if isnumber(profile) then profile = ArcCW.BulletProfileDict[ArcCW.BulletProfiles[profile]] end
end
self.LifeTime = (hit - start):Length() / self.Speed
self.StartTime = UnPredictedCurTime()
self.DieTime = UnPredictedCurTime() + math.max(self.LifeTime, self.LifeTime2)
self.StartPos = start
self.EndPos = hit
self.Color = (ArcCW.BulletProfileDict[profile] or ArcCW.BulletProfileDict["default0"]).color
-- print(profile)
end
function EFFECT:Think()
return self.DieTime > UnPredictedCurTime()
end
local function LerpColor(d, col1, col2)
local r = Lerp(d, col1.r, col2.r)
local g = Lerp(d, col1.g, col2.g)
local b = Lerp(d, col1.b, col2.b)
local a = Lerp(d, col1.a, col2.a)
return Color(r, g, b, a)
end
function EFFECT:Render()
local d = (UnPredictedCurTime() - self.StartTime) / self.LifeTime
local d2 = (UnPredictedCurTime() - self.StartTime) / self.LifeTime2
local startpos = self.StartPos + (d * 0.15 * (self.EndPos - self.StartPos))
local endpos = self.StartPos + (d * (self.EndPos - self.StartPos))
local size = 2
local col = LerpColor(d, self.Color, Color(0, 0, 0, 255))
local col2 = LerpColor(d2, Color(255, 255, 255, 127), Color(0, 0, 0, 0))
render.SetMaterial(head)
render.DrawSprite(endpos, size * 3, size * 3, col)
render.SetMaterial(tracer)
render.DrawBeam(endpos, startpos, size * 2, 0, 1, col)
render.SetMaterial(smoke)
render.DrawBeam(self.EndPos, self.StartPos, size * 0.5 * d2, 0, 1, col2)
end

View File

@@ -0,0 +1,34 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init(data)
self.Start = data:GetStart()
local emitter = ParticleEmitter(self.Start)
for i = 1,18 do
local pos = self.Start + VectorRand(-50,50)
local smoke = emitter:Add("particle/particle_smokegrenade", pos)
smoke:SetVelocity((pos - self.Start) * math.random(0.5,1))
smoke:SetDieTime(1)
smoke:SetStartAlpha(175)
smoke:SetEndAlpha(0)
smoke:SetStartSize(25)
smoke:SetEndSize(85)
smoke:SetAirResistance(25)
smoke:SetRollDelta(math.random(0.5,1))
local rand = math.random(65, 85)
smoke:SetColor(rand,rand,rand)
end
emitter:Finish()
end
function EFFECT:Render() end

View File

@@ -0,0 +1,36 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Init(data)
self.Start = data:GetStart()
local emitter = ParticleEmitter(self.Start)
for i = 1,14 do
local pos = self.Start + VectorRand(-250,250)
local spark = emitter:Add("Effects/bluespark", pos)
spark:SetVelocity((self.Start - pos) * 1.25)
spark:SetDieTime(0.15)
spark:SetStartAlpha(0)
spark:SetEndAlpha(175)
spark:SetStartSize(math.random(10,18))
spark:SetEndSize(0)
spark:SetStartLength(0)
spark:SetEndLength(math.random(125,150))
end
emitter:Finish()
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think() end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render() end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,69 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local maxballsize = 150
local ball_expand_speed = 1.25
local mat_warp = Material("particle/warp2_warp")
local mat_ball = Material("sprites/strider_blackball")
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Expand(time,size)
self.BallScale = 0
local reps = 50
timer.Create("VJ_Z_BallWidthTimer" .. self.Ent:EntIndex(), time/reps, reps, function() if IsValid(self) then
self.BallScale = math.Clamp( self.BallScale + size/reps , 0, size)
end end)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Init(data)
local expand_time = data:GetMagnitude()
self.Start = data:GetStart()
self.Ent = data:GetEntity()
self.Attachment = data:GetAttachment()
self.DeathTime = CurTime()+expand_time
self.ScaleMult = data:GetScale()
self:SetRenderBoundsWS(self.Start - Vector(15,15,15), self.Start + Vector(15,15,15))
self:Expand(expand_time,maxballsize*self.ScaleMult)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if IsValid(self.Ent) && self.Attachment > 0 then
self.Start = self.Ent:GetAttachment(self.Attachment).Pos
self:SetRenderBoundsWS(self.Start - Vector(15,15,15), self.Start + Vector(15,15,15))
end
if !IsValid(self.Ent) or self.DeathTime < CurTime() then
return false
end
return true
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
render.SetMaterial(mat_warp)
render.DrawSprite(self.Start,self.BallScale ^ 1.15,self.BallScale ^ 1.15, Color(255,255,255,100))
render.SetMaterial(mat_ball)
render.DrawSprite(self.Start,self.BallScale*0.66,self.BallScale*0.66)
return true
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,39 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local mat = Material("effects/strider_muzzle")
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Init(data)
self.Ent = data:GetEntity()
self.RandSinMult = math.Rand(0.8, 1.2)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then
return false
end
self.Start = self.Ent:GetPos()
self:SetRenderBoundsWS(self.Start - Vector(15,15,15), self.Start + Vector(15,15,15))
return true
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
if !IsValid(self.Ent) then return end
self.brightnessMult = ( 2+math.sin(CurTime()*10)*self.RandSinMult )*0.5
render.SetMaterial(mat)
render.DrawSprite(self.Ent:GetPos(),30,30,Color(0,115*self.brightnessMult,155*self.brightnessMult))
return true
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,150 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
//local lifetime = 0.2
//local inverse = 1 / lifetime
local len = 400
local len2 = 400
local lifetime2 = 0.5
local inv = 1 / lifetime2
local lastwizz = 0
local parttimer = 0
function EFFECT:Init(data)
local ent = data:GetEntity()
local att = data:GetAttachment()
self.StartPos = data:GetStart() or Vector(0, 0, 0)
self.Scale = 1
if(ent:IsWeapon() && ent:IsCarriedByLocalPlayer()) then
local ply = ent:GetOwner()
if(!ply:ShouldDrawLocalPlayer()) then
local vm = ply:GetViewModel()
if(IsValid(vm)) then
ent = vm
end
end
self.StartPos = ent:GetAttachment(att).Pos
end
self.EndPos = data:GetOrigin()
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
local _dist = self.StartPos:Distance(self.EndPos)
local lifetime = _dist * 0.00007
self.DieTime = CurTime() + lifetime
self.Inverse = 1 / lifetime
self.Direction = (self.EndPos - self.StartPos):GetNormalized()
self.DieTime2 = CurTime() + lifetime2
self.Dist = _dist
self.StartAlpha = math.random(10, 50)
if(lastwizz < CurTime()) then
local _plypoint = LocalPlayer():EyePos()
local _kyroshie
local _ab = self.EndPos - self.StartPos
local _be = _plypoint - self.EndPos
local _ae = _plypoint - self.StartPos
local _dotabbe = _ab:Dot(_be)
local _dotabae = _ab:Dot(_ae)
if(_dotabbe > 0) then
_kyroshie = self.EndPos
elseif(_dotabae < 0) then
_kyroshie = self.StartPos
else
_kyroshie = self.StartPos + self.Direction * _dotabae / _dist
sound.Play("weapons/physgun_off.wav", _kyroshie, 75, math.random(225, 255))
sound.Play("weapons/fx/nearmiss/bulletLtoR0" .. math.random(3,9) .. ".wav", _kyroshie)
end
lastwizz = CurTime() + math.Rand(0.1, 0.5)
end
self.Emitter = ParticleEmitter(self.StartPos, false)
end
local MRToFrance_beamSeanTyas = Material("sprites/baku_burntcer")
local PulserPointofimpact_FractalStructure = Material("sprites/baku_burntcer_smoke")
local __KeepTheMixRocking = {}
__KeepTheMixRocking[1] = function(self, _x, size, start, color, len2)
render.SetMaterial(MRToFrance_beamSeanTyas)
render.DrawBeam(start - self.Direction * len2, start, size * 0.2, 0.2, 1, Color(255, 100, 0))
render.DrawBeam(start - self.Direction * len2, start, size, 0.2, 1, Color(255, 221, 0))
end
__KeepTheMixRocking[2] = function(self, _x, size, start, color, len2)
end
local __UnrealLove = {}
__UnrealLove[1] = LerpVector
__UnrealLove[2] = function(x, y, z) return y end
function EFFECT:Render()
local _x = (self.DieTime - CurTime()) * self.Inverse
local size = Lerp( _x, 0, 12 * self.Scale )
local color = Color(255, 100, 0)
local __xyz = Either(self.DieTime > CurTime(), 1, 2)
local len2 = len
if(self.Dist < len) then
len2 = self.Dist
end
local start = __UnrealLove[__xyz](_x, self.EndPos, self.StartPos + self.Direction * len2)
__KeepTheMixRocking[__xyz](self, _x, size, start, color, len2)
local _y = (self.DieTime2 - CurTime()) * inv
local alpha = Lerp(_y, 0, self.StartAlpha)
render.SetMaterial(PulserPointofimpact_FractalStructure)
render.DrawBeam(self.StartPos, start, 3 + _y * 3, 0, self.Dist * 0.004, Color(255, 255, 255, alpha))
if(self.DieTime > CurTime()) then
local part = self.Emitter:Add("sprites/light_glow02_add", start - self.Direction * len2)
local vel = (-self.Direction + VectorRand() * 0.3):GetNormalized()
part:SetVelocity(vel * 300)
part:SetColor(255, 128, 0)
part:SetDieTime( math.Rand(0.05, 0.2) );
part:SetStartAlpha( 255 );
part:SetEndAlpha( 0 );
part:SetStartSize( math.random(1, 3) );
part:SetEndSize( 0 );
part:SetGravity( Vector( 0, 0, -100 ) );
part:SetCollide( true );
part:SetBounce( 0.3 );
part:SetAirResistance( 1 );
//part:SetMaterial(MRToFrance_beamSeanTyas)
end
end
function EFFECT:Think()
if(self.DieTime2 < CurTime() && self.DieTime < CurTime()) then
self.Emitter:Finish()
return false
end
return true
end

View File

@@ -0,0 +1,153 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local lifetime = 0.1
local inv = 1 / lifetime
local lifetime2 = lifetime * 0.6
local inv2 = 1 / lifetime2
local PulserPointofimpact_FractalStructure = Material("sprites/baku_impactor_smoke")
function EFFECT:Init(data)
local ent = data:GetEntity()
local att = data:GetAttachment()
if(!IsValid(ent)) then return self:Remove() end
self.Scale = math.Rand(0.7, 2) * (data:GetScale() or 1)
if(ent:IsWeapon() && ent:IsCarriedByLocalPlayer()) then
local ply = ent:GetOwner()
if(!ply:ShouldDrawLocalPlayer()) then
local vm = ply:GetViewModel()
if(IsValid(vm)) then
ent = vm
end
end
end
self.Entity = ent
self.Attachment = att
self.DieTime = CurTime() + lifetime
self.DieTime2 = CurTime() + lifetime2
local pos = ent:GetAttachment(att).Pos
local emitter = ParticleEmitter(pos, false)
local norm = ent:GetAttachment(att).Ang:Forward()
local max = 5
local imax = 1/max
for i = 1, max do
local vectorrand = VectorRand()
local part = emitter:Add("sprites/flamelet1", pos + norm * (i * 10) )
local vel = (norm + vectorrand * 0.2):GetNormalized()
local _i = (max - i) * imax
part:SetVelocity(vel * 400)
part:SetAngleVelocity(AngleRand())
part:SetDieTime(_i * 0.2 + 0.06)
part:SetStartAlpha( 128 );
part:SetEndAlpha( 0 );
part:SetStartSize( 8 * _i * self.Scale);
part:SetGravity(Vector(0, 0, 100))
part:SetEndSize( 13 );
part:SetCollide( true );
part:SetRoll(0)
part:SetRollDelta(3)
part:SetBounce( 0.1 );
part:SetAirResistance( 5 );
part:SetMaterial(PulserPointofimpact_FractalStructure)
part:SetColor(128,128,128)
/*part = emitter:Add("sprites/flamelet"..math.random(1,4), pos + norm * i * 5)
vel = (norm + vectorrand * 0.1):GetNormalized()
part:SetVelocity(vel * 200)
part:SetAngleVelocity(AngleRand())
part:SetStartSize(5)
part:SetEndSize(0)
part:SetDieTime(lifetime)*/
end
/*for i = 1, 10 do
local part = emitter:Add("sprites/light_glow02_add", pos)
local vel = (norm + VectorRand() * 0.3):GetNormalized()
part:SetVelocity(vel * 400)
part:SetColor(255, 128, 0)
part:SetDieTime( math.Rand(0.08, 0.3) * self.Scale);
part:SetStartAlpha( 255 );
part:SetEndAlpha( 0 );
part:SetStartSize( math.Rand(0.5, 0.8) );
part:SetEndSize( 0 );
part:SetGravity( Vector( 0, 0, -100 ) );
part:SetCollide( true );
part:SetBounce( 0.3 );
part:SetAirResistance( 1 );
end*/
emitter:Finish()
end
function EFFECT:GetGoodPos()
if(!IsValid(self.Entity)) then
return Vector(0, 0, 0)
end
return self.Entity:GetAttachment(self.Attachment).Pos
end
local MRToFrance_beamSeanTyas = Material("sprites/baku_impactor")
local PPK_LoveUnlimited = Material("sprites/flamelet1")
local function mulColor(col, num)
return Color(col.r * num, col.g * num, col.b * num, col.a * num)
end
local inv_i = 1 / 7
function EFFECT:Render()
if(!IsValid(self.Entity)) then return end
local fwd = self.Entity:GetAttachment(self.Attachment).Ang:Forward()
local pos = self:GetGoodPos()
local _x = (self.DieTime - CurTime()) * inv
local _y = math.max((self.DieTime2 - CurTime()) * inv2, 0)
render.SetMaterial(MRToFrance_beamSeanTyas)
render.DrawBeam(pos, pos + fwd * _x * 30 * self.Scale, 5 * _x * self.Scale, 0.3, 1, Color(255,255,255,255))
local size = 16 * _x * self.Scale
render.DrawSprite(pos + fwd * 5, size, size, Color(255,128,0,128 * _y))
render.SetMaterial(PPK_LoveUnlimited)
local inirot = self.Scale * 180
for i = 1, 7 do
local _i = (7 - i) * inv_i
local size2 = _i * _y * 14
local pos = pos + fwd * 3 * i
local norm = EyePos() - pos
render.DrawQuadEasy(pos, norm, size2, size2, Color(255,255,255,255), inirot + i * 90)
end
end
function EFFECT:Think()
if(!IsValid(self.Entity)) then return false end
local xpos = self:GetGoodPos()
self:SetRenderBoundsWS(xpos, xpos, Vector(1,1,1) * 128)
return self.DieTime > CurTime()
end

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local lifetime = 0.3
local inverse = 1 / 0.3
function EFFECT:Init(data)
self.DieTime = CurTime() + lifetime
self.Entity = data:GetEntity()
self.Attachment = data:GetAttachment()
self.StartPos = data:GetStart() or Vector(0, 0, 0)
if(IsValid(self.Entity)) then
self.StartPos = self.Entity:GetAttachment(self.Attachment).Pos
end
self.EndPos = data:GetOrigin()
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
end
local beam = Material("sprites/bluelaser1")
function EFFECT:Render()
local size = Lerp( (self.DieTime - CurTime()) * inverse, 0, 32 )
render.SetMaterial(beam)
render.DrawBeam(self.StartPos, self.EndPos, size, 0, 1, Color(100, 100, 255))
end
function EFFECT:Think()
return self.DieTime > CurTime()
end

View File

@@ -0,0 +1,162 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local len = 400
local len2 = 400
local lifetime = 0.6
local inv = 1 / lifetime
local lifetime2 = 0.1
local inv2 = 1 / lifetime2
local imptimer = 0
local PulserPointofimpact_FractalStructure = Material("sprites/baku_impactor_smoke")
function EFFECT:Init(data)
self:SetPos(data:GetOrigin() or Vector(0, 0, 0))
self:SetRenderBounds(Vector(0, 0, 0), Vector(0, 0, 0), Vector(1,1,1) * 512)
self.DieTime = CurTime() + lifetime
self.DieTime2 = CurTime() + lifetime2
local norm = data:GetNormal() or Vector(0, 0, 1)
self.Normal = norm
local light = render.GetLightColor(self:GetPos() + norm * 5)
//LocalPlayer():ChatPrint(light:LengthSqr())
if(light:LengthSqr() < 0.01) then
local dlight = DynamicLight( LocalPlayer():EntIndex() )
if ( dlight ) then
dlight.pos = self:GetPos()
dlight.r = 255
dlight.g = 100
dlight.b = 0
dlight.brightness = 0.4
dlight.Decay = 500
dlight.Size = 128
dlight.DieTime = CurTime() + 1
end
end
util.Decal("FadingScorch", self:GetPos(), self:GetPos() - norm * 5)
local emitter = ParticleEmitter(self:GetPos(), false)
local dir = (norm + VectorRand() * 0.4):GetNormalized()
local ___x = math.random(3, 10)
for i = 1, ___x do
local vectorrand = VectorRand()
local part = emitter:Add("sprites/flamelet"..math.random(1,4), self:GetPos() + norm * i * 5)
local vel = (norm + vectorrand * 0.4):GetNormalized()
part:SetVelocity(vel * 200)
part:SetAngleVelocity(AngleRand())
part:SetStartSize(10)
part:SetEndSize(0)
part:SetDieTime(0.2)
local dietime
vel = (dir + vectorrand * 0.3):GetNormalized()
part = emitter:Add( "sprites/light_glow02_add", self:GetPos() + norm * 2 );
if(___x > 7 && i > 4) then
dietime = math.random( 4, 6 )
part:SetNextThink(CurTime())
part:SetThinkFunction(function(p)
local _y_ = p:GetLifeTime() / p:GetDieTime()
local col = LerpVector(_y_ * (0.7 + math.sin(CurTime() * 5) * 0.3), Vector(255, 170, 0), Vector(255, 0, 0))
p:SetColor(col.x, col.y, col.z)
p:SetNextThink(CurTime())
end)
part:SetStartAlpha( 255 );
part:SetEndAlpha( 0 );
part:SetStartSize( math.random(1, 10) );
part:SetEndSize( 0 );
part:SetRoll( 0 );
part:SetGravity( Vector( 0, 0, -1000 ) );
part:SetVelocity( vel * 300);
else
part:SetColor(255, 128, 0)
dietime = math.Rand(0.5, 0.8)
part:SetStartAlpha( 255 );
part:SetEndAlpha( 0 );
part:SetStartSize( math.random(1, 5) );
part:SetEndSize( 0 );
part:SetRoll( 0 );
part:SetGravity( Vector( 0, 0, -200 ) );
part:SetVelocity( vel * 500);
end
part:SetDieTime( dietime );
part:SetCollide( true );
part:SetBounce( 0.3 );
part:SetAirResistance( 5 );
end
local max = 5
local imax = 1/max
for i = 1, max do
local vectorrand = VectorRand()
local part = emitter:Add("sprites/flamelet1", self:GetPos() + norm * (30 + i * 10) )
local vel = (norm + vectorrand * 0.4):GetNormalized()
local _i = (max - i) * imax
part:SetVelocity(vel * 200)
part:SetAngleVelocity(AngleRand())
part:SetDieTime(_i * 0.3 + 0.2)
part:SetStartAlpha( 128 );
part:SetEndAlpha( 0 );
part:SetStartSize( 48 * _i);
part:SetEndSize( 13 );
part:SetCollide( true );
part:SetRoll(0)
part:SetRollDelta(3)
part:SetBounce( 0.1 );
part:SetAirResistance( 5 );
part:SetMaterial(PulserPointofimpact_FractalStructure)
part:SetColor(128,128,128)
end
emitter:Finish()
if(imptimer < CurTime()) then
local rand = math.random(1,3)
sound.Play("weapons/debris" .. rand .. ".wav", self:GetPos())
imptimer = CurTime() + rand * 0.3
end
end
local MRToFrance_beamSeanTyas = Material("sprites/baku_impactor")
local mat = Material("sprites/light_glow02_add")
function EFFECT:Render()
local _y = (math.max(0, (self.DieTime - CurTime()) * inv))
local _y2 = (math.max(0, (self.DieTime2 - CurTime()) * inv2))
local __x = (math.sin(CurTime() * 20) * 0.5 + 1)
local size = _y * 128
local size2 = _y2 * 48
render.SetMaterial(MRToFrance_beamSeanTyas)
//render.DrawSprite(self:GetPos(), size * __x, size * __x, Color(255,128,0,size))
render.DrawBeam(self:GetPos(), self:GetPos() + self.Normal * size2, 16, 0.9, 0, Color(255,255,255,_y2 * 255))
render.SetMaterial(mat)
render.DrawQuadEasy(self:GetPos(), self.Normal, _y * 90, _y * 90, Color(255,128,0,_y2 * 255))
end
function EFFECT:Think()
return self.DieTime > CurTime()
end

View File

@@ -0,0 +1,78 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local lifetime = 0.2
local inverse = 1 / lifetime
function EFFECT:Init(data)
self.DieTime = CurTime() + lifetime
self.Entity = data:GetEntity()
self.Attachment = data:GetAttachment()
self.StartPos = data:GetStart() or Vector(0, 0, 0)
self.Scale = 1
if(IsValid(self.Entity)) then
self.StartPos = self.Entity:GetAttachment(self.Attachment).Pos
end
self.EndPos = data:GetOrigin()
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
local flags = data:GetFlags()
local dontdrawbeam = bit.band(flags, 4) > 0
self.Beam = {}
if(!dontdrawbeam) then
for i = 1, math.random(1, 3) do
local beam = {}
beam[1] = self.StartPos
local breaks = math.max(self.EndPos:Distance(self.StartPos) / (300), 3)
for i = 2, breaks do
local x_ = LerpVector( (i - 1) / breaks, self.StartPos, self.EndPos)
beam[i] = x_
end
beam[#beam + 1] = self.EndPos
self.Beam[i] = beam
end
end
end
local beam = CreateMaterial("baku_jeep_tracer", "UnlitGeneric", { ["$basetexture"] = "sprites/laserbeam", ["$vertexcolor"] = 1,
["$vertexalpha"] = 1,
["$additive"] = 1, })
function EFFECT:Render()
local size = Lerp( (self.DieTime - CurTime()) * inverse, 0, 16 * self.Scale )
render.SetMaterial(beam)
render.DrawBeam(self.StartPos, self.EndPos, size, 0, 1, Color(255, 185, 40))
for k, v in pairs(self.Beam) do
render.StartBeam(#v)
render.AddBeam(v[1], size * 0.2, 0, Color(255, 255, 255))
for i = 2, #v - 2 do
render.AddBeam(v[i] + VectorRand() * 5, size * 0.2, 0, Color(255, 255, 255))
end
render.AddBeam(v[#v], size * 0.2, 0, Color(255, 255, 255))
render.EndBeam()
end
end
function EFFECT:Think()
return self.DieTime > CurTime()
end

View File

@@ -0,0 +1,77 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.Mat = Material("trails/laser")
function EFFECT:Init(data)
self.Entity = data:GetEntity()
self.Attach = data:GetAttachment()
self.EndPos = data:GetOrigin()
self.Normal = data:GetNormal()
self.Scale = data:GetScale()
self.Color = Color(150, 100, 255)
self.Alpha = 150
local dynlight = DynamicLight(0)
dynlight.Pos = self.EndPos + self.Normal * 10
dynlight.Size = 350
dynlight.Brightness = 1
dynlight.Decay = 3000
dynlight.R = self.Color.r
dynlight.G = self.Color.g
dynlight.B = self.Color.b
dynlight.DieTime = CurTime() + 0.1
if not IsValid(self.Entity) then
return
end
dynlight = DynamicLight(0)
dynlight.Pos = self.Entity:GetAttachment(self.Attach).Pos
dynlight.Size = 350
dynlight.Brightness = 1
dynlight.Decay = 3000
dynlight.R = self.Color.r
dynlight.G = self.Color.g
dynlight.B = self.Color.b
dynlight.DieTime = CurTime() + 0.1
end
function EFFECT:Think()
self.Alpha = self.Alpha - FrameTime() * 2048
if self.Alpha < 0 then
return false
end
return true
end
function EFFECT:Render()
if not IsValid(self.Entity) then
return
end
if self.Alpha < 1 then
return
end
local start = self.Entity:GetAttachment(self.Attach).Pos
local length = (start - self.EndPos):Length()
local texcoord = math.Rand(0, 1)
local col = Color(150, 100, 255)
self:SetRenderBoundsWS(start, self.EndPos)
render.SetMaterial(self.Mat)
render.DrawBeam(start, self.EndPos, self.Scale, texcoord, texcoord + length / 128, col)
end

View File

@@ -0,0 +1,39 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.MatBeam = Material( "effects/gunshiptracer" )
function EFFECT:Init( data )
local pos = data:GetOrigin()
local dir = data:GetNormal()
self.ID = data:GetMaterialIndex()
self:SetRenderBoundsWS( pos, pos + dir * 50000 )
end
function EFFECT:Think()
if not LVS:GetBullet( self.ID ) then return false end
return true
end
function EFFECT:Render()
local bullet = LVS:GetBullet( self.ID )
local endpos = bullet:GetPos()
local dir = bullet:GetDir()
local len = 500 * bullet:GetLength()
render.SetMaterial( self.MatBeam )
render.DrawBeam( endpos + dir * len, endpos - dir * len, 10, 1, 0, Color( 255, 255, 255, 255 ) )
end

View File

@@ -0,0 +1,120 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.SmokeMat = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
EFFECT.DustMat = {
"effects/lvs_base/particle_debris_01",
"effects/lvs_base/particle_debris_02",
}
function EFFECT:Init( data )
local pos = data:GetOrigin()
local dir = data:GetNormal()
local scale = data:GetMagnitude()
sound.Play( "physics/flesh/flesh_strider_impact_bullet"..math.random(1,3)..".wav", pos, 85, math.random(180,200) + 55 * math.max(1 - scale,0), 0.75 )
sound.Play( "ambient/materials/rock"..math.random(1,5)..".wav", pos, 75, 180, 1 )
local emitter = ParticleEmitter( pos, false )
local VecCol = (render.GetLightColor( pos + dir ) * 0.5 + Vector(0.2,0.18,0.15)) * 255
local DieTime = math.Rand(0.8,1.6)
if dir.z > 0.85 then
for i = 1, 10 do
for n = 0,6 do
local particle = emitter:Add( self.DustMat[ math.random(1,#self.DustMat) ] , pos )
if not particle then continue end
particle:SetVelocity( (dir * 50 * i + VectorRand() * 25) * scale )
particle:SetDieTime( (i / 8) * DieTime )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 * scale )
particle:SetEndSize( 20 * i * scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,-600) * scale )
particle:SetCollide( false )
end
end
for i = 1, 10 do
local particle = emitter:Add( self.SmokeMat[ math.random(1,#self.SmokeMat) ] , pos )
if not particle then continue end
particle:SetVelocity( (dir * 50 * i + VectorRand() * 40) * scale )
particle:SetDieTime( (i / 8) * DieTime )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 * scale )
particle:SetEndSize( 20 * i * scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,-600) * scale )
particle:SetCollide( false )
end
end
for i = 1,12 do
local particle = emitter:Add( self.SmokeMat[ math.random(1,#self.SmokeMat) ] , pos )
if particle then
local ang = i * 30
local X = math.cos( math.rad(ang) )
local Y = math.sin( math.rad(ang) )
local Vel = Vector(X,Y,0) * math.Rand(200,1600) + Vector(0,0,50)
Vel:Rotate( dir:Angle() + Angle(90,0,0) )
particle:SetVelocity( Vel * scale )
particle:SetDieTime( DieTime )
particle:SetAirResistance( 500 )
particle:SetStartAlpha( 100 )
particle:SetStartSize( 40 * scale )
particle:SetEndSize( 200 * scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,60) * scale )
particle:SetCollide( true )
end
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,264 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.GlowMat = Material( "sprites/light_glow02_add" )
EFFECT.SmokeMat = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
EFFECT.DustMat = {
"effects/lvs_base/particle_debris_01",
"effects/lvs_base/particle_debris_02",
}
EFFECT.DecalMat = Material( util.DecalMaterial( "Scorch" ) )
function EFFECT:Init( data )
self.Dir = Vector(0,0,1)
self.Pos = data:GetOrigin()
self.LifeTime = 0.35
self.DieTime = CurTime() + self.LifeTime
local scale = data:GetMagnitude() * 0.5
self.Scale = 3 * scale
local emitter = ParticleEmitter( self.Pos, false )
local VecCol = (render.GetLightColor( self.Pos + self.Dir ) * 0.5 + Vector(0.1,0.09,0.075)) * 255
local DieTime = math.Rand(0.8,1.6)
local traceSky = util.TraceLine( {
start = self.Pos,
endpos = self.Pos + Vector(0,0,50000),
filter = self,
} )
local traceWater = util.TraceLine( {
start = traceSky.HitPos,
endpos = self.Pos - Vector(0,0,100),
filter = self,
mask = MASK_WATER,
} )
if traceWater.Hit then
local effectdata = EffectData()
effectdata:SetOrigin( traceWater.HitPos )
effectdata:SetScale( 100 )
effectdata:SetFlags( 2 )
util.Effect( "WaterSplash", effectdata, true, true )
end
local Pos = self.Pos
local Dist = (traceWater.HitPos - Pos):Length()
local ply = LocalPlayer():GetViewEntity()
if not IsValid( ply ) then return end
local delay = (Pos - ply:GetPos()):Length() / 13503.9
if traceWater.Hit and Dist > 150 then
timer.Simple( delay, function()
local effectdata = EffectData()
effectdata:SetOrigin( Pos )
util.Effect( "WaterSurfaceExplosion", effectdata, true, true )
end )
if Dist > 300 then return end
else
timer.Simple( delay, function()
sound.Play( "LVS.BULLET_EXPLOSION", Pos )
sound.Play( "LVS.BULLET_EXPLOSION_DYNAMIC", Pos )
end )
local trace = util.TraceLine( {
start = self.Pos + Vector(0,0,100),
endpos = self.Pos - Vector(0,0,100),
mask = MASK_SOLID_BRUSHONLY,
} )
if trace.Hit and not trace.HitNonWorld then
util.DecalEx( self.DecalMat, trace.Entity, trace.HitPos + trace.HitNormal, trace.HitNormal, Color(255,255,255,255), self.Scale * 2.5, self.Scale * 2.5 )
end
end
for i = 1, 10 do
for n = 0,6 do
local particle = emitter:Add( self.DustMat[ math.random(1,#self.DustMat) ], self.Pos )
if not particle then continue end
particle:SetVelocity( (self.Dir * 50 * i + VectorRand() * 25) * self.Scale )
particle:SetDieTime( (i / 8) * DieTime )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 * self.Scale )
particle:SetEndSize( 20 * i * self.Scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,-600) * self.Scale )
particle:SetCollide( false )
end
end
for i = 1, 10 do
local particle = emitter:Add( self.SmokeMat[ math.random(1,#self.SmokeMat) ], self.Pos )
if not particle then continue end
particle:SetVelocity( (self.Dir * 50 * i + VectorRand() * 40) * self.Scale )
particle:SetDieTime( (i / 8) * DieTime )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 * self.Scale )
particle:SetEndSize( 20 * i * self.Scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,-600) * self.Scale )
particle:SetCollide( false )
end
for i = 1,24 do
local particle = emitter:Add( self.SmokeMat[ math.random(1,#self.SmokeMat) ] , self.Pos )
if particle then
local ang = i * 15
local X = math.cos( math.rad(ang) )
local Y = math.sin( math.rad(ang) )
local Vel = Vector(X,Y,0) * math.Rand(1500,2000)
particle:SetVelocity( Vel * self.Scale )
particle:SetDieTime( math.Rand(1,3) )
particle:SetAirResistance( 600 )
particle:SetStartAlpha( 100 )
particle:SetStartSize( 40 * self.Scale )
particle:SetEndSize( 200 * self.Scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,60) * self.Scale )
particle:SetCollide( true )
end
end
for i = 0, 15 do
local particle = emitter:Add( self.SmokeMat[ math.random(1, #self.SmokeMat ) ], self.Pos )
if particle then
particle:SetVelocity( VectorRand(-1,1) * 1000 * scale )
particle:SetDieTime( math.Rand(2,3) )
particle:SetAirResistance( 200 )
particle:SetStartAlpha( 100 )
particle:SetStartSize( 200 * scale )
particle:SetEndSize( 600 * scale )
particle:SetRoll( math.Rand(-1,1) )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector( 0, 0, -600 ) * scale )
particle:SetCollide( false )
end
end
for i = 0, 15 do
local particle = emitter:Add( "effects/lvs_base/flamelet"..math.random(1,5), self.Pos )
if particle then
particle:SetVelocity( VectorRand(-1,1) * 500 * scale )
particle:SetDieTime( math.Rand(0.15,0.3) )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 25 * scale )
particle:SetEndSize( math.Rand(70,100) * scale )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
for i = 0, 20 do
local particle = emitter:Add( "sprites/rico1", self.Pos )
local vel = VectorRand() * 800
if particle then
particle:SetVelocity( vel * scale )
particle:SetAngles( vel:Angle() + Angle(0,90,0) )
particle:SetDieTime( math.Rand(0.2,0.4) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.Rand(20,40) * scale )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-100,100) )
particle:SetRollDelta( 0 )
particle:SetColor( 255, 255, 255 )
particle:SetAirResistance( 0 )
end
end
emitter:Finish()
end
function EFFECT:Explosion( pos , scale )
local emitter = ParticleEmitter( pos, false )
if not IsValid( emitter ) then return end
for i = 0, 40 do
local particle = emitter:Add( "particles/flamelet"..math.random(1,5), pos )
if particle then
particle:SetVelocity( VectorRand() * 1500 * scale )
particle:SetDieTime( 0.2 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 20 * scale )
particle:SetEndSize( math.Rand(180,240) * scale )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
emitter:Finish()
end
function EFFECT:Think()
if self.DieTime < CurTime() then return false end
return true
end
function EFFECT:Render()
if not self.Scale then return end
local Scale = (self.DieTime - CurTime()) / self.LifeTime
local R1 = 600 * self.Scale
render.SetMaterial( self.GlowMat )
render.DrawSprite( self.Pos, R1 * Scale, R1 * Scale, Color( 255, 200, 150, 255) )
end

View File

@@ -0,0 +1,63 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local Pos = data:GetOrigin() + VectorRand() * 25
local Ent = data:GetEntity()
if not IsValid( Ent ) then return end
local emitter = Ent:GetParticleEmitter( Pos )
if not IsValid( emitter ) then return end
local particle = emitter:Add( Materials[ math.random(1, #Materials ) ], Pos )
if particle then
particle:SetVelocity( VectorRand() * 100 )
particle:SetDieTime( 2 )
particle:SetAirResistance( 600 )
particle:SetStartAlpha( 50 )
particle:SetStartSize( 60 )
particle:SetEndSize( 200 )
particle:SetRoll( math.Rand(-1,1) * math.pi )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( 60, 60, 60 )
particle:SetGravity( Vector( 0, 0, 600 ) )
particle:SetCollide( false )
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,69 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Dir = data:GetNormal()
local Ent = data:GetEntity()
local Scale = data:GetMagnitude()
if not IsValid( Ent ) then return end
local Vel = Ent:GetVelocity()
local emitter = Ent:GetParticleEmitter( Pos )
if not IsValid( emitter ) then return end
local particle = emitter:Add( Materials[ math.random(1, #Materials ) ], Pos )
if not particle then return end
local Col = 100 - 60 * Scale
particle:SetVelocity( Vel + Dir * (100 + 50 * Scale) )
particle:SetDieTime( 0.4 - 0.3 * Scale )
particle:SetAirResistance( 400 )
particle:SetStartAlpha( 80 )
particle:SetStartSize( 2 )
particle:SetEndSize( 10 + 20 * Scale )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetRollDelta( math.Rand( -1, 1 ) * 2 )
particle:SetColor( Col, Col, Col )
particle:SetGravity( Vector( 0, 0, 10 ) )
particle:SetCollide( false )
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,62 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Dir = data:GetNormal()
local Ent = data:GetEntity()
local Scale = data:GetMagnitude()
if not IsValid( Ent ) then return end
local emitter = Ent:GetParticleEmitter( Pos )
if not IsValid( emitter ) then return end
local particle = emitter:Add( "effects/lvs_base/fire", Pos )
if particle then
particle:SetVelocity( Dir * 70 )
particle:SetDieTime( 0.2 )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 + 18 * Scale )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-1,1) * 180 )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
for i = 1, 3 do
local particle = emitter:Add( "effects/lvs_base/flamelet"..math.random(1,5), Pos )
if particle then
particle:SetVelocity( Dir * 40 * i )
particle:SetDieTime( 0.2 )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( (5 + 5 * Scale) - i )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-1,1) * 180 )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,188 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
EFFECT.DecalMat = Material( util.DecalMaterial( "Scorch" ) )
function EFFECT:Init( data )
local Pos = data:GetOrigin()
self.DieTime = CurTime() + 1
self:Explosion( Pos, 2 )
local ply = LocalPlayer():GetViewEntity()
if IsValid( ply ) then
local delay = (Pos - ply:GetPos()):Length() / 13503.9
timer.Simple( delay, function()
sound.Play( "LVS.DYNAMIC_EXPLOSION", Pos )
end )
else
sound.Play( "LVS.DYNAMIC_EXPLOSION", Pos )
end
for i = 1, 20 do
timer.Simple(math.Rand(0,0.01) * i, function()
if IsValid( self ) then
local p = Pos + VectorRand() * 10 * i
self:Explosion( p, math.Rand(0.5,0.8) )
end
end)
end
self:Debris( Pos )
local traceSky = util.TraceLine( {
start = Pos,
endpos = Pos + Vector(0,0,50000),
mask = MASK_SOLID_BRUSHONLY,
} )
local traceWater = util.TraceLine( {
start = traceSky.HitPos,
endpos = Pos - Vector(0,0,100),
mask = MASK_WATER,
} )
if traceWater.Hit then
local effectdata = EffectData()
effectdata:SetOrigin( traceWater.HitPos )
effectdata:SetScale( 100 )
effectdata:SetFlags( 2 )
util.Effect( "WaterSplash", effectdata, true, true )
else
local trace = util.TraceLine( {
start = Pos + Vector(0,0,100),
endpos = Pos - Vector(0,0,100),
mask = MASK_SOLID_BRUSHONLY,
} )
if trace.Hit and not trace.HitNonWorld then
for i = 1, 10 do
local StartPos = trace.HitPos + Vector(math.random(-25,25) * i,math.random(-25,25) * i,0)
local decalTrace = util.TraceLine( {
start = StartPos + Vector(0,0,100),
endpos = StartPos - Vector(0,0,100),
mask = MASK_SOLID_BRUSHONLY,
} )
util.DecalEx( self.DecalMat, trace.Entity, decalTrace.HitPos + decalTrace.HitNormal, decalTrace.HitNormal, Color(255,255,255,255), math.Rand(2,3), math.Rand(2,3) )
end
end
end
end
function EFFECT:Debris( pos )
local emitter = ParticleEmitter( pos, false )
if not IsValid( emitter ) then return end
for i = 0,60 do
local particle = emitter:Add( "effects/fleck_tile"..math.random(1,2), pos )
local vel = VectorRand() * math.Rand(200,600)
vel.z = math.Rand(200,600)
if particle then
particle:SetVelocity( vel )
particle:SetDieTime( math.Rand(10,15) )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 5 )
particle:SetEndSize( 5 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 0,0,0 )
particle:SetGravity( Vector( 0, 0, -600 ) )
particle:SetCollide( true )
particle:SetBounce( 0.3 )
end
end
emitter:Finish()
end
function EFFECT:Explosion( pos , scale )
local emitter = ParticleEmitter( pos, false )
if not IsValid( emitter ) then return end
for i = 0,10 do
local particle = emitter:Add( Materials[ math.random(1, #Materials ) ], pos )
if particle then
particle:SetVelocity( VectorRand() * 1500 * scale )
particle:SetDieTime( math.Rand(0.75,1.5) * scale )
particle:SetAirResistance( math.Rand(200,600) )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.Rand(60,120) * scale )
particle:SetEndSize( math.Rand(220,320) * scale )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 40,40,40 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
end
for i = 0, 40 do
local particle = emitter:Add( "particles/flamelet"..math.random(1,5), pos )
if particle then
particle:SetVelocity( VectorRand() * 1500 * scale )
particle:SetDieTime( 0.2 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 20 * scale )
particle:SetEndSize( math.Rand(180,240) * scale )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
emitter:Finish()
local dlight = DynamicLight( math.random(0,9999) )
if dlight then
dlight.pos = pos
dlight.r = 255
dlight.g = 180
dlight.b = 100
dlight.brightness = 8
dlight.Decay = 2000
dlight.Size = 300
dlight.DieTime = CurTime() + 1
end
end
function EFFECT:Think()
if CurTime() < self.DieTime then return true end
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,307 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.GlowMat = Material( "sprites/light_glow02_add" )
EFFECT.SmokeMat = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
EFFECT.DustMat = {
"effects/lvs_base/particle_debris_01",
"effects/lvs_base/particle_debris_02",
}
EFFECT.DecalMat = Material( util.DecalMaterial( "Scorch" ) )
function EFFECT:Init( data )
self.Dir = Vector(0,0,1)
self.Pos = data:GetOrigin()
self.LifeTime = 0.35
self.DieTime = CurTime() + self.LifeTime
local scale = 3
local emitter = ParticleEmitter( self.Pos, false )
local VecCol = (render.GetLightColor( self.Pos + self.Dir ) * 0.5 + Vector(0.1,0.09,0.075)) * 255
local DieTime = math.Rand(0.8,1.6)
local traceSky = util.TraceLine( {
start = self.Pos,
endpos = self.Pos + Vector(0,0,50000),
filter = self,
} )
local traceWater = util.TraceLine( {
start = traceSky.HitPos,
endpos = self.Pos - Vector(0,0,100),
filter = self,
mask = MASK_WATER,
} )
if traceWater.Hit then
local effectdata = EffectData()
effectdata:SetOrigin( traceWater.HitPos )
effectdata:SetScale( 100 )
effectdata:SetFlags( 2 )
util.Effect( "WaterSplash", effectdata, true, true )
else
local trace = util.TraceLine( {
start = self.Pos + Vector(0,0,100),
endpos = self.Pos - Vector(0,0,100),
} )
if trace.Hit and not trace.HitNonWorld then
for i = 1, 3 do
local StartPos = trace.HitPos + Vector(math.random(-200,200),math.random(-200,200),0)
local decalTrace = util.TraceLine( {
start = StartPos + Vector(0,0,100),
endpos = StartPos - Vector(0,0,100),
} )
util.DecalEx( self.DecalMat, trace.Entity, decalTrace.HitPos + decalTrace.HitNormal, decalTrace.HitNormal, Color(255,255,255,255), math.Rand(3,6), math.Rand(3,6) )
end
end
end
local Pos = self.Pos
local Dist = (traceWater.HitPos - Pos):Length()
local ply = LocalPlayer():GetViewEntity()
if not IsValid( ply ) then return end
local delay = (Pos - ply:GetPos()):Length() / 13503.9
if traceWater.Hit and Dist > 150 then
timer.Simple( delay, function()
local effectdata = EffectData()
effectdata:SetOrigin( Pos )
util.Effect( "WaterSurfaceExplosion", effectdata, true, true )
end )
if Dist > 300 then return end
else
timer.Simple( delay, function()
sound.Play( "LVS.BOMB_EXPLOSION", Pos )
sound.Play( "LVS.BOMB_EXPLOSION_DYNAMIC", Pos )
end )
end
for i = 1, 10 do
for n = 0,6 do
local particle = emitter:Add( self.DustMat[ math.random(1,#self.DustMat) ], self.Pos )
if not particle then continue end
particle:SetVelocity( (self.Dir * 50 * i + VectorRand() * 25) * scale )
particle:SetDieTime( (i / 8) * DieTime )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 * scale )
particle:SetEndSize( 20 * i * scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( VecCol.r, VecCol.g, VecCol.b )
particle:SetGravity( Vector(0,0,-600) * scale )
particle:SetCollide( false )
end
end
for i = 1, 10 do
local particle = emitter:Add( self.SmokeMat[ math.random(1,#self.SmokeMat) ], self.Pos )
if not particle then continue end
particle:SetVelocity( (self.Dir * 50 * i + VectorRand() * 40) * scale )
particle:SetDieTime( (i / 8) * DieTime )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 * scale )
particle:SetEndSize( 20 * i * scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( VecCol.r, VecCol.g, VecCol.b )
particle:SetGravity( Vector(0,0,-600) * scale )
particle:SetCollide( false )
end
for i = 1,24 do
local particle = emitter:Add( self.SmokeMat[ math.random(1,#self.SmokeMat) ] , self.Pos )
if particle then
local ang = i * 15
local X = math.cos( math.rad(ang) )
local Y = math.sin( math.rad(ang) )
local Vel = Vector(X,Y,0) * math.Rand(1500,2000)
particle:SetVelocity( Vel * scale )
particle:SetDieTime( math.Rand(1,3) )
particle:SetAirResistance( 600 )
particle:SetStartAlpha( 100 )
particle:SetStartSize( 40 * scale )
particle:SetEndSize( 200 * scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( VecCol.r, VecCol.g, VecCol.b )
particle:SetGravity( Vector(0,0,60) * scale )
particle:SetCollide( true )
end
end
for i = 0, 15 do
local particle = emitter:Add( self.SmokeMat[ math.random(1, #self.SmokeMat ) ], self.Pos )
if particle then
particle:SetVelocity( VectorRand(-1,1) * 1000 )
particle:SetDieTime( math.Rand(2,3) )
particle:SetAirResistance( 200 )
particle:SetStartAlpha( 100 )
particle:SetStartSize( 200 )
particle:SetEndSize( 600 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( VecCol.r, VecCol.g, VecCol.b )
particle:SetGravity( Vector( 0, 0, -600 ) )
particle:SetCollide( false )
end
end
for i = 0, 15 do
local particle = emitter:Add( "effects/lvs_base/flamelet"..math.random(1,5), self.Pos )
if particle then
particle:SetVelocity( VectorRand(-1,1) * 500 )
particle:SetDieTime( math.Rand(0.15,0.3) )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 25 )
particle:SetEndSize( math.Rand(70,100) )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
for i = 0, 20 do
local particle = emitter:Add( "sprites/rico1", self.Pos )
local vel = VectorRand() * 800
if particle then
particle:SetVelocity( vel )
particle:SetAngles( vel:Angle() + Angle(0,90,0) )
particle:SetDieTime( math.Rand(0.2,0.4) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.Rand(20,40) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-100,100) )
particle:SetRollDelta( 0 )
particle:SetColor( 255, 255, 255 )
particle:SetAirResistance( 0 )
end
end
for i = 0,60 do
local particle = emitter:Add( "effects/fleck_tile"..math.random(1,2), self.Pos )
local vel = VectorRand() * math.Rand(800,1600)
vel.z = math.Rand(1000,4000)
if particle then
particle:SetVelocity( vel )
particle:SetDieTime( math.random(5,15) )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 5 )
particle:SetEndSize( 5 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 0,0,0 )
particle:SetGravity( Vector( 0, 0, -2000 ) )
particle:SetCollide( true )
particle:SetBounce( 0.3 )
end
end
emitter:Finish()
end
function EFFECT:Explosion( pos , scale )
local emitter = ParticleEmitter( pos, false )
if not IsValid( emitter ) then return end
for i = 0, 40 do
local particle = emitter:Add( "particles/flamelet"..math.random(1,5), pos )
if particle then
particle:SetVelocity( VectorRand() * 1500 * scale )
particle:SetDieTime( 0.2 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 20 * scale )
particle:SetEndSize( math.Rand(180,240) * scale )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
emitter:Finish()
local dlight = DynamicLight( math.random(0,9999) )
if dlight then
dlight.pos = pos
dlight.r = 255
dlight.g = 180
dlight.b = 100
dlight.brightness = 8
dlight.Decay = 2000
dlight.Size = 300
dlight.DieTime = CurTime() + 1
end
end
function EFFECT:Think()
if self.DieTime < CurTime() then return false end
return true
end
function EFFECT:Render()
local Scale = (self.DieTime - CurTime()) / self.LifeTime
render.SetMaterial( self.GlowMat )
render.DrawSprite( self.Pos, 2000 * Scale, 2000 * Scale, Color( 255, 200, 150, 255) )
local Scale = (self.DieTime - self.LifeTime + 0.25 - CurTime()) / 0.25
local InvScale = 1 - Scale
if Scale > 0 then
render.SetColorMaterial()
render.DrawSphere( self.Pos, -450 * InvScale, 30,30, Color( 255, 200, 150, 150 * (Scale ^ 2) ) )
render.DrawSphere( self.Pos, -500 * InvScale, 30,30, Color( 255, 200, 150, 100 * (Scale ^ 2) ) )
render.DrawSphere( self.Pos, -550 * InvScale, 30,30, Color( 255, 200, 150, 25 * (Scale ^ 2) ) )
render.DrawSphere( self.Pos, 600 * InvScale, 30,30, Color( 255, 200, 150, 25 * (Scale ^ 2) ) )
end
end

View File

@@ -0,0 +1,102 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local Pos = data:GetOrigin()
self:Explosion( Pos, 2 )
local ply = LocalPlayer():GetViewEntity()
if IsValid( ply ) then
local delay = (Pos - ply:GetPos()):Length() / 13503.9
timer.Simple( delay, function()
sound.Play( "LVS.EXPLOSION", Pos )
end )
else
sound.Play( "LVS.EXPLOSION", Pos )
end
for i = 1, 20 do
timer.Simple(math.Rand(0,0.01) * i, function()
if not IsValid( self ) then return end
local p = Pos + VectorRand() * 10 * i
self:Explosion( p, math.Rand(0.5,0.8) )
end)
end
end
function EFFECT:Explosion( pos , scale )
local emitter = ParticleEmitter( pos, false )
if not IsValid( emitter ) then return end
for i = 0,10 do
local particle = emitter:Add( Materials[ math.random(1, #Materials ) ], pos )
if not particle then continue end
particle:SetVelocity( VectorRand() * 1000 * scale )
particle:SetDieTime( math.Rand(0.75,1.5) * scale )
particle:SetAirResistance( math.Rand(200,600) )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.Rand(60,120) * scale )
particle:SetEndSize( math.Rand(160,280) * scale )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 40,40,40 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
for i = 0, 40 do
local particle = emitter:Add( "effects/lvs_base/flamelet"..math.random(1,5), pos )
if not particle then continue end
particle:SetVelocity( VectorRand() * 1000 * scale )
particle:SetDieTime( 0.14 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 * scale )
particle:SetEndSize( math.Rand(60,120) * scale )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,122 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local GlowMat = Material( "sprites/light_glow02_add" )
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
self.Pos = data:GetOrigin()
self.LifeTime = 0.35
self.DieTime = CurTime() + self.LifeTime
local emitter = ParticleEmitter( self.Pos, false )
for i = 0, 15 do
local particle = emitter:Add( Materials[ math.random(1, #Materials ) ], self.Pos )
if particle then
particle:SetVelocity( VectorRand(-1,1) * 1000 )
particle:SetDieTime( math.Rand(2,3) )
particle:SetAirResistance( math.Rand(200,600) )
particle:SetStartAlpha( 200 )
particle:SetStartSize( 120 )
particle:SetEndSize( 300 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( 50,50,50 )
particle:SetGravity( Vector( 0, 0, 600 ) )
particle:SetCollide( false )
end
end
for i = 0, 15 do
local particle = emitter:Add( "effects/lvs_base/flamelet"..math.random(1,5), self.Pos )
if particle then
particle:SetVelocity( VectorRand(-1,1) * 500 )
particle:SetDieTime( math.Rand(0.15,0.3) )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 25 )
particle:SetEndSize( math.Rand(70,100) )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
for i = 0, 20 do
local particle = emitter:Add( "sprites/rico1", self.Pos )
local vel = VectorRand() * 800
if particle then
particle:SetVelocity( vel )
particle:SetAngles( vel:Angle() + Angle(0,90,0) )
particle:SetDieTime( math.Rand(0.2,0.4) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.Rand(20,40) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-100,100) )
particle:SetRollDelta( 0 )
particle:SetColor( 255, 255, 255 )
particle:SetAirResistance( 0 )
end
end
emitter:Finish()
local Pos = self.Pos
local ply = LocalPlayer():GetViewEntity()
if IsValid( ply ) then
local delay = (Pos - ply:GetPos()):Length() / 13503.9
if delay <= 0.11 then
sound.Play( "ambient/explosions/explode_9.wav", Pos, 85, 100, 1 - delay * 8 )
end
timer.Simple( delay, function()
sound.Play( "LVS.MISSILE_EXPLOSION", Pos )
end )
else
sound.Play( "LVS.MISSILE_EXPLOSION", Pos )
end
end
function EFFECT:Think()
if self.DieTime < CurTime() then return false end
return true
end
function EFFECT:Render()
local Scale = (self.DieTime - CurTime()) / self.LifeTime
render.SetMaterial( GlowMat )
render.DrawSprite( self.Pos, 2000 * Scale, 2000 * Scale, Color( 255, 200, 150, 255) )
end

View File

@@ -0,0 +1,121 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
self.Entity = data:GetEntity()
self.Scale = data:GetScale()
self.DieTime = CurTime() + data:GetMagnitude()
self.Pos = data:GetStart()
if not IsValid( self.Entity ) then return end
self.Emitter = ParticleEmitter( self.Entity:LocalToWorld( self.Pos ), false )
end
function EFFECT:Think()
if IsValid( self.Entity ) then
local Pos = self.Entity:LocalToWorld( self.Pos )
local T = CurTime()
if (self.nextDFX or 0) < T then
self.nextDFX = T + 0.05
if self.Emitter then
local particle = self.Emitter:Add( Materials[ math.random(1, #Materials ) ], Pos )
if particle then
particle:SetVelocity( VectorRand() * 100 * self.Scale )
particle:SetDieTime( 3 )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 150 )
particle:SetStartSize( 150 * self.Scale )
particle:SetEndSize( math.Rand(200,300) * self.Scale )
particle:SetRoll( math.Rand(-1,1) * 100 )
particle:SetColor( 40,40,40 )
particle:SetGravity( Vector( 0, 0, 0 ) )
particle:SetCollide( false )
end
local particle = self.Emitter:Add( "effects/lvs_base/fire", Pos )
if particle then
particle:SetVelocity( VectorRand() * 100 * self.Scale )
particle:SetDieTime( math.random(40,80) / 100 )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 130 * self.Scale )
particle:SetEndSize( math.Rand(50,100) * self.Scale )
particle:SetRoll( math.Rand(-1,1) * 180 )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 70 ) )
particle:SetCollide( false )
end
for i = 0,3 do
local particle = self.Emitter:Add( "effects/lvs_base/flamelet"..math.random(1,5), Pos + VectorRand() * 100 * self.Scale )
if particle then
particle:SetVelocity( VectorRand() * 100 * self.Scale )
particle:SetDieTime( math.random(30,60) / 100 )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 70 * self.Scale )
particle:SetEndSize( math.Rand(25,80) * self.Scale )
particle:SetRoll( math.Rand(-1,1) * 180 )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 40 ) )
particle:SetCollide( false )
end
end
end
end
if self.DieTime < CurTime() then
if self.Emitter then
self.Emitter:Finish()
end
return false
end
return true
end
if self.Emitter then
self.Emitter:Finish()
end
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,137 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.Offset = Vector(-8,0,0)
local GlowMat = Material( "sprites/light_glow02_add" )
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
self.Entity = data:GetEntity()
if IsValid( self.Entity ) then
self.OldPos = self.Entity:LocalToWorld( self.Offset )
self.Emitter = ParticleEmitter( self.Entity:LocalToWorld( self.OldPos ), false )
end
end
function EFFECT:doFX( pos )
if not IsValid( self.Entity ) then return end
if IsValid( self.Emitter ) then
local emitter = self.Emitter
local particle = emitter:Add( Materials[ math.random(1, #Materials ) ], pos )
if particle then
particle:SetGravity( Vector(0,0,100) + VectorRand() * 50 )
particle:SetVelocity( -self.Entity:GetForward() * 200 )
particle:SetAirResistance( 600 )
particle:SetDieTime( math.Rand(1.5,2) )
particle:SetStartAlpha( 50 )
particle:SetStartSize( 20 )
particle:SetEndSize( 60 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetRollDelta( math.Rand( -1, 1 ) )
particle:SetColor(40,40,40)
particle:SetCollide( false )
end
local particle = emitter:Add( "particles/flamelet"..math.random(1,5), pos )
if particle then
particle:SetVelocity( -self.Entity:GetForward() * math.Rand(250,800) + self.Entity:GetVelocity())
particle:SetDieTime( math.Rand(0.2,0.4) )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 8 )
particle:SetEndSize( 1 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 0 ) )
particle:SetCollide( false )
end
local particle = emitter:Add( "particles/flamelet"..math.random(1,5), self.Entity:GetPos() )
if particle then
particle:SetVelocity( -self.Entity:GetForward() * 200 + VectorRand() * 50 )
particle:SetDieTime( 0.25 )
particle:SetAirResistance( 600 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 6 )
particle:SetEndSize( 2 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 0 ) )
particle:SetCollide( false )
end
end
end
function EFFECT:Think()
if IsValid( self.Entity ) then
self.nextDFX = self.nextDFX or 0
if self.nextDFX < CurTime() then
self.nextDFX = CurTime() + 0.02
local oldpos = self.OldPos
local newpos = self.Entity:LocalToWorld( self.Offset )
self:SetPos( newpos )
local Sub = (newpos - oldpos)
local Dir = Sub:GetNormalized()
local Len = Sub:Length()
self.OldPos = newpos
for i = 0, Len, 45 do
local pos = oldpos + Dir * i
self:doFX( pos )
end
end
return true
end
if IsValid( self.Emitter ) then
self.Emitter:Finish()
end
return false
end
function EFFECT:Render()
local ent = self.Entity
if not IsValid( ent ) then return end
local pos = ent:LocalToWorld( self.Offset )
render.SetMaterial( GlowMat )
render.DrawSprite( pos, 100, 100, Color( 255, 200, 150, 255 ) )
end

View File

@@ -0,0 +1,50 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Dir = data:GetNormal()
local Ent = data:GetEntity()
local Vel = Dir * 10
if IsValid( Ent ) then
Vel = Ent:GetVelocity()
end
local emitter = ParticleEmitter( Pos, false )
if not IsValid( emitter ) then return end
for i = 0, 12 do
local particle = emitter:Add( "effects/muzzleflash2", Pos + Dir * i * 0.7 * math.random(1,2) * 0.5 )
local Size = 1
if not particle then continue end
particle:SetVelocity( Dir * 800 + Vel )
particle:SetDieTime( 0.05 )
particle:SetStartAlpha( 255 * Size )
particle:SetStartSize( math.max( math.random(10,24) - i * 0.5,0.1 ) * Size )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 255, 255, 255 )
particle:SetCollide( false )
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,51 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Dir = data:GetNormal()
local Ent = data:GetEntity()
local Col = data:GetStart() or Vector(255,255,255)
local Vel = Dir * 10
if IsValid( Ent ) then
Vel = Ent:GetVelocity()
end
local emitter = ParticleEmitter( Pos, false )
if not IsValid( emitter ) then return end
for i = 0, 12 do
local particle = emitter:Add( "effects/muzzleflash2", Pos + Dir * i * 0.7 * math.random(1,2) * 0.5 )
local Size = 1
if not particle then continue end
particle:SetVelocity( Dir * 800 + Vel )
particle:SetDieTime( 0.05 )
particle:SetStartAlpha( 255 * Size )
particle:SetStartSize( math.max( math.random(10,24) - i * 0.5,0.1 ) * Size )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( Col.x, Col.y, Col.z )
particle:SetCollide( false )
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,92 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
local MatDebris = {
"effects/lvs_base/particle_debris_01",
"effects/lvs_base/particle_debris_02",
}
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Ent = data:GetEntity()
if not IsValid( Ent ) then return end
local Dir = Ent:GetForward()
local emitter = Ent:GetParticleEmitter( Ent:GetPos() )
local VecCol = render.GetLightColor( Pos + Vector(0,0,10) ) * 0.5 + Vector(0.3,0.25,0.15)
if emitter and emitter.Add then
for i = 1, 3 do
local particle = emitter:Add( MatDebris[math.random(1,#MatDebris)], Pos + VectorRand(-10,10) )
if particle then
particle:SetVelocity( Vector(0,0,150) - Dir * 150 )
particle:SetDieTime( 0.2 )
particle:SetAirResistance( 60 )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 255 )
particle:SetStartSize( 15 )
particle:SetEndSize( 50 )
particle:SetRoll( math.Rand(-1,1) * 100 )
particle:SetColor( VecCol.x * 130,VecCol.y * 100,VecCol.z * 60 )
particle:SetGravity( Vector( 0, 0, -600 ) )
particle:SetCollide( false )
end
end
local Right = Ent:GetRight()
Right.z = 0
Right:Normalize()
for i = -1,1,2 do
local particle = emitter:Add( Materials[math.random(1,#Materials)], Pos + Vector(0,0,10) )
if particle then
particle:SetVelocity( -Dir * 400 + Right * 150 * i )
particle:SetDieTime( math.Rand(0.5,1) )
particle:SetAirResistance( 150 )
particle:SetStartAlpha( 50 )
particle:SetStartSize( -80 )
particle:SetEndSize( 400 )
particle:SetColor( VecCol.x * 255,VecCol.y * 255,VecCol.z * 255 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
end
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,65 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
if not LVS.ShowPhysicsEffects then return end
local pos = data:GetOrigin()
local emitter = ParticleEmitter( pos, false )
for i = 0,4 do
local particle = emitter:Add( Materials[ math.random(1, #Materials ) ], pos )
local vel = VectorRand() * 200
if particle then
particle:SetVelocity( vel )
particle:SetDieTime( math.Rand(2.5,5) )
particle:SetAirResistance( 100 )
particle:SetStartAlpha( 50 )
particle:SetStartSize( 50 )
particle:SetEndSize( 200 )
particle:SetRoll( math.Rand(-5,5) )
particle:SetColor( 30,30,20 )
particle:SetGravity( Vector(0,0,20) )
particle:SetCollide( false )
end
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,114 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
if not LVS.ShowPhysicsEffects then
self.LifeTime = 0
self.DieTime = 0
return
end
self.Pos = data:GetOrigin()
self.mat = Material( "sprites/light_glow02_add" )
self.LifeTime = 0.2
self.DieTime = CurTime() + self.LifeTime
local Col = self.Col
local Pos = self.Pos
local Dir = data:GetNormal()
local Strength = data:GetMagnitude()
local emitter = ParticleEmitter( Pos, false )
for i = 0,1 do
local particle = emitter:Add( Materials[ math.random(1, #Materials ) ], Pos )
local vel = VectorRand() * 100 + Dir * 40
if particle then
particle:SetVelocity( vel )
particle:SetDieTime( 1 )
particle:SetAirResistance( 1000 )
particle:SetStartAlpha( 10 )
particle:SetStartSize( 2 )
particle:SetEndSize( 12 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 40, 30, 20 )
particle:SetGravity( Dir * 50 )
particle:SetCollide( false )
end
end
for i = 0, 3 do
local particle = emitter:Add( "sprites/rico1", Pos )
local vel = VectorRand() * 25 * (1 - Strength) + (VectorRand() * 100 + Dir * 150) * Strength
if particle then
particle:SetVelocity( vel )
particle:SetAngles( vel:Angle() + Angle(0,90,0) )
particle:SetDieTime( 2 )
particle:SetStartAlpha( math.Rand( 200, 255 ) )
particle:SetEndAlpha( 0 )
particle:SetStartSize( 2 )
particle:SetEndSize( 0.25 )
particle:SetRoll( math.Rand(-100,100) )
particle:SetRollDelta( math.Rand(-100,100) )
particle:SetCollide( true )
particle:SetBounce( 0.5 )
particle:SetAirResistance( 0 )
particle:SetColor( 255, 200, 0 )
particle:SetGravity( Vector(0,0,-600) )
end
end
emitter:Finish()
end
function EFFECT:Think()
if self.DieTime < CurTime() then
return false
end
return true
end
local mat = Material( "sprites/light_glow02_add" )
function EFFECT:Render()
if not LVS.ShowPhysicsEffects then return end
local Scale = (self.DieTime - CurTime()) / self.LifeTime
render.SetMaterial( mat )
render.DrawSprite( self.Pos, 32, 32, Color( 255 * Scale, 175 * Scale, 80 * Scale, 255) )
end

View File

@@ -0,0 +1,67 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Ent = data:GetEntity()
if not IsValid( Ent ) then return end
self.LifeTime = math.Rand(1.5,3)
self.DieTime = CurTime() + self.LifeTime
self.Splash = {
Pos = Pos,
Mat = Material("effects/splashwake1"),
RandomAng = math.random(0,360),
}
local emitter = Ent:GetParticleEmitter( Ent:GetPos() )
if emitter and emitter.Add then
local particle = emitter:Add( "effects/splash4", Pos + VectorRand(-10,10) - Vector(0,0,20) )
if particle then
particle:SetVelocity( Vector(0,0,250) )
particle:SetDieTime( 0.8 )
particle:SetAirResistance( 60 )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( 50 )
particle:SetEndSize( 100 )
particle:SetRoll( math.Rand(-1,1) * 100 )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, -600 ) )
particle:SetCollide( false )
end
end
end
function EFFECT:Think()
if CurTime() > self.DieTime then
return false
end
return true
end
function EFFECT:Render()
if self.Splash and self.LifeTime then
local Scale = (self.DieTime - self.LifeTime - CurTime()) / self.LifeTime
local S = 200 - Scale * 600
local Alpha = 100 + 100 * Scale
cam.Start3D2D( self.Splash.Pos + Vector(0,0,1), Angle(0,0,0), 1 )
surface.SetMaterial( self.Splash.Mat )
surface.SetDrawColor( 255, 255, 255 , Alpha )
surface.DrawTexturedRectRotated( 0, 0, S , S, self.Splash.RandomAng )
cam.End3D2D()
end
end

View File

@@ -0,0 +1,95 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local LastImpact = 0
function EFFECT:Init( data )
self.Ent = data:GetEntity()
self.Pos = data:GetOrigin()
self.mat = Material( "sprites/light_glow02_add" )
local T = CurTime()
self.LifeTime = 0.2
self.DieTime = T + self.LifeTime
local DontHurtEars = math.Clamp( T - LastImpact, 0.4, 1 ) ^ 2
LastImpact = T
sound.Play( "lvs/shield_deflect.ogg", self.Pos, 120, 100, DontHurtEars )
self:Spark( self.Pos )
if IsValid( self.Ent ) then
self.Model = ClientsideModel( self.Ent:GetModel(), RENDERMODE_TRANSCOLOR )
self.Model:SetMaterial("models/alyx/emptool_glow")
self.Model:SetColor( Color(200,220,255,255) )
self.Model:SetParent( self.Ent, 0 )
self.Model:SetMoveType( MOVETYPE_NONE )
self.Model:SetLocalPos( Vector( 0, 0, 0 ) )
self.Model:SetLocalAngles( Angle( 0, 0, 0 ) )
self.Model:AddEffects( EF_BONEMERGE )
end
end
function EFFECT:Spark( pos )
local emitter = ParticleEmitter( pos, false )
for i = 0, 20 do
local particle = emitter:Add( "sprites/rico1", pos )
local vel = VectorRand() * 500
if not particle then continue end
particle:SetVelocity( vel )
particle:SetAngles( vel:Angle() + Angle(0,90,0) )
particle:SetDieTime( math.Rand(0.2,0.4) )
particle:SetStartAlpha( math.Rand( 200, 255 ) )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.Rand(10,20) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-100,100) )
particle:SetRollDelta( math.Rand(-100,100) )
particle:SetColor( 0, 127, 255 )
particle:SetAirResistance( 0 )
end
emitter:Finish()
end
function EFFECT:Think()
if not IsValid( self.Ent ) then
if IsValid( self.Model ) then
self.Model:Remove()
end
end
if self.DieTime < CurTime() then
if IsValid( self.Model ) then
self.Model:Remove()
end
return false
end
return true
end
function EFFECT:Render()
local Scale = (self.DieTime - CurTime()) / self.LifeTime
render.SetMaterial( self.mat )
render.DrawSprite( self.Pos, 800 * Scale, 800 * Scale, Color( 0, 127, 255, 255) )
render.DrawSprite( self.Pos, 200 * Scale, 200 * Scale, Color( 255, 255, 255, 255) )
end

View File

@@ -0,0 +1,45 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.MatBeam = Material( "effects/lvs_base/spark" )
EFFECT.MatSprite = Material( "sprites/light_glow02_add" )
function EFFECT:Init( data )
local pos = data:GetOrigin()
local dir = data:GetNormal()
self.ID = data:GetMaterialIndex()
self:SetRenderBoundsWS( pos, pos + dir * 50000 )
end
function EFFECT:Think()
if not LVS:GetBullet( self.ID ) then return false end
return true
end
function EFFECT:Render()
local bullet = LVS:GetBullet( self.ID )
local endpos = bullet:GetPos()
local dir = bullet:GetDir()
local len = 1500 * bullet:GetLength()
render.SetMaterial( self.MatBeam )
render.DrawBeam( endpos - dir * len, endpos + dir * len * 0.1, 10, 1, 0, Color( 220, 255, 220, 255 ) )
render.DrawBeam( endpos - dir * len * 0.5, endpos + dir * len * 0.1, 5, 1, 0, Color( 255, 255, 0, 255 ) )
render.SetMaterial( self.MatSprite )
render.DrawSprite( endpos, 400, 400, Color( 110, 150, 110, 255 ) )
end

View File

@@ -0,0 +1,138 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.MatBeam = Material( "effects/lvs_base/spark" )
EFFECT.MatSprite = Material( "sprites/light_glow02_add" )
EFFECT.MatSmoke = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local pos = data:GetOrigin()
local dir = data:GetNormal()
self.ID = data:GetMaterialIndex()
self:SetRenderBoundsWS( pos, pos + dir * 50000 )
self.emitter = ParticleEmitter( pos, false )
self.OldPos = pos
self.Dir = dir
end
function EFFECT:doFX( pos, curpos )
if not IsValid( self.emitter ) then return end
local particle = self.emitter:Add( self.MatSmoke[ math.random(1, #self.MatSmoke ) ], pos )
if particle then
particle:SetGravity( Vector(0,0,100) + VectorRand() * 50 )
particle:SetVelocity( -self.Dir * 200 )
particle:SetAirResistance( 600 )
particle:SetDieTime( math.Rand(1.5,2) )
particle:SetStartAlpha( 50 )
particle:SetStartSize( 20 )
particle:SetEndSize( 60 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetRollDelta( math.Rand( -1, 1 ) )
particle:SetColor(40,40,40)
particle:SetCollide( false )
end
local particle = self.emitter:Add( "particles/flamelet"..math.random(1,5), pos )
if particle then
particle:SetVelocity( -self.Dir * math.Rand(250,800) + self.Dir * 7000 )
particle:SetDieTime( math.Rand(0.2,0.4) )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 8 )
particle:SetEndSize( 1 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 0 ) )
particle:SetCollide( false )
end
local particle = self.emitter:Add( "particles/flamelet"..math.random(1,5), curpos )
if particle then
particle:SetVelocity( -self.Dir * 200 + VectorRand() * 50 )
particle:SetDieTime( 0.25 )
particle:SetAirResistance( 600 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 6 )
particle:SetEndSize( 2 )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 255,255,255 )
particle:SetGravity( Vector( 0, 0, 0 ) )
particle:SetCollide( false )
end
end
function EFFECT:Think()
if not LVS:GetBullet( self.ID ) then
if self.emitter then
self.emitter:Finish()
end
return false
end
if not self.emitter then return true end
local T = CurTime()
if (self.nextDFX or 0) <= T then
self.nextDFX = T + 0.02
local bullet = LVS:GetBullet( self.ID )
local Pos = bullet:GetPos()
local Sub = self.OldPos - Pos
local Dist = Sub:Length()
local Dir = Sub:GetNormalized()
for i = 0, Dist, 45 do
local cur_pos = self.OldPos + Dir * i
self:doFX( cur_pos, Pos )
end
self.OldPos = Pos
end
return true
end
function EFFECT:Render()
local bullet = LVS:GetBullet( self.ID )
local pos = bullet:GetPos()
render.SetMaterial( self.MatSprite )
render.DrawSprite( pos, 100, 100, Color( 255, 200, 150, 255 ) )
end

View File

@@ -0,0 +1,45 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.MatBeam = Material( "effects/lvs_base/spark" )
EFFECT.MatSprite = Material( "sprites/light_glow02_add" )
function EFFECT:Init( data )
local pos = data:GetOrigin()
local dir = data:GetNormal()
self.ID = data:GetMaterialIndex()
self:SetRenderBoundsWS( pos, pos + dir * 50000 )
end
function EFFECT:Think()
if not LVS:GetBullet( self.ID ) then return false end
return true
end
function EFFECT:Render()
local bullet = LVS:GetBullet( self.ID )
local endpos = bullet:GetPos()
local dir = bullet:GetDir()
local len = 1500 * bullet:GetLength()
render.SetMaterial( self.MatBeam )
render.DrawBeam( endpos - dir * len, endpos + dir * len * 0.1, 10, 1, 0, Color( 255, 100, 0, 255 ) )
render.DrawBeam( endpos - dir * len * 0.5, endpos + dir * len * 0.1, 5, 1, 0, Color( 255, 255, 0, 255 ) )
render.SetMaterial( self.MatSprite )
render.DrawSprite( endpos, 400, 400, Color( 125, 50, 0, 255 ) )
end

View File

@@ -0,0 +1,45 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.MatBeam = Material( "effects/lvs_base/spark" )
EFFECT.MatSprite = Material( "sprites/light_glow02_add" )
function EFFECT:Init( data )
local pos = data:GetOrigin()
local dir = data:GetNormal()
self.ID = data:GetMaterialIndex()
self:SetRenderBoundsWS( pos, pos + dir * 50000 )
end
function EFFECT:Think()
if not LVS:GetBullet( self.ID ) then return false end
return true
end
function EFFECT:Render()
local bullet = LVS:GetBullet( self.ID )
local endpos = bullet:GetPos()
local dir = bullet:GetDir()
local len = 1500 * bullet:GetLength()
render.SetMaterial( self.MatBeam )
render.DrawBeam( endpos - dir * len, endpos + dir * len * 0.1, 10, 1, 0, Color( 100, 100, 100, 255 ) )
render.DrawBeam( endpos - dir * len * 0.5, endpos + dir * len * 0.1, 5, 1, 0, Color( 255, 255, 0, 255 ) )
render.SetMaterial( self.MatSprite )
render.DrawSprite( endpos, 400, 400, Color( 100, 100, 100, 255 ) )
end

View File

@@ -0,0 +1,45 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.MatBeam = Material( "effects/lvs_base/spark" )
EFFECT.MatSprite = Material( "sprites/light_glow02_add" )
function EFFECT:Init( data )
local pos = data:GetOrigin()
local dir = data:GetNormal()
self.ID = data:GetMaterialIndex()
self:SetRenderBoundsWS( pos, pos + dir * 50000 )
end
function EFFECT:Think()
if not LVS:GetBullet( self.ID ) then return false end
return true
end
function EFFECT:Render()
local bullet = LVS:GetBullet( self.ID )
local endpos = bullet:GetPos()
local dir = bullet:GetDir()
local len = 1500 * bullet:GetLength()
render.SetMaterial( self.MatBeam )
render.DrawBeam( endpos - dir * len, endpos + dir * len * 0.1, 10, 1, 0, Color( 255, 80, 0, 255 ) )
render.DrawBeam( endpos - dir * len * 0.5, endpos + dir * len * 0.1, 5, 1, 0, Color( 255, 255, 0, 255 ) )
render.SetMaterial( self.MatSprite )
render.DrawSprite( endpos, 400, 400, Color( 125, 80, 0, 255 ) )
end

View File

@@ -0,0 +1,75 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local ang
EFFECT.ParticleName = "muzzleflash_ar3"
function EFFECT:Init(data)
self.WeaponEnt = data:GetEntity()
if not IsValid(self.WeaponEnt) then return end
self.Attachment = data:GetAttachment()
self.Position = self:GetTracerShootPos(data:GetOrigin(), self.WeaponEnt, self.Attachment)
local att2 = self:LookupAttachment( "punch" )
self.Position2 = self:GetTracerShootPos(data:GetOrigin(), self.WeaponEnt, att2 )
if IsValid(self.WeaponEnt.Owner) then
if self.WeaponEnt.Owner == LocalPlayer() then
if not self.WeaponEnt:IsFirstPerson() then
ang = self.WeaponEnt.Owner:EyeAngles()
ang:Normalize()
--ang.p = math.max(math.min(ang.p,55),-55)
self.Forward = ang:Forward()
else
self.WeaponEnt = self.WeaponEnt.Owner:GetViewModel()
end
--ang.p = math.max(math.min(ang.p,55),-55)
else
ang = self.WeaponEnt.Owner:EyeAngles()
ang:Normalize()
self.Forward = ang:Forward()
end
end
self.Forward = self.Forward or data:GetNormal()
self.Angle = self.Forward:Angle()
local dlight = DynamicLight(self.WeaponEnt:EntIndex())
if (dlight) then
dlight.pos = self.Position + self.Angle:Up() * 3 + self.Angle:Right() * -2
dlight.r = 255
dlight.g = 192
dlight.b = 64
dlight.brightness = 5
dlight.Size = math.Rand(32, 64)
dlight.Decay = math.Rand(32, 64) / 0.05
dlight.DieTime = CurTime() + 0.05
end
local pcf = CreateParticleSystem(self.WeaponEnt, self.ParticleName, PATTACH_POINT_FOLLOW, self.Attachment)
if IsValid(pcf) then
pcf:StartEmission()
end
timer.Simple(3.0, function()
if IsValid(pcf) then
pcf:StopEmissionAndDestroyImmediately()
end
end)
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,33 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init(effectdata)
self.endPoint = effectdata:GetOrigin()
local ent = effectdata:GetEntity()
self.ent = ent:GetPuppet()
self.ply = ent:GetPillUser()
end
function EFFECT:Think()
if not IsValid(self.ent) then return false end
self:SetPos(self.ent:GetAttachment(self.ent:LookupAttachment("zipline")).Pos)
self:SetRenderBoundsWS(self:GetPos(), self.endPoint)
return not self.ply:OnGround()
end
local ropeMat = Material("cable/cable2")
function EFFECT:Render()
--print("p")
local color = Color(10, 10, 10)
render.SetMaterial(ropeMat)
render.DrawBeam(self:GetPos(), self.endPoint, 2, 0, 0, color)
end

View File

@@ -0,0 +1,138 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local bdamaged = data:GetFlags() >= 1
local lPos = data:GetOrigin()
local lAng = data:GetAngles()
local Entity = data:GetEntity()
local Delay = bdamaged and 0 or math.random(0,0.4)
timer.Simple( Delay, function()
if IsValid( Entity ) then
local Vel = Entity:GetVelocity()
local Pos = Entity:LocalToWorld( lPos ) + Vel * FrameTime() * 0.5
local Ang = Entity:LocalToWorldAngles( lAng )
local snd1 = "simulated_vehicles/sfx/ex_backfire_damaged_"..math.Round(math.random(1,3),1)..".ogg"
local snd2 = Entity:GetBackfireSound()
if snd2 == "" then
snd2 = "simulated_vehicles/sfx/ex_backfire_"..math.Round(math.random(1,4),1)..".ogg"
end
local snd = bdamaged and snd1 or snd2
Entity.CurBackFireSound = CreateSound( Entity, snd )
Entity.CurBackFireSound:Play()
Entity:CallOnRemove( "stopbfsounds", function( Entity )
if Entity.CurBackFireSound then
Entity.CurBackFireSound:Stop()
end
end)
timer.Simple(5, function()
if not IsValid( Entity ) then return end
if Entity.CurBackFireSound then
Entity.CurBackFireSound:Stop()
end
end )
local dlight = DynamicLight( Entity:EntIndex() * math.random(1,4) )
if dlight then
dlight.pos = Pos
dlight.r = 255
dlight.g = 180
dlight.b = 100
dlight.brightness = 2
dlight.Decay = 1000
dlight.Size = 120
dlight.DieTime = CurTime() + 0.5
end
local emitter = ParticleEmitter( Pos, false )
if emitter then
for i = 0, 12 do
local particle1 = emitter:Add( "effects/muzzleflash2", Pos )
if particle1 then
particle1:SetVelocity( Vel + Ang:Forward() * (5 + Vel:Length() / 20) )
particle1:SetDieTime( 0.1 )
particle1:SetStartAlpha( 255 )
particle1:SetStartSize( math.random(4,12) )
particle1:SetEndSize( 0 )
particle1:SetRoll( math.Rand( -1, 1 ) )
particle1:SetColor( 255,255,255 )
particle1:SetCollide( false )
end
local particle2 = emitter:Add( Materials[ math.Round( math.Rand(1, table.Count( Materials ) ) , 0 ) ], Pos )
if particle2 then
particle2:SetVelocity( Vel + Ang:Forward() * (10 + Vel:Length() / 20) )
particle2:SetDieTime( 0.3 )
particle2:SetStartAlpha( 60 )
particle2:SetStartSize( 0 )
particle2:SetEndSize( math.random(8,20) )
particle2:SetRoll( math.Rand( -1, 1 ) )
particle2:SetColor( 100,100,100 )
particle2:SetCollide( false )
end
if bdamaged then
local particle3 = emitter:Add( Materials[ math.Round( math.Rand(1, table.Count( Materials ) ) , 0 ) ], Pos )
if particle3 then
particle3:SetVelocity( Vel + Ang:Forward() * math.random(30,60) )
particle3:SetDieTime( 0.5 )
particle3:SetAirResistance( 20 )
particle3:SetStartAlpha( 100 )
particle3:SetStartSize( 0 )
particle3:SetEndSize( math.random(25,50) )
particle3:SetRoll( math.Rand( -1, 1 ) )
particle3:SetColor( 40,40,40 )
particle3:SetCollide( false )
end
end
end
emitter:Finish()
end
end
end )
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,110 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.GlowMat = Material( "sprites/light_glow02_add" )
EFFECT.FireMat = {
[1] = Material( "effects/lvs_base/flamelet1" ),
[2] = Material( "effects/lvs_base/flamelet2" ),
[3] = Material( "effects/lvs_base/flamelet3" ),
[4] = Material( "effects/lvs_base/flamelet4" ),
[5] = Material( "effects/lvs_base/flamelet5" ),
[6] = Material( "effects/lvs_base/fire" ),
}
EFFECT.SmokeMat = {
[1] = Material( "particle/smokesprites_0001" ),
[2] = Material( "particle/smokesprites_0002" ),
[3] = Material( "particle/smokesprites_0003" ),
[4] = Material( "particle/smokesprites_0004" ),
[5] = Material( "particle/smokesprites_0005" ),
[6] = Material( "particle/smokesprites_0006" ),
[7] = Material( "particle/smokesprites_0007" ),
[8] = Material( "particle/smokesprites_0008" ),
[9] = Material( "particle/smokesprites_0009" ),
[10] = Material( "particle/smokesprites_0010" ),
[11] = Material( "particle/smokesprites_0011" ),
[12] = Material( "particle/smokesprites_0012" ),
[13] = Material( "particle/smokesprites_0013" ),
[14] = Material( "particle/smokesprites_0014" ),
[15] = Material( "particle/smokesprites_0015" ),
[16] = Material( "particle/smokesprites_0016" ),
}
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Ent = data:GetEntity()
self.LifeTime = 1
self.DieTime = CurTime() + self.LifeTime
if not IsValid( Ent ) then return end
self.Ent = Ent
self.Pos = Ent:WorldToLocal( Pos + VectorRand() * 8 )
self.RandomSize = math.Rand( 0.8, 1.6 )
self.Vel = self.Ent:GetVelocity()
end
function EFFECT:Think()
if not IsValid( self.Ent ) then return false end
if self.DieTime < CurTime() then return false end
self:SetPos( self.Ent:LocalToWorld( self.Pos ) )
return true
end
function EFFECT:Render()
if not IsValid( self.Ent ) or not self.Pos then return end
self:RenderSmoke()
self:RenderFire()
end
function EFFECT:RenderSmoke()
local Scale = (self.DieTime - CurTime()) / self.LifeTime
local Pos = self.Ent:LocalToWorld( self.Pos ) + Vector(0,0,25)
local InvScale = 1 - Scale
local Num = #self.SmokeMat - math.Clamp(math.ceil( Scale * #self.SmokeMat ) - 1,0, #self.SmokeMat - 1)
local C = 10 + 10 * self.RandomSize
local Size = (25 + 30 * InvScale) * self.RandomSize
local Offset = (self.Vel * InvScale ^ 2) * 0.5
render.SetMaterial( self.SmokeMat[ Num ] )
render.DrawSprite( Pos + Vector(0,0,InvScale ^ 2 * 80 * self.RandomSize) - Offset, Size, Size, Color( C, C, C, 200 * Scale) )
end
function EFFECT:RenderFire()
local Scale = (self.DieTime - 0.4 - CurTime()) / 0.6
if Scale < 0 then return end
local Pos = self.Ent:LocalToWorld( self.Pos )
local InvScale = 1 - Scale
render.SetMaterial( self.GlowMat )
render.DrawSprite( Pos + Vector(0,0,InvScale ^ 2 * 10), 100 * InvScale, 100 * InvScale, Color( 255, 150, 75, 255) )
local Num = #self.FireMat - math.Clamp(math.ceil( Scale * #self.FireMat ) - 1,0, #self.FireMat - 1)
local Size = (10 + 25 * Scale) * self.RandomSize
local Offset = (self.Vel * InvScale ^ 2) * 0.025
render.SetMaterial( self.FireMat[ Num ] )
render.DrawSprite( Pos + Vector(0,0,InvScale ^ 2 * 25) - Offset, Size, Size, Color( 255, 255, 255, 255) )
end

View File

@@ -0,0 +1,82 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.SmokeMat = {
[1] = Material( "particle/smokesprites_0001" ),
[2] = Material( "particle/smokesprites_0002" ),
[3] = Material( "particle/smokesprites_0003" ),
[4] = Material( "particle/smokesprites_0004" ),
[5] = Material( "particle/smokesprites_0005" ),
[6] = Material( "particle/smokesprites_0006" ),
[7] = Material( "particle/smokesprites_0007" ),
[8] = Material( "particle/smokesprites_0008" ),
[9] = Material( "particle/smokesprites_0009" ),
[10] = Material( "particle/smokesprites_0010" ),
[11] = Material( "particle/smokesprites_0011" ),
[12] = Material( "particle/smokesprites_0012" ),
[13] = Material( "particle/smokesprites_0013" ),
[14] = Material( "particle/smokesprites_0014" ),
[15] = Material( "particle/smokesprites_0015" ),
[16] = Material( "particle/smokesprites_0016" ),
}
function EFFECT:Init( data )
local Pos = data:GetOrigin()
local Ent = data:GetEntity()
local Mag = data:GetMagnitude()
self.LifeTime = 0.5 + Mag * 0.5
self.DieTime = CurTime() + self.LifeTime
if not IsValid( Ent ) then return end
self.Mag = Mag
self.Ent = Ent
self.Pos = Ent:WorldToLocal( Pos + VectorRand() * 15 )
self.RandomSize = math.Rand( 0.8, 1.6 )
self.Vel = self.Ent:GetVelocity()
end
function EFFECT:Think()
if not IsValid( self.Ent ) then return false end
if self.DieTime < CurTime() then return false end
self:SetPos( self.Ent:LocalToWorld( self.Pos ) )
return true
end
function EFFECT:Render()
if not IsValid( self.Ent ) or not self.Pos then return end
self:RenderSmoke()
end
function EFFECT:RenderSmoke()
local Scale = (self.DieTime - CurTime()) / self.LifeTime
local Pos = self.Ent:LocalToWorld( self.Pos )
local InvScale = 1 - Scale
local Num = #self.SmokeMat - math.Clamp(math.ceil( Scale * #self.SmokeMat ) - 1,0, #self.SmokeMat - 1)
local A = (50 + 100 * (1 - self.Mag)) * Scale
local C = (20 + 30 * self.RandomSize * self.Mag)
local Size = (25 + 30 * InvScale) * self.RandomSize
local Offset = (self.Vel * InvScale ^ 2) * 0.15
render.SetMaterial( self.SmokeMat[ Num ] )
render.DrawSprite( Pos + Vector(0,0,InvScale ^ 2 * (20 + self.Vel:Length() / 25) * self.RandomSize) - Offset, Size, Size, Color( C, C, C, A ) )
end

View File

@@ -0,0 +1,100 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local lPos = data:GetOrigin()
local lAng = data:GetAngles() - Angle(90,0,0)
local Entity = data:GetEntity()
local Size = data:GetMagnitude()
local TurboCharged = Entity:GetTurboCharged()
local SuperCharged = Entity:GetSuperCharged()
if IsValid( Entity ) then
local Vel = Entity:GetVelocity()
local Dir = Entity:LocalToWorldAngles( lAng ):Forward()
local Pos = Entity:LocalToWorld( lPos )
local emitter = ParticleEmitter( Pos, false )
if emitter then
local MaxHealth = Entity:GetMaxHealth()
local Health = Entity:GetCurHealth()
local particle = emitter:Add( Materials[ math.Round( math.Rand(1, table.Count( Materials ) ) , 0 ) ], Pos )
local cAdd = (1 - (Health / MaxHealth)) * 100
local cInt = math.Clamp(100 - 40 * Size,0,255)
local rand = Vector( math.random(-1,1), math.random(-1,1), math.random(-1,1) ) * 0.25
if particle then
particle:SetVelocity( Vel + (Dir + rand) * (50 + Size * 100) )
particle:SetDieTime( 0.4 + Size * 0.6 )
particle:SetAirResistance( 200 )
particle:SetStartAlpha( math.max(20 + Size ^ 3 * (20 + cAdd) - Vel:Length() / 800,0))
particle:SetStartSize( ((SuperCharged and TurboCharged) and 4 or 2) )
particle:SetEndSize( 10 + Size * 60 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( math.Clamp(cInt - cAdd,0,255), math.Clamp(cInt - cAdd,0,255), math.Clamp(cInt - cAdd * 0.5,0,255) )
particle:SetGravity( Vector( 0, 0, 100 ) + Vel * 0.5 )
particle:SetCollide( false )
end
if SuperCharged and TurboCharged then
if Size > 0.4 then
for i = 0, 12 do
local Pos2 = Pos + Dir * i * 0.7 * math.random(1,2) * 0.5
local particle1 = emitter:Add( "effects/muzzleflash2", Pos2 )
if particle1 then
particle1:SetVelocity( Vel + Dir * (5 + Vel:Length() / 20) )
particle1:SetDieTime( 0.05 )
particle1:SetStartAlpha( 255 * Size )
particle1:SetStartSize( math.max( math.random(4,12) - i * 0.5,0.1 ) * Size )
particle1:SetEndSize( 0 )
particle1:SetRoll( math.Rand( -1, 1 ) )
particle1:SetColor( 255,255,255 )
particle1:SetCollide( false )
end
end
end
end
emitter:Finish()
end
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,100 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.Mat = Material( "effects/simfphys_armed/gauss_beam" )
function EFFECT:Init( data )
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
local ent = data:GetEntity()
self.parentent = ent
local att = data:GetAttachment()
if ( IsValid( ent ) && att > 0 ) then
if ( ent.Owner == LocalPlayer() && !LocalPlayer():GetViewModel() != LocalPlayer() ) then ent = ent.Owner:GetViewModel() end
local att = ent:GetAttachment( att )
if ( att ) then
self.StartPos = att.Pos
end
end
self.Dir = self.EndPos - self.StartPos
self:SetRenderBoundsWS( self.StartPos, self.EndPos )
self.TracerTime = 0.1
self.Length = math.Rand( 0.15, 0.3 )
-- Die when it reaches its target
self.DieTime = CurTime() + self.TracerTime
end
function EFFECT:Think()
if ( CurTime() > self.DieTime ) then
-- Awesome End Sparks
local effectdata = EffectData()
effectdata:SetOrigin( self.EndPos + self.Dir:GetNormalized() * -5 )
effectdata:SetNormal( self.Dir:GetNormalized() * -3 )
effectdata:SetMagnitude( 1 )
effectdata:SetScale( 1 )
effectdata:SetRadius( 6 )
util.Effect( "Sparks", effectdata )
return false
end
return true
end
function EFFECT:RenderGauss(dir,dist)
if !IsValid(self.parentent) then return end
local origin = self.parentent:GetAttachment( 1 ).Pos
render.SetMaterial( self.Mat )
render.DrawBeam(origin, origin + dir * dist, 2, 1, 1, Color( 255,145,0, 255 ) )
self:GaussArc(origin,dir,dist)
self:GaussArc(origin,dir,dist)
end
function EFFECT:GaussArc(origin,dir,dist)
local amount = math.Round(dist / 100,1)
local positions = {}
for i = 1, amount do
local intensitivity = math.sin( (i / amount) * 180 * (math.pi / 180) )
local arc_offset = dir * i * (dist / amount) + self.side:Right() * intensitivity * dist * 0.02
local noise = Vector( math.random(-1,1), math.random(-1,1), math.random(-1,1) ) * intensitivity
table.insert(positions, origin + arc_offset + noise )
render.DrawBeam(positions[i-1] or origin, positions[i], 1, 1, 1, Color( 255,195,50, 255 ) )
end
end
function EFFECT:Render()
local dir = self.Dir
dir:Normalize()
self.side = dir:Angle()
self.side:RotateAroundAxis(dir, math.random(-180,180) )
self:RenderGauss(dir,(self.EndPos - self.StartPos):Length())
end

View File

@@ -0,0 +1,133 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local vehicle = data:GetEntity()
if not IsValid( vehicle ) then return end
local ID = vehicle:LookupAttachment( "cannon_muzzle" )
if ID == 0 then return end
local Attachment = vehicle:GetAttachment( ID )
local Pos = Attachment.Pos
local Dir = Attachment.Ang:Forward()
local vel = vehicle:GetVelocity()
self.emitter = ParticleEmitter( Pos, false )
self:Muzzle( Pos, Dir, vel )
self.Time = math.Rand(3,6)
self.DieTime = CurTime() + self.Time
self.AttachmentID = ID
self.Vehicle = vehicle
end
function EFFECT:Muzzle( pos, dir, vel )
if not self.emitter then return end
for i = 0,20 do
local particle = self.emitter:Add( "effects/muzzleflash2", pos )
if particle then
particle:SetVelocity( dir * math.Rand(50,200) + vel )
particle:SetDieTime( 0.3 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.random(24,60) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 255,255,255 )
particle:SetCollide( false )
end
end
for i = 0,25 do
local particle = self.emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
local rCol = math.Rand(120,140)
if particle then
particle:SetVelocity( dir * math.Rand(300,1300) + VectorRand() * math.Rand(0,300) + vel )
particle:SetDieTime( math.Rand(3,4) )
particle:SetAirResistance( math.Rand(300,600) )
particle:SetStartAlpha( math.Rand(50,150) )
particle:SetStartSize( math.Rand(5,20) )
particle:SetEndSize( math.Rand(120,180) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( rCol,rCol,rCol )
particle:SetGravity( VectorRand() * 200 + Vector(0,0,200) )
particle:SetCollide( false )
end
end
end
function EFFECT:Think()
local vehicle = self.Vehicle
if not IsValid( vehicle ) then return false end
if self.DieTime > CurTime() then
local intensity = ((self.DieTime - CurTime()) / self.Time)
local Attachment = vehicle:GetAttachment( self.AttachmentID )
local dir = Attachment.Ang:Forward()
local pos = Attachment.Pos + dir * 6
if self.emitter then
for i = 0,math.Rand(3,6) do
local particle = self.emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
if particle then
particle:SetVelocity( dir * 2 + VectorRand() * 30 )
particle:SetDieTime( math.Rand(1,2) )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( (intensity ^ 5) * 10 )
particle:SetStartSize( intensity ^ 2 * 15 )
particle:SetEndSize( math.Rand(10,20) * intensity )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 120,120,120 )
particle:SetGravity( Vector(0,0,20) + VectorRand() * math.Rand(0,5) )
particle:SetCollide( false )
end
end
end
return true
else
if self.emitter then
self.emitter:Finish()
end
return false
end
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,99 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.SmokeMat = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
EFFECT.DustMat = {
"effects/lvs_base/particle_debris_01",
"effects/lvs_base/particle_debris_02",
}
function EFFECT:Init( data )
local pos = data:GetOrigin()
local ent = data:GetEntity()
if not IsValid( ent ) then return end
local dir = data:GetNormal()
local scale = data:GetMagnitude()
local underwater = data:GetFlags() == 1
local emitter = ent:GetParticleEmitter( ent:GetPos() )
local VecCol = render.GetLightColor( pos + dir ) * 0.5
if underwater then
VecCol = (VecCol * 0.25 + Vector(0.75,0.75,0.75)) * 255
else
VecCol = (VecCol + Vector(0.3,0.25,0.15)) * 255
end
local DieTime = math.Rand(0.8,1.6)
for i = 1, 5 do
local particle = emitter:Add( self.DustMat[ math.random(1,#self.DustMat) ] , pos )
if not particle then continue end
particle:SetVelocity( (dir * 50 * i + VectorRand() * 25) * scale )
particle:SetDieTime( (i / 8) * DieTime )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 * scale )
particle:SetEndSize( 20 * i * scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,-600) * scale )
particle:SetCollide( false )
end
for i = 1, 5 do
local particle = emitter:Add( underwater and "effects/splash4" or self.SmokeMat[ math.random(1,#self.SmokeMat) ] , pos )
if not particle then continue end
particle:SetVelocity( (dir * 50 * i + VectorRand() * 40) * scale )
particle:SetDieTime( (i / 8) * DieTime )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( underwarter and 150 or 255 )
particle:SetStartSize( 10 * scale )
particle:SetEndSize( 20 * i * scale )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,-600) * scale )
particle:SetCollide( false )
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,66 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.SmokeMat = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local pos = data:GetOrigin()
local ent = data:GetEntity()
if not IsValid( ent ) then return end
local dir = data:GetNormal()
local emitter = ent:GetParticleEmitter( ent:GetPos() )
local VecCol = (render.GetLightColor( pos + dir ) * 0.5 + Vector(0.3,0.3,0.3)) * 255
for i = 1, 2 do
local particle = emitter:Add( self.SmokeMat[ math.random(1,#self.SmokeMat) ] , pos )
if not particle then continue end
particle:SetVelocity( VectorRand() * 50 )
particle:SetDieTime( math.Rand(0.5,1.5) )
particle:SetAirResistance( 10 )
particle:SetStartAlpha( 50 )
particle:SetStartSize( 20 )
particle:SetEndSize( 60 )
particle:SetRollDelta( math.Rand(-1,1) )
particle:SetColor( math.min( VecCol.r, 255 ), math.min( VecCol.g, 255 ), math.min( VecCol.b, 255 ) )
particle:SetGravity( Vector(0,0,5) )
particle:SetCollide( false )
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,86 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
EFFECT.WaterWake = Material("effects/splashwake1")
function EFFECT:Init( data )
local Pos = data:GetOrigin() + Vector(0,0,1)
local Ent = data:GetEntity()
self.Size = data:GetMagnitude()
if not IsValid( Ent ) then return end
self.LifeTime = 1
self.DieTime = CurTime() + self.LifeTime
local RainFX = data:GetFlags() == 1
if RainFX then
self.Size = self.Size * 2
else
self.Splash = {
Pos = Pos,
Mat = self.WaterWake,
RandomAng = math.random(0,360),
}
end
self.VecCol = (render.GetLightColor( Pos ) * 0.25 + Vector(0.75,0.75,0.75)) * 255
local emitter = Ent:GetParticleEmitter( Ent:GetPos() )
local Vel = Ent:GetVelocity():Length()
for i = 1, 3 do
if emitter and emitter.Add then
local particle = emitter:Add( "effects/splash4", Pos + VectorRand() * self.Size * 0.1 )
if not particle then continue end
particle:SetVelocity( Vector(0,0,math.Clamp(Vel / 100,100,250)) )
particle:SetDieTime( 0.25 + math.min(Vel / 500,0.2) )
particle:SetAirResistance( 60 )
particle:SetStartAlpha( RainFX and 5 or 150 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( self.Size * 0.2 )
particle:SetEndSize( self.Size )
particle:SetRollDelta( math.Rand(-1,1) * 5 )
particle:SetColor( math.min( self.VecCol.r, 255 ), math.min( self.VecCol.g, 255 ), math.min( self.VecCol.b, 255 ) )
particle:SetGravity( Vector( 0, 0, -600 ) )
particle:SetCollide( false )
end
end
end
function EFFECT:Think()
if CurTime() > self.DieTime then
return false
end
return true
end
function EFFECT:Render()
if not self.Splash or not self.LifeTime or not self.VecCol then return end
local Scale = 1 - (self.DieTime - CurTime()) / self.LifeTime
local Alpha = math.max( 100 - 150 * Scale ^ 2, 0 )
if Alpha <= 0 then return end
local Size = (self.Size + self.Size * Scale) * 1.5
cam.Start3D2D( self.Splash.Pos, Angle(0,0,0), 1 )
surface.SetMaterial( self.Splash.Mat )
surface.SetDrawColor( math.min( self.VecCol.r, 255 ), math.min( self.VecCol.g, 255 ), math.min( self.VecCol.b, 255 ), Alpha )
surface.DrawTexturedRectRotated( 0, 0, Size, Size, self.Splash.RandomAng )
cam.End3D2D()
end

View File

@@ -0,0 +1,135 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local vehicle = data:GetEntity()
if not IsValid( vehicle ) then return end
local ID = vehicle:LookupAttachment( "turret_cannon" )
if ID == 0 then return end
local Attachment = vehicle:GetAttachment( ID )
local Pos = Attachment.Pos
local Dir = Attachment.Ang:Up()
local vel = vehicle:GetVelocity()
self.emitter = ParticleEmitter( Pos, false )
self:Muzzle( Pos, Dir, vel )
self.Time = math.Rand(3,6)
self.DieTime = CurTime() + self.Time
self.AttachmentID = ID
self.Vehicle = vehicle
end
function EFFECT:Muzzle( pos, dir, vel )
if not self.emitter then return end
for i = 0,20 do
local particle = self.emitter:Add( "effects/muzzleflash2", pos )
if particle then
particle:SetVelocity( dir * math.Rand(50,200) + vel )
particle:SetDieTime( 0.3 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.random(24,60) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 255,255,255 )
particle:SetCollide( false )
end
end
for i = 0,10 do
local particle = self.emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
local rCol = math.Rand(120,140)
if particle then
particle:SetVelocity( dir * math.Rand(300,1300) + VectorRand() * math.Rand(0,10) + vel )
particle:SetDieTime( math.Rand(3,4) )
particle:SetAirResistance( math.Rand(300,600) )
particle:SetStartAlpha( math.Rand(50,150) )
particle:SetStartSize( 5 )
particle:SetEndSize( math.Rand(80,160) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( rCol,rCol,rCol )
particle:SetGravity( VectorRand() * 200 + Vector(0,0,200) )
particle:SetCollide( false )
end
end
end
function EFFECT:Think()
local vehicle = self.Vehicle
if not IsValid( vehicle ) then return false end
if self.DieTime > CurTime() then
local intensity = ((self.DieTime - CurTime()) / self.Time)
local Attachment = vehicle:GetAttachment( self.AttachmentID )
local dir = Attachment.Ang:Up()
local pos = Attachment.Pos + dir * 3
if self.emitter then
for i = 0,math.Rand(3,6) do
local particle = self.emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
if particle then
particle:SetVelocity( dir * 2 + VectorRand() * 10 )
particle:SetDieTime( math.Rand(1,2) )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( (intensity ^ 5) * 20 )
particle:SetStartSize( intensity * 5 )
particle:SetEndSize( math.Rand(10,20) * intensity )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 120,120,120 )
particle:SetGravity( Vector(0,0,20) + VectorRand() * math.Rand(0,5) )
particle:SetCollide( false )
end
end
end
return true
else
if self.emitter then
self.emitter:Finish()
end
return false
end
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,102 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local Pos = data:GetOrigin()
self:Explosion( Pos )
local random = math.random(1,3)
if random == 1 then
sound.Play( "ambient/explosions/explode_3.wav", Pos, 95, 100, 1 )
elseif random == 2 then
sound.Play( "ambient/explosions/explode_8.wav", Pos, 95, 140, 1 )
else
sound.Play( "ambient/explosions/explode_5.wav", Pos, 95, 100, 1 )
end
end
function EFFECT:Explosion( pos )
local emitter = ParticleEmitter( pos, false )
for i = 0,60 do
local particle = emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
if particle then
particle:SetVelocity( VectorRand() * 800 )
particle:SetDieTime( math.Rand(0.8,1.6) )
particle:SetAirResistance( math.Rand(200,600) )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.Rand(20,60) )
particle:SetEndSize( math.Rand(80,140) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 80,80,80 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
end
for i = 0, 40 do
local particle = emitter:Add( "sprites/flamelet"..math.random(1,5), pos )
if particle then
particle:SetVelocity( VectorRand() * 1000 )
particle:SetDieTime( 0.14 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 )
particle:SetEndSize( math.Rand(60,120) )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
emitter:Finish()
local dlight = DynamicLight( math.random(0,9999) )
if dlight then
dlight.pos = pos
dlight.r = 255
dlight.g = 180
dlight.b = 100
dlight.brightness = 8
dlight.Decay = 2000
dlight.Size = 300
dlight.DieTime = CurTime() + 0.1
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,116 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local Pos = data:GetOrigin()
self:Explosion( Pos )
sound.Play( "ambient/explosions/explode_4.wav", Pos, 95, 200, 0.5 )
end
function EFFECT:Explosion( pos )
local emitter = ParticleEmitter( pos, false )
for i = 0,20 do
local particle = emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
if particle then
particle:SetVelocity( VectorRand() * 800 )
particle:SetDieTime( math.Rand(1,2) )
particle:SetAirResistance( math.Rand(1000,1500) )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.Rand(5,15) )
particle:SetEndSize( math.Rand(30,50) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 20,20,20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
end
for i = 0, 20 do
local particle = emitter:Add( "sprites/rico1", pos )
local vel = VectorRand() * 800
if particle then
particle:SetVelocity( vel )
particle:SetAngles( vel:Angle() + Angle(0,90,0) )
particle:SetDieTime( math.Rand(0.1,0.15) )
particle:SetStartAlpha( math.Rand( 200, 255 ) )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.Rand(6,12) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-100,100) )
particle:SetRollDelta( math.Rand(-100,100) )
particle:SetColor( 255, 255, 255 )
particle:SetAirResistance( 0 )
end
end
for i = 0, 40 do
local particle = emitter:Add( "sprites/flamelet"..math.random(1,5), pos )
if particle then
particle:SetVelocity( VectorRand() * 300 )
particle:SetDieTime( 0.14 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 5 )
particle:SetEndSize( math.Rand(10,20) )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
emitter:Finish()
local dlight = DynamicLight( math.random(0,9999) )
if dlight then
dlight.pos = pos
dlight.r = 255
dlight.g = 180
dlight.b = 100
dlight.brightness = 8
dlight.Decay = 2000
dlight.Size = 100
dlight.DieTime = CurTime() + 0.1
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,101 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local Pos = data:GetOrigin()
self:Explosion( Pos )
local random = math.random(1,2)
if random == 1 then
sound.Play( "ambient/explosions/explode_7.wav", Pos, 95, 100, 1 )
else
sound.Play( "ambient/explosions/explode_9.wav", Pos, 95, 100, 1 )
end
end
function EFFECT:Explosion( pos )
local emitter = ParticleEmitter( pos, false )
for i = 0,60 do
local particle = emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
if particle then
particle:SetVelocity( VectorRand() * 600 )
particle:SetDieTime( math.Rand(1.5,2) )
particle:SetAirResistance( math.Rand(200,600) )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.Rand(10,30) )
particle:SetEndSize( math.Rand(60,100) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 80,80,80 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle:SetCollide( false )
end
end
for i = 0, 40 do
local particle = emitter:Add( "sprites/flamelet"..math.random(1,5), pos )
if particle then
particle:SetVelocity( VectorRand() * 500 )
particle:SetDieTime( 0.14 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( 10 )
particle:SetEndSize( math.Rand(30,60) )
particle:SetEndAlpha( 100 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 200,150,150 )
particle:SetCollide( false )
end
end
emitter:Finish()
local dlight = DynamicLight( math.random(0,9999) )
if dlight then
dlight.pos = pos
dlight.r = 255
dlight.g = 180
dlight.b = 100
dlight.brightness = 8
dlight.Decay = 2000
dlight.Size = 200
dlight.DieTime = CurTime() + 0.1
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,164 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local vehicle = data:GetEntity()
if not IsValid( vehicle ) then return end
local ID = vehicle:LookupAttachment( "muzzle" )
if ID == 0 then return end
local Attachment = vehicle:GetAttachment( ID )
local Pos = Attachment.Pos
local Dir = Attachment.Ang:Up()
local vel = vehicle:GetVelocity()
self.emitter = ParticleEmitter( Pos, false )
self:Muzzle( Pos, Dir, vel )
self:Smoke( Pos, Dir, vel )
self:Smoke2( Pos, Attachment.Ang:Forward(), Dir, vel )
self:Smoke2( Pos, -Attachment.Ang:Forward(), Dir, vel )
self.Time = math.Rand(3,6)
self.DieTime = CurTime() + self.Time
self.AttachmentID = ID
self.Vehicle = vehicle
end
function EFFECT:Muzzle( pos, dir, vel )
if not self.emitter then return end
for i = 0,20 do
local particle = self.emitter:Add( "effects/muzzleflash2", pos )
if particle then
particle:SetVelocity( dir * math.Rand(50,200) + vel )
particle:SetDieTime( 0.3 )
particle:SetStartAlpha( 255 )
particle:SetStartSize( math.random(24,60) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 255,255,255 )
particle:SetCollide( false )
end
end
end
function EFFECT:Smoke( pos, dir, vel )
if not self.emitter then return end
for i = 0,10 do
local particle = self.emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
local rCol = math.Rand(120,140)
if particle then
particle:SetVelocity( dir * math.Rand(300,1300) + VectorRand() * math.Rand(0,10) + vel )
particle:SetDieTime( math.Rand(3,4) )
particle:SetAirResistance( math.Rand(300,600) )
particle:SetStartAlpha( math.Rand(50,150) )
particle:SetStartSize( 5 )
particle:SetEndSize( math.Rand(80,160) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( rCol,rCol,rCol )
particle:SetGravity( VectorRand() * 200 + Vector(0,0,200) )
particle:SetCollide( false )
end
end
end
function EFFECT:Smoke2( pos, dir, dir_muzzle, vel )
if not self.emitter then return end
pos = pos + dir_muzzle * 5
for i = 0,20 do
local particle = self.emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
if particle then
particle:SetVelocity( dir * math.Rand(250,800) + VectorRand() * math.Rand(0,50) + vel)
particle:SetDieTime( math.Rand(1,3) )
particle:SetAirResistance( 800 )
particle:SetStartAlpha( 150 )
particle:SetStartSize( 0 )
particle:SetEndSize( math.Rand(20,60) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 120,120,120 )
particle:SetGravity( Vector(0,0,10) )
particle:SetCollide( false )
end
end
end
function EFFECT:Think()
local vehicle = self.Vehicle
if not IsValid( vehicle ) then return false end
if self.DieTime > CurTime() then
if self.emitter then
local intensity = ((self.DieTime - CurTime()) / self.Time)
local Attachment = vehicle:GetAttachment( self.AttachmentID )
local dir = Attachment.Ang:Up()
local pos = Attachment.Pos + dir * 15
for i = 0,math.Rand(3,6) do
local particle = self.emitter:Add( Materials[math.random(1,table.Count( Materials ))], pos )
if particle then
particle:SetVelocity( dir * 2 + VectorRand() * 10 )
particle:SetDieTime( math.Rand(1,2) )
particle:SetAirResistance( 0 )
particle:SetStartAlpha( (intensity ^ 5) * 20 )
particle:SetStartSize( intensity * 5 )
particle:SetEndSize( math.Rand(10,20) * intensity )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( 120,120,120 )
particle:SetGravity( Vector(0,0,20) + VectorRand() * math.Rand(0,5) )
particle:SetCollide( false )
end
end
end
return true
else
if self.emitter then
self.emitter:Finish()
end
return false
end
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,86 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
local Entity = data:GetEntity()
local Mul = data:GetMagnitude()
local Pos = data:GetOrigin()
local Dir = data:GetNormal()
local WheelSize = data:GetRadius()
local ColorIn = data:GetStart()
local VecCol = render.GetLightColor( Pos + Dir ) * 0.4 + Vector(0.6,0.6,0.6)
local Col = Vector( math.min(ColorIn.x * VecCol.x, 255), math.min(ColorIn.y * VecCol.y, 255), math.min(ColorIn.z * VecCol.z, 255) )
local Ran = Vector( math.Rand( -WheelSize, WheelSize ), math.Rand( -WheelSize, WheelSize ),math.Rand( -WheelSize, WheelSize ) ) * 0.3
local OffsetPos = Pos + Ran + Vector(0,0,WheelSize * 0.2)
local emitter = ParticleEmitter(Pos, false )
if emitter then
local OffsetPos2 = OffsetPos + Ran * 0.4 + Vector(0,0,-WheelSize)
local particle1 = emitter:Add( Materials[math.Round(math.Rand(1, table.Count(Materials) ),0)], OffsetPos )
local particle2 = emitter:Add( Materials[math.Round(math.Rand(1, table.Count(Materials) ),0)], OffsetPos2 )
if particle1 then
particle1:SetVelocity( Vector(0,0,-50) )
particle1:SetDieTime( 0.5 )
particle1:SetStartAlpha( 255 * Mul ^ 2 )
particle1:SetStartSize( 16 * Mul )
particle1:SetEndSize( 32 * Mul )
particle1:SetRoll( math.Rand( -1, 1 ) )
particle1:SetColor( Col.x * 0.9,Col.y * 0.9,Col.z * 0.9 )
particle1:SetCollide( true )
end
if particle2 then
particle2:SetGravity( Vector(0,0,12) + Ran * 0.2 )
particle2:SetVelocity( Dir * 30 * (3 - Mul) + Vector(0,0,15) + Ran * Mul )
particle2:SetDieTime( math.Rand( 2, 4 ) * Mul )
particle2:SetStartAlpha( 100 * Mul )
particle2:SetStartSize( WheelSize * 0.7 * Mul )
particle2:SetEndSize( math.Rand( 80, 160 ) * Mul ^ 2 )
particle2:SetRoll( math.Rand( -1, 1 ) )
particle2:SetColor( Col.x,Col.y,Col.z )
particle2:SetCollide( false )
end
emitter:Finish()
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,120 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--DO NOT EDIT OR REUPLOAD THIS FILE
EFFECT.Mat = Material( "effects/simfphys_armed/spark" )
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Init( data )
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Dir = self.EndPos - self.StartPos
self:SetRenderBoundsWS( self.StartPos, self.EndPos )
self.TracerTime = math.min( 1, self.StartPos:Distance( self.EndPos ) / 15000 )
self.Length = math.Rand( 0.05, 0.1 )
-- Die when it reaches its target
self.DieTime = CurTime() + self.TracerTime
local Dir = self.Dir:GetNormalized()
local emitter = ParticleEmitter( self.StartPos, false )
for i = 0, 12 do
local Pos = self.StartPos + Dir * i * 0.7 * math.random(1,2) * 0.5
local particle = emitter:Add( "effects/muzzleflash2", Pos )
local Size = 1
if particle then
particle:SetVelocity( Dir * 800 )
particle:SetDieTime( 0.05 )
particle:SetStartAlpha( 255 * Size )
particle:SetStartSize( math.max( math.random(10,24) - i * 0.5,0.1 ) * Size )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -1, 1 ) )
particle:SetColor( 255,255,255 )
particle:SetCollide( false )
end
end
for i = 0,20 do
local particle = emitter:Add( Materials[math.random(1,table.Count( Materials ))],self.StartPos )
local rCol = 255
if particle then
particle:SetVelocity( Dir * math.Rand(1000,3000) + VectorRand() * math.Rand(0,10) )
particle:SetDieTime( math.Rand(0.05,0.2) )
particle:SetAirResistance( math.Rand(50,100) )
particle:SetStartAlpha( 20 )
particle:SetStartSize( 2 )
particle:SetEndSize( math.Rand(5,10) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( rCol,rCol,rCol )
particle:SetGravity( VectorRand() * 200 + Vector(0,0,200) )
particle:SetCollide( false )
end
end
emitter:Finish()
end
function EFFECT:Think()
if CurTime() > self.DieTime then
return false
end
return true
end
function EFFECT:Render()
local fDelta = ( self.DieTime - CurTime() ) / self.TracerTime
fDelta = math.Clamp( fDelta, 0, 1 ) ^ 1
local sinWave = math.sin( fDelta * math.pi )
local Pos1 = self.EndPos - self.Dir * ( fDelta - sinWave * self.Length )
render.SetMaterial( self.Mat )
render.DrawBeam( Pos1,
self.EndPos - self.Dir * ( fDelta + sinWave * self.Length ),
15, 1, 0, Color( 255, 255, 255, 255 ) )
end

View File

@@ -0,0 +1,96 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
--DO NOT EDIT OR REUPLOAD THIS FILE
function EFFECT:Init( data )
self.Pos = data:GetOrigin()
self.mat = Material( "sprites/light_glow02_add" )
self.LifeTime = 0.2
self.DieTime = CurTime() + self.LifeTime
self:Spark( self.Pos )
end
local Materials = {
"particle/smokesprites_0001",
"particle/smokesprites_0002",
"particle/smokesprites_0003",
"particle/smokesprites_0004",
"particle/smokesprites_0005",
"particle/smokesprites_0006",
"particle/smokesprites_0007",
"particle/smokesprites_0008",
"particle/smokesprites_0009",
"particle/smokesprites_0010",
"particle/smokesprites_0011",
"particle/smokesprites_0012",
"particle/smokesprites_0013",
"particle/smokesprites_0014",
"particle/smokesprites_0015",
"particle/smokesprites_0016"
}
function EFFECT:Spark( pos )
local emitter = ParticleEmitter( pos, false )
for i = 0, 10 do
local particle = emitter:Add( "sprites/rico1", pos )
local vel = VectorRand() * 500
if particle then
particle:SetVelocity( vel )
particle:SetAngles( vel:Angle() + Angle(0,90,0) )
particle:SetDieTime( math.Rand(0.05,0.1) )
particle:SetStartAlpha( math.Rand( 200, 255 ) )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.Rand(3,6) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(-100,100) )
particle:SetRollDelta( math.Rand(-100,100) )
particle:SetColor( 255, 255, 255 )
particle:SetAirResistance( 0 )
end
end
for i = 0,20 do
local particle = emitter:Add( Materials[math.random(1,table.Count( Materials ))],pos )
local rCol = 255
if particle then
particle:SetVelocity( VectorRand() * math.Rand(50,100) )
particle:SetDieTime( math.Rand(0.05,0.2) )
particle:SetAirResistance( math.Rand(50,100) )
particle:SetStartAlpha( 20 )
particle:SetStartSize( 2 )
particle:SetEndSize( math.Rand(5,10) )
particle:SetRoll( math.Rand(-1,1) )
particle:SetColor( rCol,rCol,rCol )
particle:SetGravity( VectorRand() * 200 + Vector(0,0,200) )
particle:SetCollide( false )
end
end
emitter:Finish()
end
function EFFECT:Think()
if self.DieTime < CurTime() then return false end
return true
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,56 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
function EFFECT:Init(data)
local posoffset = data:GetOrigin()
local emitter = ParticleEmitter(posoffset)
if TFA.GetGasEnabled() then
local p = emitter:Add("sprites/heatwave", posoffset)
p:SetVelocity(50 * data:GetNormal() + 0.5 * VectorRand())
p:SetAirResistance(200)
p:SetStartSize(math.random(12.5, 17.5))
p:SetEndSize(2)
p:SetDieTime(math.Rand(0.15, 0.225))
p:SetRoll(math.Rand(-180, 180))
p:SetRollDelta(math.Rand(-0.75, 0.75))
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
return false
end

View File

@@ -0,0 +1,72 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
function EFFECT:Init(data)
local ply = data:GetEntity()
local ent
if IsValid(ply) and ply:IsPlayer() then
ent = ply:GetActiveWeapon()
end
local sfac = (IsValid(ent) and ent.Primary and ent.Primary.Damage) and math.sqrt(ent.Primary.Damage / 30) or 1
local sfac_sqrt = math.sqrt(sfac)
local posoffset = data:GetOrigin()
local forward = data:GetNormal()
local emitter = ParticleEmitter(posoffset)
for i = 0, math.Round(8 * sfac) do
local p = emitter:Add("particle/particle_smokegrenade", posoffset)
p:SetVelocity(90 * math.sqrt(i) * forward)
p:SetAirResistance(400)
p:SetStartAlpha(math.Rand(255, 255))
p:SetEndAlpha(0)
p:SetDieTime(math.Rand(0.75, 1) * (1 + math.sqrt(i) / 3))
local iclamped = math.Clamp(i, 1, 8)
local iclamped_sqrt = math.sqrt(iclamped / 8) * 8
p:SetStartSize(math.Rand(1, 1) * sfac_sqrt * iclamped_sqrt)
p:SetEndSize(math.Rand(1.5, 1.75) * sfac_sqrt * iclamped)
p:SetRoll(math.Rand(-25, 25))
p:SetRollDelta(math.Rand(-0.05, 0.05))
p:SetColor(255, 255, 255)
p:SetLighting(true)
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
return false
end

View File

@@ -0,0 +1,87 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local gravity_cv = GetConVar("sv_gravity")
EFFECT.VelocityRandom = 0.25
EFFECT.VelocityMin = 95
EFFECT.VelocityMax = 125
EFFECT.ParticleCountMin = 4
EFFECT.ParticleCountMax = 7
EFFECT.ParticleLife = 1.3
function EFFECT:Init(data)
self.StartPos = data:GetOrigin()
self.Dir = data:GetNormal()
self.LifeTime = 0.1
self.DieTime = CurTime() + self.LifeTime
self.PartMult = 0.2
self.Grav = Vector(0, 0, -gravity_cv:GetFloat())
self.SparkLife = 1
local emitter = ParticleEmitter(self.StartPos)
local partcount = math.random(self.ParticleCountMin, self.ParticleCountMax)
--Sparks
for _ = 1, partcount do
local part = emitter:Add("effects/yellowflare", self.StartPos)
part:SetVelocity(Lerp(self.VelocityRandom, self.Dir, VectorRand()) * math.Rand(self.VelocityMin, self.VelocityMax))
part:SetDieTime(math.Rand(0.25, 1) * self.SparkLife)
part:SetStartAlpha(255)
part:SetStartSize(math.Rand(2, 4))
part:SetEndSize(0)
part:SetRoll(0)
part:SetGravity(self.Grav)
part:SetCollide(true)
part:SetBounce(0.55)
part:SetAirResistance(0.5)
part:SetStartLength(0.2)
part:SetEndLength(0)
part:SetVelocityScale(true)
part:SetCollide(true)
end
--Impact
local part = emitter:Add("effects/yellowflare", self.StartPos)
part:SetStartAlpha(255)
part:SetStartSize(15 * self.PartMult)
part:SetDieTime(self.LifeTime * 1)
part:SetEndSize(0)
part:SetEndAlpha(0)
part:SetRoll(math.Rand(0, 360))
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
return false
end

View File

@@ -0,0 +1,155 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local vector_origin = Vector()
local smokecol = Color(225, 225, 225, 200)
local smokemat = Material("trails/smoke")
smokemat:SetInt("$nocull", 1)
function EFFECT:AddPart()
local pos, rawdat, norm
pos = self.startpos
norm = self.startnormal
if self.targent and self.targatt then
--pos = self:GetTracerShootPos(self.startpos, self.targent, self.targatt)
rawdat = self.targent:GetAttachment(self.targatt)
if rawdat then
pos = rawdat.Pos
norm = rawdat.Ang:Forward()
end
end
local p = {}
p.position = pos
p.normal = norm
p.velocity = p.normal * 5
p.startlife = CurTime()
p.lifetime = self.lifetime
p.radius = self.radius
if self.vparticles then
table.insert(self.vparticles, #self.vparticles + 1, p)
end
end
function EFFECT:ProcessFakeParticles()
self.stepcount = self.stepcount + 1
if self.vparticles then
if CurTime() < self.emittime and self.stepcount % self.partinterval == 0 then
self:AddPart()
end
for k, v in ipairs(self.vparticles) do
v.position = v.position + v.velocity * FrameTime()
v.velocity = v.velocity + self.grav * FrameTime()
if CurTime() > v.startlife + v.lifetime then
--print("Curtime:"..CurTime())
--print("Lifetime:"..v.lifetime)
--print("CTime:"..v.startlife)
table.remove(self.vparticles, k)
end
end
if #self.vparticles <= 0 then
return false
else
return true
end
else
return true
end
end
local cv_gr = GetConVar("sv_gravity")
function EFFECT:Init(ef)
self.lifetime = 1
self.stepcount = 0
self.partinterval = 3
self.emittime = CurTime() + 3
self.targent = ef:GetEntity()
self.targatt = ef:GetAttachment()
self.startpos = ef:GetOrigin()
self.startnormal = ef:GetNormal()
self.radius = ef:GetRadius()
self.grav = Vector(0, 0, cv_gr:GetFloat() * 0.2)
self.randfac = 1
if not self.startpos then
self.startpos = vector_origin
if LocalPlayer():IsValid() then
self.startpos = LocalPlayer():GetShootPos()
end
end
if not self.startnormal then
self.startnormal = vector_origin
end
if not self.radius or self.radius == 0 then
self.radius = 1
end
self.vparticles = {}
self:AddPart()
end
function EFFECT:Think()
if self.vparticles and #self.vparticles <= 0 then return false end
return true
end
function EFFECT:DrawBeam()
render.StartBeam(#self.vparticles)
for k, v in ipairs(self.vparticles) do
local alphac = ColorAlpha(smokecol, (1 - (CurTime() - v.startlife) / v.lifetime) * 64)
render.AddBeam(v.position, v.radius * (1 - k / #self.vparticles), k / #self.vparticles, alphac)
end
render.EndBeam()
end
function EFFECT:Render()
self:ProcessFakeParticles()
if self.vparticles and #self.vparticles >= 2 then
render.SetMaterial(smokemat)
self:DrawBeam()
end
end

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.1
EFFECT.XFlashSize = 1
EFFECT.FlashSize = 1
EFFECT.SmokeSize = 0
EFFECT.SparkSize = 1.5
EFFECT.HeatSize = 1.5
EFFECT.Color = Color(162,192,255)
EFFECT.ColorSprites = true

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.15
EFFECT.XFlashSize = 1
EFFECT.FlashSize = 1
EFFECT.SmokeSize = 0
EFFECT.SparkSize = 1.25
EFFECT.HeatSize = 1
EFFECT.Color = Color(128,192,255)
EFFECT.ColorSprites = true

View File

@@ -0,0 +1,133 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local blankvec = Vector(0, 0, 0)
local vector_origin = Vector()
function EFFECT:Init(data)
self.Position = blankvec
self.WeaponEnt = data:GetEntity()
self.WeaponEntOG = self.WeaponEnt
self.Attachment = data:GetAttachment()
self.Dir = data:GetNormal()
local owent
if IsValid(self.WeaponEnt) then
owent = self.WeaponEnt:GetOwner()
end
if not IsValid(owent) then
owent = self.WeaponEnt:GetParent()
end
if IsValid(owent) and owent:IsPlayer() then
if owent ~= LocalPlayer() or owent:ShouldDrawLocalPlayer() then
self.WeaponEnt = owent:GetActiveWeapon()
if not IsValid(self.WeaponEnt) then return end
else
self.WeaponEnt = owent:GetViewModel()
local theirweapon = owent:GetActiveWeapon()
if IsValid(theirweapon) and theirweapon.ViewModelFlip or theirweapon.ViewModelFlipped then
self.Flipped = true
end
if not IsValid(self.WeaponEnt) then return end
end
end
if IsValid(self.WeaponEntOG) and self.WeaponEntOG.MuzzleAttachment then
self.Attachment = self.WeaponEnt:LookupAttachment(self.WeaponEntOG.MuzzleAttachment)
if not self.Attachment or self.Attachment <= 0 then
self.Attachment = 1
end
if self.WeaponEntOG:GetStatL("IsAkimbo") then
self.Attachment = 2 - self.WeaponEntOG:GetAnimCycle()
end
end
local angpos = self.WeaponEnt:GetAttachment(self.Attachment)
if not angpos or not angpos.Pos then
angpos = {
Pos = vector_origin,
Ang = angle_zero
}
end
if self.Flipped then
local tmpang = (self.Dir or angpos.Ang:Forward()):Angle()
local localang = self.WeaponEnt:WorldToLocalAngles(tmpang)
localang.y = localang.y + 180
localang = self.WeaponEnt:LocalToWorldAngles(localang)
--localang:RotateAroundAxis(localang:Up(),180)
--tmpang:RotateAroundAxis(tmpang:Up(),180)
self.Dir = localang:Forward()
end
-- Keep the start and end Pos - we're going to interpolate between them
self.Position = self:GetTracerShootPos(angpos.Pos, self.WeaponEnt, self.Attachment)
self.Norm = self.Dir
self.vOffset = self.Position
local dir = self.Norm
local dlight
if IsValid(self.WeaponEnt) then
dlight = DynamicLight(self.WeaponEnt:EntIndex())
else
dlight = DynamicLight(0)
end
local fadeouttime = 0.2
if (dlight) then
dlight.Pos = self.Position + dir * 1 - dir:Angle():Right() * 5
dlight.r = 25
dlight.g = 200
dlight.b = 255
dlight.Brightness = 4.0
dlight.size = 96
dlight.decay = 1000
dlight.DieTime = CurTime() + fadeouttime
end
ParticleEffectAttach("tfa_muzzle_gauss", PATTACH_POINT_FOLLOW, self.WeaponEnt, data:GetAttachment())
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.075
EFFECT.XFlashSize = 0.5
EFFECT.FlashSize = 0.8
EFFECT.SmokeSize = 1
EFFECT.SparkSize = 1
EFFECT.HeatSize = 1
EFFECT.Color = Color(255, 225, 128)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.125
EFFECT.XFlashSize = 0
EFFECT.FlashSize = 1
EFFECT.SmokeSize = 2
EFFECT.SparkSize = 2
EFFECT.HeatSize = 2
EFFECT.Color = Color(255, 128, 64)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.07
EFFECT.XFlashSize = 0.5
EFFECT.FlashSize = 0.8
EFFECT.SmokeSize = 1
EFFECT.SparkSize = 1
EFFECT.HeatSize = 1
EFFECT.Color = Color(255, 225, 128)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.1
EFFECT.XFlashSize = 0
EFFECT.FlashSize = 1
EFFECT.SmokeSize = 2
EFFECT.SparkSize = 1
EFFECT.HeatSize = 1.25
EFFECT.Color = Color(255, 225, 128)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.1
EFFECT.XFlashSize = 1
EFFECT.FlashSize = 1
EFFECT.SmokeSize = 1
EFFECT.SparkSize = 1
EFFECT.HeatSize = 1
EFFECT.Color = Color(255, 192, 64)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.125
EFFECT.XFlashSize = 0
EFFECT.FlashSize = 1.3
EFFECT.SmokeSize = 2
EFFECT.SparkSize = 1.5
EFFECT.HeatSize = 2
EFFECT.Color = Color(255, 225, 128)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,42 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.1
EFFECT.XFlashSize = 0
EFFECT.FlashSize = 0.1
EFFECT.SmokeSize = 2
EFFECT.SparkSize = 1
EFFECT.HeatSize = 1
EFFECT.Color = Color(255, 225, 128)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.075
EFFECT.XFlashSize = 1
EFFECT.FlashSize = 1
EFFECT.SmokeSize = 1
EFFECT.SparkSize = 1
EFFECT.HeatSize = 1
EFFECT.Color = Color(255, 225, 128)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.125
EFFECT.XFlashSize = 1.5
EFFECT.FlashSize = 1.2
EFFECT.SmokeSize = 2
EFFECT.SparkSize = 1.3
EFFECT.HeatSize = 2
EFFECT.Color = Color(255, 225, 128)
EFFECT.ColorSprites = false

View File

@@ -0,0 +1,41 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
include("tfa/muzzleflash_base.lua")
EFFECT.Life = 0.125
EFFECT.XFlashSize = 2
EFFECT.FlashSize = 2
EFFECT.SmokeSize = 0
EFFECT.SparkSize = 1.45
EFFECT.HeatSize = 2
EFFECT.Color = Color(128,192,255)
EFFECT.ColorSprites = true

View File

@@ -0,0 +1,105 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local ang
local limit_particle_cv = GetConVar("cl_tfa_fx_muzzlesmoke_limited")
local SMOKEDELAY = 1.5
function EFFECT:Init(data)
self.WeaponEnt = data:GetEntity()
if not IsValid(self.WeaponEnt) then return end
self.WeaponEntOG = self.WeaponEnt
if limit_particle_cv:GetBool() and self.WeaponEnt:GetOwner() ~= LocalPlayer() then return end
self.Attachment = data:GetAttachment()
local smokepart = "smoke_trail_tfa"
local delay = self.WeaponEnt.GetStatL and self.WeaponEnt:GetStatL("SmokeDelay") or self.WeaponEnt.SmokeDelay
if self.WeaponEnt.SmokeParticle then
smokepart = self.WeaponEnt.SmokeParticle
elseif self.WeaponEnt.SmokeParticles then
smokepart = self.WeaponEnt.SmokeParticles[self.WeaponEnt.DefaultHoldType or self.WeaponEnt.HoldType] or smokepart
end
self.Position = self:GetTracerShootPos(data:GetOrigin(), self.WeaponEnt, self.Attachment)
if IsValid(self.WeaponEnt:GetOwner()) then
if self.WeaponEnt:GetOwner() == LocalPlayer() then
if not self.WeaponEnt:IsFirstPerson() then
ang = self.WeaponEnt:GetOwner():EyeAngles()
ang:Normalize()
--ang.p = math.max(math.min(ang.p,55),-55)
self.Forward = ang:Forward()
else
self.WeaponEnt = self.WeaponEnt:GetOwner():GetViewModel()
end
--ang.p = math.max(math.min(ang.p,55),-55)
else
ang = self.WeaponEnt:GetOwner():EyeAngles()
ang:Normalize()
self.Forward = ang:Forward()
end
end
if TFA.GetMZSmokeEnabled == nil or TFA.GetMZSmokeEnabled() then
local e = self.WeaponEnt
local w = self.WeaponEntOG
local a = self.Attachment
local tn = "tfasmokedelay_" .. w:EntIndex() .. "_" .. a
local sp = smokepart
if timer.Exists(tn) then
timer.Remove(tn)
end
e.SmokePCF = e.SmokePCF or {}
local _a = w:GetStatL("IsAkimbo") and a or 1
if IsValid(e.SmokePCF[_a]) then
e.SmokePCF[_a]:StopEmission()
end
timer.Create(tn, delay or SMOKEDELAY, 1, function()
if not IsValid(e) then return end
e.SmokePCF[_a] = CreateParticleSystem(e, sp, PATTACH_POINT_FOLLOW, a)
if IsValid(e.SmokePCF[_a]) then
e.SmokePCF[_a]:StartEmission()
end
end)
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,163 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local PenetColor = Color(255, 255, 255, 255)
local PenetMat = Material("trails/smoke")
local PenetMat2 = Material("effects/yellowflare")
local cv_gv = GetConVar("sv_gravity")
local cv_sl = GetConVar("cl_tfa_fx_impact_ricochet_sparklife")
--local cv_sc = GetConVar("cl_tfa_fx_impact_ricochet_sparks")
local DFX = {
["AR2Tracer"] = true,
["Tracer"] = true,
["GunshipTracer"] = true,
["GaussTracer"] = true,
["AirboatGunTracer"] = true,
["AirboatGunHeavyTracer"] = true
}
function EFFECT:Init(data)
self.StartPos = data:GetOrigin()
self.Dir = data:GetNormal()
self.Dir:Normalize()
self.Len = 32
self.EndPos = self.StartPos + self.Dir * self.Len
self.LifeTime = 0.75
self.DieTime = CurTime() + self.LifeTime
self.Thickness = 1
self.Grav = Vector(0, 0, -cv_gv:GetFloat())
self.PartMult = data:GetRadius()
self.SparkLife = cv_sl:GetFloat()
self.WeaponEnt = data:GetEntity()
if not IsValid(self.WeaponEnt) then return end
if self.WeaponEnt.TracerPCF then
local traceres = util.QuickTrace(self.StartPos, self.Dir * 9999999, Entity(math.Round(data:GetScale())))
self.EndPos = traceres.HitPos or self.StartPos
local efn = self.WeaponEnt.TracerName
local spos = self.StartPos
local cnt = math.min(math.Round(data:GetMagnitude()), 6000)
timer.Simple(cnt / 1000000, function()
TFA.ParticleTracer(efn, spos, traceres.HitPos or spos, false)
end)
return
end
local tn = self.WeaponEnt.BulletTracerName
if tn and tn ~= "" and not DFX[tn] then
local fx = EffectData()
fx:SetStart(self.StartPos)
local traceres = util.QuickTrace(self.StartPos, self.Dir * 9999999, Entity(math.Round(data:GetScale())))
self.EndPos = traceres.HitPos or self.StartPos
fx:SetOrigin(self.EndPos)
fx:SetEntity(self.WeaponEnt)
fx:SetMagnitude(1)
util.Effect(tn, fx)
SafeRemoveEntityDelayed(self, 0)
--Sparks
--Impact
return
else
local emitter = ParticleEmitter(self.StartPos)
--[[
for i = 1, cv_sc:GetFloat() * self.PartMult * 0.1 do
local part = emitter:Add("effects/yellowflare", self.StartPos)
part:SetVelocity((self.Dir + VectorRand() * 0.5) * math.Rand(75, 185))
part:SetDieTime(math.Rand(0.25, 1) * self.SparkLife)
part:SetStartAlpha(255)
part:SetStartSize(math.Rand(2, 4))
part:SetEndSize(0)
part:SetRoll(0)
part:SetGravity(self.Grav)
part:SetCollide(true)
part:SetBounce(0.55)
part:SetAirResistance(0.5)
part:SetStartLength(0.2)
part:SetEndLength(0)
part:SetVelocityScale(true)
part:SetCollide(true)
end
]]
--
local part = emitter:Add("effects/select_ring", self.StartPos)
part:SetStartAlpha(225)
part:SetStartSize(1)
part:SetDieTime(self.LifeTime / 5)
part:SetEndSize(0)
part:SetEndAlpha(0)
part:SetRoll(math.Rand(0, 360))
part:SetColor(200, 200, 200)
part = emitter:Add("effects/select_ring", self.StartPos)
part:SetStartAlpha(255)
part:SetStartSize(1.5 * self.PartMult)
part:SetDieTime(self.LifeTime / 6)
part:SetEndSize(0)
part:SetEndAlpha(0)
part:SetRoll(math.Rand(0, 360))
part:SetColor(200, 200, 200)
emitter:Finish()
end
end
function EFFECT:Think()
if self.DieTime and (CurTime() > self.DieTime) then return false end
return true
end
function EFFECT:Render()
if self.DieTime then
local fDelta = (self.DieTime - CurTime()) / self.LifeTime
fDelta = math.Clamp(fDelta, 0, 1)
render.SetMaterial(PenetMat)
local color = ColorAlpha(PenetColor, 32 * fDelta)
local precision = 16
local i = 1
while i <= precision do
render.DrawBeam(self.StartPos + self.Dir * self.Len * ((i - 1) / precision), self.StartPos + self.Dir * self.Len * (i / precision), self.Thickness * fDelta * (1 - i / precision), 0.5, 0.5, color)
i = i + 1
end
render.SetMaterial(PenetMat2)
i = 1
while i <= precision do
render.DrawBeam(self.StartPos + self.Dir * self.Len * ((i - 1) / precision), self.StartPos + self.Dir * self.Len * (i / precision), self.Thickness / 3 * 2 * fDelta * (1 - i / precision), 0.5, 0.5, color)
i = i + 1
end
end
end

View File

@@ -0,0 +1,121 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local RicochetColor = Color(255, 255, 255, 255)
local RicochetIDOffset = 33
local RicochetMat = Material("effects/yellowflare")
local cv_gv = GetConVar("sv_gravity")
local cv_sl = GetConVar("cl_tfa_fx_impact_ricochet_sparklife")
local cv_sc = GetConVar("cl_tfa_fx_impact_ricochet_sparks")
function EFFECT:Init(data)
self.StartPos = data:GetOrigin()
self.Dir = data:GetNormal()
self.Dir:Normalize()
self.Len = 128
self.EndPos = self.StartPos + self.Dir * self.Len
self.LifeTime = 0.1
self.DieTime = CurTime() + self.LifeTime
self.Grav = Vector(0, 0, -cv_gv:GetFloat())
self.PartMult = data:GetMagnitude()
self.SparkLife = cv_sl:GetFloat()
local emitter = ParticleEmitter(self.StartPos)
--Sparks
for _ = 1, cv_sc:GetInt() * self.PartMult do
local part = emitter:Add("effects/yellowflare", self.StartPos)
part:SetVelocity((self.Dir + VectorRand() * 0.5) * math.Rand(75, 185))
part:SetDieTime(math.Rand(0.25, 1) * self.SparkLife)
part:SetStartAlpha(255)
part:SetStartSize(math.Rand(2, 4))
part:SetEndSize(0)
part:SetRoll(0)
part:SetGravity(self.Grav)
part:SetCollide(true)
part:SetBounce(0.55)
part:SetAirResistance(0.5)
part:SetStartLength(0.2)
part:SetEndLength(0)
part:SetVelocityScale(true)
part:SetCollide(true)
end
--Impact
local part = emitter:Add("effects/yellowflare", self.StartPos)
part:SetStartAlpha(225)
part:SetStartSize(64)
part:SetDieTime(self.LifeTime)
part:SetEndSize(0)
part:SetEndAlpha(0)
part:SetRoll(math.Rand(0, 360))
part = emitter:Add("effects/yellowflare", self.StartPos)
part:SetStartAlpha(255)
part:SetStartSize(30 * self.PartMult)
part:SetDieTime(self.LifeTime * 1.5)
part:SetEndSize(0)
part:SetEndAlpha(0)
part:SetRoll(math.Rand(0, 360))
emitter:Finish()
local dlight = DynamicLight(LocalPlayer():EntIndex() + RicochetIDOffset)
if (dlight) then
dlight.Pos = self.StartPos
dlight.r = 255
dlight.g = 225
dlight.b = 185
dlight.Brightness = 2.75 * self.PartMult
dlight.size = 48
--dlight.DieTime = CurTime() + self.DieTime*0.7
dlight.Decay = 1000 / math.max(0.01, math.min(self.SparkLife * 0.66, 1))
end
end
function EFFECT:Think()
if self.DieTime and (CurTime() > self.DieTime) then return false end
return true
end
function EFFECT:Render()
if self.DieTime then
local fDelta = (self.DieTime - CurTime()) / self.LifeTime
fDelta = math.Clamp(fDelta, 0, 1)
render.SetMaterial(RicochetMat)
local color = ColorAlpha(RicochetColor, 255 * fDelta)
local precision = 16
local i = 1
while i <= precision do
render.DrawBeam(self.StartPos + self.Dir * self.Len * ((i - 1) / precision), self.StartPos + self.Dir * self.Len * (i / precision), 8 * fDelta * (1 - i / precision), 0.5, 0.5, color)
i = i + 1
end
end
end

View File

@@ -0,0 +1,261 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
EFFECT.Velocity = {120, 160}
EFFECT.VelocityRand = {-15, 40}
EFFECT.VelocityAngle = Vector(1,1,10)
EFFECT.VelocityRandAngle = Vector(10,10,5)
local modelReplaceLookup = {
["models/hdweapons/rifleshell.mdl"] = "models/tfa/rifleshell.mdl",
["models/hdweapons/rifleshell_hd.mdl"] = "models/tfa/rifleshell.mdl",
["models/weapons/rifleshell_hd.mdl"] = "models/tfa/rifleshell.mdl",
["models/hdweapons/shell.mdl"] = "models/tfa/pistolshell.mdl",
["models/hdweapons/shell_hd.mdl"] = "models/tfa/pistolshell.mdl",
["models/weapons/shell_hd.mdl"] = "models/tfa/pistolshell.mdl",
["models/hdweapons/shotgun_shell.mdl"] = "models/tfa/shotgunshell.mdl",
["models/hdweapons/shotgun_shell_hd.mdl"] = "models/tfa/shotgunshell.mdl",
["models/weapons/shotgun_shell_hd.mdl"] = "models/tfa/shotgunshell.mdl",
}
EFFECT.ShellPresets = {
["sniper"] = {"models/tfa/rifleshell.mdl", math.pow(0.487 / 1.236636, 1 / 3), 90}, --1.236636 is shell diameter, then divide base diameter into that for 7.62x54mm
["rifle"] = {"models/tfa/rifleshell.mdl", math.pow(0.4709 / 1.236636, 1 / 3), 90}, --1.236636 is shell diameter, then divide base diameter into that for standard nato rifle
["pistol"] = {"models/tfa/pistolshell.mdl", math.pow(0.391 / 0.955581, 1 / 3), 90}, --0.955581 is shell diameter, then divide base diameter into that for 9mm luger
["smg"] = {"models/tfa/pistolshell.mdl", math.pow(.476 / 0.955581, 1 / 3), 90}, --.45 acp
["shotgun"] = {"models/tfa/shotgunshell.mdl", 1, 90}
}
EFFECT.SoundFiles = {Sound(")player/pl_shell1.wav"), Sound(")player/pl_shell2.wav"), Sound(")player/pl_shell3.wav")}
EFFECT.SoundFilesSG = {Sound(")weapons/fx/tink/shotgun_shell1.wav"), Sound(")weapons/fx/tink/shotgun_shell2.wav"), Sound(")weapons/fx/tink/shotgun_shell3.wav")}
EFFECT.SoundLevel = {45, 55}
EFFECT.SoundPitch = {80, 120}
EFFECT.SoundVolume = {0.85, 0.95}
EFFECT.LifeTime = 15
EFFECT.FadeTime = 0.5
EFFECT.SmokeTime = {3, 3}
EFFECT.SmokeParticle = "tfa_ins2_weapon_shell_smoke"
local cv_eject
local cv_life
local upVec = Vector(0,0,1)
function EFFECT:ComputeSmokeLighting()
if not self.PCFSmoke then return end
local licht = render.ComputeLighting(self:GetPos() + upVec * 2, upVec)
local lichtFloat = math.Clamp((licht.r + licht.g + licht.b) / 3, 0, TFA.Particles.SmokeLightingClamp) / TFA.Particles.SmokeLightingClamp
local lichtFinal = LerpVector(lichtFloat, TFA.Particles.SmokeLightingMin, TFA.Particles.SmokeLightingMax)
self.PCFSmoke:SetControlPoint(1, lichtFinal)
end
function EFFECT:Init(data)
self.IsTFAShell = true
if not cv_eject then
cv_eject = GetConVar("cl_tfa_fx_ejectionsmoke")
end
if not cv_life then
cv_life = GetConVar("cl_tfa_fx_ejectionlife")
end
if cv_life then
self.LifeTime = cv_life:GetFloat()
end
self.StartTime = CurTime()
self.Emitter = ParticleEmitter(self:GetPos())
self.SmokeDelta = 0
if cv_eject:GetBool() then
self.SmokeDeath = self.StartTime + math.Rand(self.SmokeTime[1], self.SmokeTime[2])
else
self.SmokeDeath = -1
end
self.WeaponEnt = data:GetEntity()
if not IsValid(self.WeaponEnt) then return end
self.WeaponEntOG = self.WeaponEnt
if self.WeaponEntOG.LuaShellEffect and self.WeaponEntOG.LuaShellEffect == "" then return end
self.Attachment = data:GetAttachment()
self.Dir = data:GetNormal()
self.DirAng = data:GetNormal():Angle()
self.OriginalOrigin = data:GetOrigin()
local owent = self.WeaponEnt:GetOwner()
if self.LifeTime <= 0 or not IsValid(owent) then
self.StartTime = -1000
self.SmokeDeath = -1000
return
end
if owent:IsPlayer() and owent == GetViewEntity() and not owent:ShouldDrawLocalPlayer() then
self.WeaponEnt = owent:GetViewModel()
if not IsValid(self.WeaponEnt) then return end
end
local model, scale, yaw = self:FindModel(self.WeaponEntOG)
model = self.WeaponEntOG:GetStatL("ShellModel") or self.WeaponEntOG:GetStatL("LuaShellModel") or model
model = modelReplaceLookup[model] or model
scale = self.WeaponEntOG:GetStatL("ShellScale") or self.WeaponEntOG:GetStatL("LuaShellScale") or scale
yaw = self.WeaponEntOG:GetStatL("ShellYaw") or self.WeaponEntOG:GetStatL("LuaShellYaw") or yaw
if model:lower():find("shotgun") then
self.Shotgun = true
end
self:SetModel(model)
self:SetModelScale(scale, 0)
self:SetPos(data:GetOrigin())
local mdlang = self.DirAng * 1
mdlang:RotateAroundAxis(mdlang:Up(), yaw)
local owang = IsValid(owent) and owent:EyeAngles() or mdlang
self:SetAngles(owang)
self:SetRenderMode(RENDERMODE_TRANSALPHA)
self:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
self:SetCollisionBounds(self:OBBMins(), self:OBBMaxs())
self:PhysicsInitBox(self:OBBMins(), self:OBBMaxs())
local velocity = self.Dir * math.Rand(self.Velocity[1], self.Velocity[2]) + owang:Forward() * math.Rand(self.VelocityRand[1], self.VelocityRand[2])
if IsValid(owent) then
velocity = velocity + owent:GetVelocity()
end
local physObj = self:GetPhysicsObject()
if physObj:IsValid() then
physObj:SetDamping(0.1, 1)
physObj:SetMass(5)
physObj:SetMaterial("gmod_silent")
physObj:SetVelocity(velocity)
local localVel = velocity:Length() * self.WeaponEnt:WorldToLocalAngles(velocity:Angle()):Forward()
physObj:AddAngleVelocity(localVel.y * self.VelocityAngle)
physObj:AddAngleVelocity(VectorRand() * velocity:Length() * self.VelocityRandAngle * 0.5)
end
local ss = self.WeaponEntOG:GetStatL("ShellSound") or self.WeaponEntOG:GetStatL("LuaShellSound")
if ss then
self.ImpactSound = ss
else
self.ImpactSound = self.Shotgun and self.SoundFilesSG[math.random(1, #self.SoundFiles)] or self.SoundFiles[math.random(1, #self.SoundFiles)]
end
self.setup = true
end
function EFFECT:FindModel(wep)
if not IsValid(wep) then return unpack(self.ShellPresets["rifle"]) end
local ammotype = (wep.Primary.Ammo or wep:GetPrimaryAmmoType()):lower()
local guntype = (wep.Type or wep:GetHoldType()):lower()
if guntype:find("sniper") or ammotype:find("sniper") or guntype:find("dmr") then
return unpack(self.ShellPresets["sniper"])
elseif guntype:find("rifle") or ammotype:find("rifle") then
return unpack(self.ShellPresets["rifle"])
elseif ammotype:find("pist") or guntype:find("pist") then
return unpack(self.ShellPresets["pistol"])
elseif ammotype:find("smg") or guntype:find("smg") then
return unpack(self.ShellPresets["smg"])
elseif ammotype:find("buckshot") or ammotype:find("shotgun") or guntype:find("shot") then
return unpack(self.ShellPresets["shotgun"])
end
return unpack(self.ShellPresets["rifle"])
end
function EFFECT:BounceSound()
sound.Play(self.ImpactSound, self:GetPos(), math.Rand(self.SoundLevel[1], self.SoundLevel[2]), math.Rand(self.SoundPitch[1], self.SoundPitch[2]), math.Rand(self.SoundVolume[1], self.SoundVolume[2]))
end
function EFFECT:PhysicsCollide(data)
if self:WaterLevel() > 0 then return end
if TFA.GetEJSmokeEnabled() and not self.PCFSmoke and CurTime() < self.SmokeDeath then
self.PCFSmoke = CreateParticleSystem(self, self.SmokeParticle, PATTACH_POINT_FOLLOW, 1)
if IsValid(self.PCFSmoke) then
self:ComputeSmokeLighting()
self.PCFSmoke:StartEmission()
else
self.PCFSmoke = nil
end
end
if data.Speed > 60 then
self:BounceSound()
local impulse = (data.OurOldVelocity - 2 * data.OurOldVelocity:Dot(data.HitNormal) * data.HitNormal) * 0.33
local phys = self:GetPhysicsObject()
if phys:IsValid() then
phys:ApplyForceCenter(impulse)
end
end
end
function EFFECT:Think()
if CurTime() > self.SmokeDeath and self.PCFSmoke then
self.PCFSmoke:StopEmission()
self.PCFSmoke = nil
else
self:ComputeSmokeLighting()
end
if self:WaterLevel() > 0 and not self.WaterSplashed then
self.WaterSplashed = true
local ef = EffectData()
ef:SetOrigin(self:GetPos())
ef:SetScale(1)
util.Effect("watersplash", ef)
end
if CurTime() > self.StartTime + self.LifeTime then
if self.Emitter then
self.Emitter:Finish()
end
return false
else
return true
end
end
function EFFECT:Render()
if not self.setup then return end
self:SetColor(ColorAlpha(color_white, (1 - math.Clamp(CurTime() - (self.StartTime + self.LifeTime - self.FadeTime), 0, self.FadeTime) / self.FadeTime) * 255))
self:SetupBones()
self:DrawModel()
end
hook.Add("EntityEmitSound", "TFA_BlockShellScrapeSound", function(sndData)
if IsValid(sndData.Entity) and sndData.Entity.IsTFAShell and sndData.SoundName:find("scrape") then
return false
end
end)

View File

@@ -0,0 +1,121 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local vector_origin = Vector()
function EFFECT:Init(data)
self.WeaponEnt = data:GetEntity()
if not IsValid(self.WeaponEnt) then return end
self.WeaponEntOG = self.WeaponEnt
self.Attachment = data:GetAttachment()
self.Dir = data:GetNormal()
local owent = self.WeaponEnt:GetOwner()
if not IsValid(owent) then
owent = self.WeaponEnt:GetParent()
end
if IsValid(owent) and owent:IsPlayer() then
if owent ~= LocalPlayer() or owent:ShouldDrawLocalPlayer() then
self.WeaponEnt = owent:GetActiveWeapon()
if not IsValid(self.WeaponEnt) then return end
else
self.WeaponEnt = owent:GetViewModel()
local theirweapon = owent:GetActiveWeapon()
if IsValid(theirweapon) and theirweapon.ViewModelFlip or theirweapon.ViewModelFlipped then
self.Flipped = true
end
if not IsValid(self.WeaponEnt) then return end
end
end
if IsValid(self.WeaponEntOG) and self.WeaponEntOG.ShellAttachment then
self.Attachment = self.WeaponEnt:LookupAttachment(self.WeaponEntOG.ShellAttachment)
if not self.Attachment or self.Attachment <= 0 then
self.Attachment = 2
end
if self.WeaponEntOG:GetStatL("IsAkimbo") then
self.Attachment = 4 - self.WeaponEntOG:GetAnimCycle()
end
if self.WeaponEntOG.ShellAttachmentRaw then
self.Attachment = self.WeaponEntOG.ShellAttachmentRaw
end
end
local angpos = self.WeaponEnt:GetAttachment(self.Attachment)
if not angpos or not angpos.Pos then
angpos = {
Pos = vector_origin,
Ang = angle_zero
}
end
if self.Flipped then
local tmpang = (self.Dir or angpos.Ang:Forward()):Angle()
local localang = self.WeaponEnt:WorldToLocalAngles(tmpang)
localang.y = localang.y + 180
localang = self.WeaponEnt:LocalToWorldAngles(localang)
--localang:RotateAroundAxis(localang:Up(),180)
--tmpang:RotateAroundAxis(tmpang:Up(),180)
self.Dir = localang:Forward()
end
-- Keep the start and end Pos - we're going to interpolate between them
self.Pos = self:GetTracerShootPos(angpos.Pos, self.WeaponEnt, self.Attachment)
self.Norm = angpos.Ang:Forward() --angpos.Ang:Forward()
--print(self.Norm)
self.Magnitude = data:GetMagnitude()
self.Scale = data:GetScale()
local fx = EffectData()
fx:SetOrigin(self.Pos)
fx:SetStart(self.Pos)
fx:SetEntity(self.WeaponEnt)
fx:SetAttachment(self.Attachment)
fx:SetNormal(self.Norm)
fx:SetAngles(self.Norm:Angle())
fx:SetScale(self.Scale)
fx:SetMagnitude(self.Magnitude)
local se = (self.WeaponEntOG.LuaShellEffect or self.WeaponEntOG.Blowback_Shell_Effect) or "ShellEject"
util.Effect(se, fx)
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,120 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local vector_origin = Vector()
EFFECT.SmokeParticle = "tfa_ins2_shell_eject"
local upVec = Vector(0, 0, 1)
function EFFECT:ComputeSmokeLighting(part, pos)
if not IsValid(part) then return end
local licht = render.ComputeLighting(pos + upVec * 2, upVec)
local lichtFloat = math.Clamp((licht.r + licht.g + licht.b) / 3, 0, TFA.Particles.SmokeLightingClamp) / TFA.Particles.SmokeLightingClamp
local lichtFinal = LerpVector(lichtFloat, TFA.Particles.SmokeLightingMin, TFA.Particles.SmokeLightingMax)
lichtFinal.x = math.sqrt(math.Clamp(lichtFinal.x-0.2,0,0.8)) / 0.8
lichtFinal.y = math.sqrt(math.Clamp(lichtFinal.y-0.2,0,0.8)) / 0.8
lichtFinal.z = math.sqrt(math.Clamp(lichtFinal.z-0.2,0,0.8)) / 0.8
part:SetControlPoint(1, lichtFinal)
end
function EFFECT:Init(data)
if not TFA.GetEJSmokeEnabled() then return end
self.WeaponEnt = data:GetEntity()
if not IsValid(self.WeaponEnt) then return end
self.WeaponEntOG = self.WeaponEnt
self.Attachment = data:GetAttachment()
local owent = self.WeaponEnt:GetOwner()
if not IsValid(owent) then
owent = self.WeaponEnt:GetParent()
end
if IsValid(owent) and owent:IsPlayer() then
if owent ~= LocalPlayer() or owent:ShouldDrawLocalPlayer() then
self.WeaponEnt = owent:GetActiveWeapon()
if not IsValid(self.WeaponEnt) then return end
else
self.WeaponEnt = owent:GetViewModel()
local theirweapon = owent:GetActiveWeapon()
if IsValid(theirweapon) and theirweapon.ViewModelFlip or theirweapon.ViewModelFlipped then
self.Flipped = true
end
if not IsValid(self.WeaponEnt) then return end
end
end
if IsValid(self.WeaponEntOG) and self.WeaponEntOG.ShellAttachment then
self.Attachment = self.WeaponEnt:LookupAttachment(self.WeaponEntOG.ShellAttachment)
if not self.Attachment or self.Attachment <= 0 then
self.Attachment = 2
end
if self.WeaponEntOG:GetStatL("IsAkimbo") then
self.Attachment = 3 + self.WeaponEntOG:GetAnimCycle()
end
if self.WeaponEntOG.ShellAttachmentRaw then
self.Attachment = self.WeaponEntOG.ShellAttachmentRaw
end
end
local angpos = self.WeaponEnt:GetAttachment(self.Attachment)
if not angpos or not angpos.Pos then
angpos = {
Pos = vector_origin,
Ang = angle_zero
}
end
local PCFSmoke = CreateParticleSystem(self.WeaponEnt, self.SmokeParticle, PATTACH_POINT_FOLLOW, self.Attachment)
if IsValid(PCFSmoke) then
self:ComputeSmokeLighting(PCFSmoke, angpos.Pos)
PCFSmoke:StartEmission()
timer.Simple(0.2, function()
if IsValid(PCFSmoke) then
PCFSmoke:StopEmission(false,true)
end
end)
end
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

View File

@@ -0,0 +1,86 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
EFFECT.Mat = Material("effects/laser_tracer")
EFFECT.Col1 = Color(255, 255, 255, 255) --Color(225,225,225,225)
EFFECT.Col2 = Color(65, 128, 255, 200)
EFFECT.Speed = 1024*3
EFFECT.TracerLength = 128
--[[---------------------------------------------------------
Init( data table )
-----------------------------------------------------------]]
function EFFECT:Init(data)
self.Position = data:GetStart()
self.WeaponEnt = data:GetEntity()
self.Attachment = data:GetAttachment()
if IsValid(self.WeaponEnt) and self.WeaponEnt.GetMuzzleAttachment then
self.Attachment = self.WeaponEnt:GetMuzzleAttachment()
end
-- Keep the start and end pos - we're going to interpolate between them
self.StartPos = self:GetTracerShootPos(self.Position, self.WeaponEnt, self.Attachment)
self.EndPos = data:GetOrigin()
self.Normal = (self.EndPos - self.StartPos):GetNormalized()
self.Length = (self.EndPos - self.StartPos):Length()
--self.Alpha = 255
self.Life = 0
self.MaxLife = self.Length / self.Speed
self:SetRenderBoundsWS(self.StartPos, self.EndPos, Vector(1000,1000,1000))
self.CurPos = self.StartPos
end
--[[---------------------------------------------------------
THINK
-----------------------------------------------------------]]
function EFFECT:Think()
self.Life = self.Life + FrameTime() * (1 / self.MaxLife)
--self.Alpha = 255 * ( 1 - self.Life )
return self.Life < 1
end
--[[---------------------------------------------------------
Draw the effect
-----------------------------------------------------------]]
local lerpedcol = Color(225, 225, 225, 225)
function EFFECT:Render()
render.SetMaterial(self.Mat)
lerpedcol.r = Lerp(self.Life, self.Col1.r, self.Col2.r)
lerpedcol.g = Lerp(self.Life, self.Col1.g, self.Col2.g)
lerpedcol.b = Lerp(self.Life, self.Col1.b, self.Col2.b)
lerpedcol.a = Lerp(self.Life, self.Col1.a, self.Col2.a)
local startbeampos = LerpVector(self.Life, self.StartPos, self.EndPos)
local endbeampos = LerpVector(self.Life + self.TracerLength / self.Length, self.StartPos, self.EndPos)
render.DrawBeam(startbeampos, endbeampos, 8, 0, 1, lerpedcol)
end

View File

@@ -0,0 +1,154 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local vector_origin = Vector()
EFFECT.Thickness = 16
EFFECT.Life = 0.25
EFFECT.RotVelocity = 30
EFFECT.InValid = false
local Mat_Impact = Material("effects/combinemuzzle2")
local Mat_Beam = Material("effects/tool_tracer")
local Mat_TracePart = Material("effects/select_ring")
function EFFECT:Init(data)
self.Position = data:GetStart()
self.WeaponEnt = data:GetEntity()
self.Attachment = data:GetAttachment()
if IsValid(self.WeaponEnt) and self.WeaponEnt.GetMuzzleAttachment then
self.Attachment = self.WeaponEnt:GetMuzzleAttachment()
end
local owent
if IsValid(self.WeaponEnt) then
owent = self.WeaponEnt:GetOwner()
if not IsValid(owent) then
owent = self.WeaponEnt:GetParent()
end
end
if IsValid(owent) and owent:IsPlayer() then
if owent ~= LocalPlayer() or owent:ShouldDrawLocalPlayer() then
self.WeaponEnt = owent:GetActiveWeapon()
if not IsValid(self.WeaponEnt) then return end
else
self.WeaponEnt = owent:GetViewModel()
local theirweapon = owent:GetActiveWeapon()
if IsValid(theirweapon) and theirweapon.ViewModelFlip or theirweapon.ViewModelFlipped then
self.Flipped = true
end
if not IsValid(self.WeaponEnt) then return end
end
end
local angpos
if IsValid(self.WeaponEnt) then
angpos = self.WeaponEnt:GetAttachment(self.Attachment)
end
if not angpos or not angpos.Pos then
angpos = {
Pos = vector_origin,
Ang = angle_zero
}
end
if self.Flipped then
local tmpang = (self.Dir or angpos.Ang:Forward()):Angle()
local localang = self.WeaponEnt:WorldToLocalAngles(tmpang)
localang.y = localang.y + 180
localang = self.WeaponEnt:LocalToWorldAngles(localang)
--localang:RotateAroundAxis(localang:Up(),180)
--tmpang:RotateAroundAxis(tmpang:Up(),180)
self.Dir = localang:Forward()
end
-- Keep the start and end Pos - we're going to interpolate between them
if IsValid(owent) and self.Position:Distance(owent:EyePos()) > 72 then
self.WeaponEnt = nil
end
self.StartPos = self:GetTracerShootPos(self.WeaponEnt and angpos.Pos or self.Position, self.WeaponEnt, self.Attachment)
self.EndPos = data:GetOrigin()
self.Entity:SetRenderBoundsWS(self.StartPos, self.EndPos)
self.Normal = (self.EndPos - self.StartPos):GetNormalized()
self.StartTime = 0
self.LifeTime = self.Life
self.data = data
self.rot = 0
end
function EFFECT:Think()
if self.InValid then return false end
self.LifeTime = self.LifeTime - FrameTime()
self.StartTime = self.StartTime + FrameTime()
return self.LifeTime > 0
end
local beamcol = table.Copy(color_white)
local beamcol2 = Color(0, 225, 255, 255)
function EFFECT:Render()
if self.InValid then return false end
self.StartPos = self:GetTracerShootPos(self.StartPos, self.WeaponEnt, self.Attachment)
local startPos = self.StartPos
local endPos = self.EndPos
local tracerpos
beamcol.a = self.LifeTime / self.Life * 255
self.rot = self.rot + FrameTime() * self.RotVelocity
render.SetMaterial(Mat_Impact)
render.DrawSprite(endPos, 12, 12, ColorAlpha(color_white, beamcol.a))
render.SetMaterial(Mat_TracePart)
tracerpos = Lerp(math.Clamp(self.LifeTime / self.Life - 0.1, 0, 1), endPos, startPos)
render.DrawQuadEasy(tracerpos, self.Normal, 12, 12, beamcol2, self.rot - 60)
tracerpos = Lerp(math.Clamp(self.LifeTime / self.Life - 0.05, 0, 1), endPos, startPos)
render.DrawQuadEasy(tracerpos, self.Normal, 12, 12, beamcol2, self.rot - 30)
tracerpos = Lerp(math.Clamp(self.LifeTime / self.Life, 0, 1), endPos, startPos)
render.DrawQuadEasy(tracerpos, self.Normal, 12, 12, beamcol2, self.rot)
tracerpos = Lerp(math.Clamp(self.LifeTime / self.Life + 0.05, 0, 1), endPos, startPos)
render.DrawQuadEasy(tracerpos, self.Normal, 12, 12, beamcol2, self.rot + 30)
tracerpos = Lerp(math.Clamp(self.LifeTime / self.Life + 0.1, 0, 1), endPos, startPos)
render.DrawQuadEasy(tracerpos, self.Normal, 12, 12, beamcol2, self.rot + 60)
tracerpos = Lerp(math.Clamp(self.LifeTime / self.Life + 0.15, 0, 1), endPos, startPos)
render.DrawQuadEasy(tracerpos, self.Normal, 12, 12, beamcol2, self.rot + 30)
tracerpos = Lerp(math.Clamp(self.LifeTime / self.Life + 0.2, 0, 1), endPos, startPos)
render.DrawQuadEasy(tracerpos, self.Normal, 12, 12, beamcol2, self.rot + 60)
render.SetMaterial(Mat_Beam)
render.DrawBeam(startPos, endPos, self.Thickness, 0 + beamcol.a / 128, endPos:Distance(startPos) / 64 + beamcol.a / 128, beamcol)
end

View File

@@ -0,0 +1,86 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
EFFECT.Mat = Material("effects/laser_tracer")
EFFECT.Col1 = Color(255, 90, 25, 200) --Color(225,225,225,225)
EFFECT.Col2 = Color(225, 25, 25, 200)
EFFECT.Speed = 8192
EFFECT.TracerLength = 128
--[[---------------------------------------------------------
Init( data table )
-----------------------------------------------------------]]
function EFFECT:Init(data)
self.Position = data:GetStart()
self.WeaponEnt = data:GetEntity()
self.Attachment = data:GetAttachment()
if IsValid(self.WeaponEnt) and self.WeaponEnt.GetMuzzleAttachment then
self.Attachment = self.WeaponEnt:GetMuzzleAttachment()
end
-- Keep the start and end pos - we're going to interpolate between them
self.StartPos = self:GetTracerShootPos(self.Position, self.WeaponEnt, self.Attachment)
self.EndPos = data:GetOrigin()
self.Normal = (self.EndPos - self.StartPos):GetNormalized()
self.Length = (self.EndPos - self.StartPos):Length()
--self.Alpha = 255
self.Life = 0
self.MaxLife = self.Length / self.Speed
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
self.CurPos = self.StartPos
end
--[[---------------------------------------------------------
THINK
-----------------------------------------------------------]]
function EFFECT:Think()
self.Life = self.Life + FrameTime() * (1 / self.MaxLife)
--self.Alpha = 255 * ( 1 - self.Life )
return self.Life < 1
end
--[[---------------------------------------------------------
Draw the effect
-----------------------------------------------------------]]
local lerpedcol = Color(225, 225, 225, 225)
function EFFECT:Render()
render.SetMaterial(self.Mat)
lerpedcol.r = Lerp(self.Life, self.Col1.r, self.Col2.r)
lerpedcol.g = Lerp(self.Life, self.Col1.g, self.Col2.g)
lerpedcol.b = Lerp(self.Life, self.Col1.b, self.Col2.b)
lerpedcol.a = Lerp(self.Life, self.Col1.a, self.Col2.a)
local startbeampos = Lerp(self.Life, self.StartPos, self.EndPos)
local endbeampos = Lerp(self.Life + self.TracerLength / self.Length, self.StartPos, self.EndPos)
render.DrawBeam(startbeampos, endbeampos, 8, 0, 1, lerpedcol)
end

View File

@@ -0,0 +1,86 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
-- Copyright (c) 2018-2020 TFA Base Devs
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
EFFECT.Mat = Material("effects/laser_tracer")
EFFECT.Col1 = Color(128, 255, 255) --Color(225,225,225,225)
EFFECT.Col2 = Color(97, 218, 255)
EFFECT.Speed = 4096
EFFECT.TracerLength = 128
--[[---------------------------------------------------------
Init( data table )
-----------------------------------------------------------]]
function EFFECT:Init(data)
self.Position = data:GetStart()
self.WeaponEnt = data:GetEntity()
self.Attachment = data:GetAttachment()
if IsValid(self.WeaponEnt) and self.WeaponEnt.GetMuzzleAttachment then
self.Attachment = self.WeaponEnt:GetMuzzleAttachment()
end
-- Keep the start and end pos - we're going to interpolate between them
self.StartPos = self:GetTracerShootPos(self.Position, self.WeaponEnt, self.Attachment)
self.EndPos = data:GetOrigin()
self.Normal = (self.EndPos - self.StartPos):GetNormalized()
self.Length = (self.EndPos - self.StartPos):Length()
--self.Alpha = 255
self.Life = 0
self.MaxLife = self.Length / self.Speed
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
self.CurPos = self.StartPos
end
--[[---------------------------------------------------------
THINK
-----------------------------------------------------------]]
function EFFECT:Think()
self.Life = self.Life + FrameTime() * (1 / self.MaxLife)
--self.Alpha = 255 * ( 1 - self.Life )
return self.Life < 1
end
--[[---------------------------------------------------------
Draw the effect
-----------------------------------------------------------]]
local lerpedcol = Color(225, 225, 225, 225)
function EFFECT:Render()
render.SetMaterial(self.Mat)
lerpedcol.r = Lerp(self.Life, self.Col1.r, self.Col2.r)
lerpedcol.g = Lerp(self.Life, self.Col1.g, self.Col2.g)
lerpedcol.b = Lerp(self.Life, self.Col1.b, self.Col2.b)
lerpedcol.a = Lerp(self.Life, self.Col1.a, self.Col2.a)
local startbeampos = Lerp(self.Life, self.StartPos, self.EndPos)
local endbeampos = Lerp(self.Life + self.TracerLength / self.Length, self.StartPos, self.EndPos)
render.DrawBeam(startbeampos, endbeampos, 8, 0, 1, lerpedcol)
end

View File

@@ -0,0 +1,56 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
/*-- Information ---------------------
-- Common Blood Types --
Red = Color(130, 19, 10)
Yellow = Color(255, 221, 35)
-- Code Implementation --
local blcolor = Color(130, 19, 10)
effectBlood:SetColor(VJ_Color2Byte(Color(r, g, b)))
-------------------------------------- */
function EFFECT:Init(data)
local origin = data:GetOrigin()
local scale = data:GetScale()
local color = VJ_Color8Bit2Color(data:GetColor())
self.Emitter = ParticleEmitter(origin)
for _ = 0,6 do
local mist = self.Emitter:Add("particle/smokesprites_000"..math.random(1, 9), origin)
if (mist) then
mist:SetVelocity(Vector(math.random(-30, 30), math.random(-30, 30), math.random(-50, 50)))
mist:SetDieTime(math.Rand(1.8, 2))
mist:SetStartAlpha(150)
mist:SetEndAlpha(0)
mist:SetStartSize(scale / 2)
mist:SetEndSize(scale)
mist:SetRoll(1)
mist:SetRollDelta(0)
mist:SetAirResistance(1)
mist:SetGravity(Vector(math.Rand(-10, 10), math.Rand(-10, 10), math.Rand(-100, -100)))
mist:SetColor(color.r, color.g, color.b)
end
end
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
return false
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
end

View File

@@ -0,0 +1,55 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/beam")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
if IsValid(self.Ent) then self.StartPos = self.Ent:GetAttachment(self.Att).Pos end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + 0.2
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
local hitPosNormal = self.HitPos:GetNormalized()
util.Decal("VJ_HLR_Scorch_Small", self.EndPos + hitPosNormal, self.EndPos - hitPosNormal)
local effectdata = EffectData()
effectdata:SetOrigin(self.EndPos + hitPosNormal*-2)
effectdata:SetNormal(hitPosNormal*-3)
effectdata:SetMagnitude(0.1)
effectdata:SetScale(0.4)
effectdata:SetRadius(3)
util.Effect("Sparks", effectdata)
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
local defColor = Color(255, 255, 255)
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, math.Rand(18, 24), math.Rand(0, 1), math.Rand(0, 1) + ((self.StartPos - self.EndPos):Length() / 128), defColor)
end

View File

@@ -0,0 +1,46 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/beam")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
if IsValid(self.Ent) then self.StartPos = self.Ent:GetAttachment(self.Att).Pos end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + data:GetScale()
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
util.Decal("VJ_HLR_Scorch_Small", self.EndPos + data:GetNormal(), self.EndPos - data:GetNormal())
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, math.Rand(18,24), math.Rand(0,1), math.Rand(0,1) + ((self.StartPos - self.EndPos):Length() / 128), Color(255,255,255,(50 / ((self.DieTime - 0.5) - CurTime()))))
end

View File

@@ -0,0 +1,50 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/beam")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
if IsValid(self.Ent) then
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
self.EndPos = self.Ent:GetAttachment(4).Pos
end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + data:GetScale()
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
util.Decal("VJ_HLR_Scorch_Small", self.EndPos + data:GetNormal(), self.EndPos - data:GetNormal())
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
self.EndPos = self.Ent:GetAttachment(4).Pos
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, math.Rand(18,24), math.Rand(0,1), math.Rand(0,1) + ((self.StartPos - self.EndPos):Length() / 128), Color(138, 43, 226, 150 / ((self.DieTime - 0.5) - CurTime())))
end

View File

@@ -0,0 +1,59 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/beam")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
if IsValid(self.Ent) then self.StartPos = self.Ent:GetAttachment(self.Att).Pos end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + 0.5
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
local hitPosNormal = self.HitPos:GetNormalized()
util.Decal("VJ_HLR_Scorch_Small", self.EndPos + hitPosNormal, self.EndPos - hitPosNormal)
local effectdata = EffectData()
effectdata:SetOrigin(self.EndPos + hitPosNormal*-2)
effectdata:SetNormal(hitPosNormal*-3)
effectdata:SetMagnitude(0.1)
effectdata:SetScale(0.4)
effectdata:SetRadius(3)
util.Effect("Sparks", effectdata)
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, math.Rand(100,150), math.Rand(1,1.3) + ((self.StartPos - self.EndPos):Length() / 1280), ((self.StartPos - self.EndPos):Length() / 20000), Color(100,100,255,255))
end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/

View File

@@ -0,0 +1,59 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/beam")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
if IsValid(self.Ent) then self.StartPos = self.Ent:GetAttachment(self.Att).Pos end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + 0.5
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
local hitPosNormal = self.HitPos:GetNormalized()
util.Decal("VJ_HLR_Scorch", self.EndPos + hitPosNormal, self.EndPos - hitPosNormal)
local effectdata = EffectData()
effectdata:SetOrigin(self.EndPos + hitPosNormal*-2)
effectdata:SetNormal(hitPosNormal*-3)
effectdata:SetMagnitude(0.1)
effectdata:SetScale(0.4)
effectdata:SetRadius(3)
util.Effect("Sparks", effectdata)
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, math.Rand(200,200), math.Rand(0,1), ((self.StartPos - self.EndPos):Length() / 20000), Color(255,255,255,255))
end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/

View File

@@ -0,0 +1,52 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/beam")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
//if IsValid(self.Ent) then
//self.StartPos = self.Ent:GetAttachment(self.Ent:LookupAttachment(self.Att)).Pos
//self.EndPos = self.Ent:GetAttachment(4).Pos
//end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + data:GetScale()
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
util.Decal("VJ_HLR_Scorch_Small", self.EndPos + data:GetNormal(), self.EndPos - data:GetNormal())
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
//self.StartPos = self.Ent:GetAttachment(self.Ent:LookupAttachment(self.Att)).Pos
self.StartPos = self.Ent:GetPos()
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
local colorPurple = Color(138, 43, 226)
--
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, math.Rand(18,24), math.Rand(0,1), math.Rand(0,1) + ((self.StartPos - self.EndPos):Length() / 128), colorPurple)
end

View File

@@ -0,0 +1,46 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/sprites/lgtning")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
if IsValid(self.Ent) then self.StartPos = self.Ent:GetAttachment(self.Att).Pos end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + (0.6 - data:GetScale())
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
util.Decal("VJ_HLR_Scorch_Small", self.EndPos + data:GetNormal(), self.EndPos - data:GetNormal())
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, 10, 30, 35, Color(115, 30, 164, math.Rand(150, 255)))
end

View File

@@ -0,0 +1,44 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/sprites/laser_freezeray")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
if IsValid(self.Ent) then self.StartPos = self.Ent:GetAttachment(self.Att).Pos end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + 0.15
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, math.Rand(18,24), math.Rand(0,1), math.Rand(0,1) + ((self.StartPos - self.EndPos):Length() / 128), Color(255,255,255,(50 / ((self.DieTime - 0.5) - CurTime()))))
end

View File

@@ -0,0 +1,53 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
-- Based off of the GMod lasertracer
EFFECT.MainMat = Material("vj_hl/sprites/laserbeam_pitworm")
function EFFECT:Init(data)
self.StartPos = data:GetStart()
self.EndPos = data:GetOrigin()
self.Ent = data:GetEntity()
self.Att = data:GetAttachment()
if IsValid(self.Ent) then self.StartPos = self.Ent:GetAttachment(self.Att).Pos end
self.HitPos = self.EndPos - self.StartPos
self.DieTime = CurTime() + 0.15
self:SetRenderBoundsWS(self.StartPos, self.EndPos)
util.Decal("VJ_HLR_Scorch_Small", self.EndPos + self.HitPos:GetNormalized(), self.EndPos - self.HitPos:GetNormalized())
local effectdata = EffectData()
effectdata:SetOrigin(self.EndPos + self.HitPos:GetNormalized()*-2)
effectdata:SetNormal(self.HitPos:GetNormalized()*-3)
effectdata:SetMagnitude(0.1)
effectdata:SetScale(0.4)
effectdata:SetRadius(3)
util.Effect("Sparks", effectdata)
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Think()
if !IsValid(self.Ent) then return false end
self.StartPos = self.Ent:GetAttachment(self.Att).Pos
if (CurTime() > self.DieTime) then -- If it's dead then...
return false
end
return true
end
---------------------------------------------------------------------------------------------------------------------------------------------
function EFFECT:Render()
render.SetMaterial(self.MainMat)
render.DrawBeam(self.StartPos, self.EndPos, math.Rand(18,24), math.Rand(0,1), math.Rand(0,1) + ((self.StartPos - self.EndPos):Length() / 128), Color(124,252,0,(50 / ((self.DieTime - 0.5) - CurTime()))))
end

View File

@@ -0,0 +1,57 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function EFFECT:Init(data)
local vOffset = data:GetOrigin()
local emitter = ParticleEmitter(vOffset, true)
for _ = 0, 100 do
local color = Vector(97, 108, 165)
local pinkCore = false
if math.random(1 ,3) == 1 then
color = Vector(178, 77, 121)
pinkCore = true
end
local size = (pinkCore == true and math.Rand(3, 4)) or math.Rand(3, 5)
local pos = Vector(math.Rand(-1, 1), math.Rand(-1, 1), math.Rand(-1, 1))
local particle = emitter:Add("particles/balloon_bit", vOffset + pos * 8)
if (particle) then
local alpha = math.random(100, 130)
particle:SetVelocity(pos * 400)
particle:SetLifeTime(0)
particle:SetDieTime(math.Rand(20,30))
particle:SetStartAlpha(alpha)
particle:SetEndAlpha(alpha)
particle:SetStartSize(size)
particle:SetEndSize(0)
particle:SetRoll(math.Rand(0, 360))
particle:SetRollDelta(math.Rand(-2, 2))
particle:SetAirResistance(100)
particle:SetGravity(Vector(0, 0, -60))
particle:SetColor(color.r, color.g, color.b)
particle:SetCollide(true)
particle:SetAngleVelocity(Angle(math.Rand(-160, 160), math.Rand(-160, 160), math.Rand(-160, 160)))
particle:SetBounce(0)
particle:SetLighting(true)
end
end
emitter:Finish()
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end

Some files were not shown because too many files have changed in this diff Show More