mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
21
lua/effects/airboatgunheavytracer.lua
Normal file
21
lua/effects/airboatgunheavytracer.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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.Position = data:GetStart()
|
||||
self.WeaponEnt = data:GetEntity()
|
||||
self.Attachment = data:GetAttachment()
|
||||
self.StartPos = self:GetTracerShootPos(self.Position,self.WeaponEnt,self.Attachment)
|
||||
self.EndPos = data:GetOrigin()
|
||||
util.ParticleTracerEx("cmb_tracer",self.StartPos,self.EndPos,1,0,-1)
|
||||
end
|
||||
function EFFECT:Render()
|
||||
return false
|
||||
end
|
||||
21
lua/effects/airboatguntracer.lua
Normal file
21
lua/effects/airboatguntracer.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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.Position = data:GetStart()
|
||||
self.WeaponEnt = data:GetEntity()
|
||||
self.Attachment = data:GetAttachment()
|
||||
self.StartPos = self:GetTracerShootPos(self.Position,self.WeaponEnt,self.Attachment)
|
||||
self.EndPos = data:GetOrigin()
|
||||
util.ParticleTracerEx("cmb_tracer",self.StartPos,self.EndPos,1,0,-1)
|
||||
end
|
||||
function EFFECT:Render()
|
||||
return false
|
||||
end
|
||||
21
lua/effects/ar2tracer.lua
Normal file
21
lua/effects/ar2tracer.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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.Position = data:GetStart()
|
||||
self.WeaponEnt = data:GetEntity()
|
||||
self.Attachment = data:GetAttachment()
|
||||
self.StartPos = self:GetTracerShootPos(self.Position,self.WeaponEnt,self.Attachment)
|
||||
self.EndPos = data:GetOrigin()
|
||||
util.ParticleTracerEx("cmb_tracer",self.StartPos,self.EndPos,1,0,-1)
|
||||
end
|
||||
function EFFECT:Render()
|
||||
return false
|
||||
end
|
||||
87
lua/effects/arccw_flashexplosion.lua
Normal file
87
lua/effects/arccw_flashexplosion.lua
Normal 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
|
||||
89
lua/effects/arccw_incendiaryround.lua
Normal file
89
lua/effects/arccw_incendiaryround.lua
Normal 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
|
||||
113
lua/effects/arccw_muzzleeffect.lua
Normal file
113
lua/effects/arccw_muzzleeffect.lua
Normal 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
|
||||
63
lua/effects/arccw_ricochet.lua
Normal file
63
lua/effects/arccw_ricochet.lua
Normal 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
|
||||
174
lua/effects/arccw_shelleffect.lua
Normal file
174
lua/effects/arccw_shelleffect.lua
Normal 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
|
||||
95
lua/effects/arccw_tracer.lua
Normal file
95
lua/effects/arccw_tracer.lua
Normal 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
|
||||
70
lua/effects/arccw_uc_confetti.lua
Normal file
70
lua/effects/arccw_uc_confetti.lua
Normal 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
|
||||
178
lua/effects/arccw_uc_shelleffect.lua
Normal file
178
lua/effects/arccw_uc_shelleffect.lua
Normal 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
|
||||
99
lua/effects/arccw_uc_tracer.lua
Normal file
99
lua/effects/arccw_uc_tracer.lua
Normal 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
|
||||
34
lua/effects/assassin_cloak_z/init.lua
Normal file
34
lua/effects/assassin_cloak_z/init.lua
Normal 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
|
||||
36
lua/effects/cguard_suck/init.lua
Normal file
36
lua/effects/cguard_suck/init.lua
Normal 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
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
69
lua/effects/cguard_warp/init.lua
Normal file
69
lua/effects/cguard_warp/init.lua
Normal 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
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
26
lua/effects/combineball/init.lua
Normal file
26
lua/effects/combineball/init.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| 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 GetConVar( "cmb_tracers_energyball" ):GetFloat() >= 1 then
|
||||
TRACK_CB = {}
|
||||
function CheckCB()
|
||||
local cb = ents.FindByClass("prop_combine_ball")
|
||||
for k, v in pairs(cb) do
|
||||
if not(TRACK_CB[v]) then
|
||||
TRACK_CB[v] = {true, v:GetPos(), CurTime()}
|
||||
ParticleEffectAttach("ar2_combineball", PATTACH_ABSORIGIN_FOLLOW, v, 0)
|
||||
else
|
||||
TRACK_CB[v][1] = true
|
||||
TRACK_CB[v][2] = v:GetPos()
|
||||
end
|
||||
end
|
||||
end
|
||||
hook.Add("Tick", "CheckCB", CheckCB)
|
||||
end
|
||||
39
lua/effects/combvort_orbfx/init.lua
Normal file
39
lua/effects/combvort_orbfx/init.lua
Normal 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
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
150
lua/effects/eff_baku_burntcer.lua
Normal file
150
lua/effects/eff_baku_burntcer.lua
Normal 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
|
||||
153
lua/effects/eff_baku_burnzzle.lua
Normal file
153
lua/effects/eff_baku_burnzzle.lua
Normal 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
|
||||
|
||||
41
lua/effects/eff_baku_combinecannon_tracer.lua
Normal file
41
lua/effects/eff_baku_combinecannon_tracer.lua
Normal 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
|
||||
162
lua/effects/eff_baku_impactor.lua
Normal file
162
lua/effects/eff_baku_impactor.lua
Normal 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
|
||||
78
lua/effects/eff_baku_jeeptracer.lua
Normal file
78
lua/effects/eff_baku_jeeptracer.lua
Normal 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
|
||||
21
lua/effects/gunshiptracer.lua
Normal file
21
lua/effects/gunshiptracer.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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.Position = data:GetStart()
|
||||
self.WeaponEnt = data:GetEntity()
|
||||
self.Attachment = data:GetAttachment()
|
||||
self.StartPos = self:GetTracerShootPos(self.Position,self.WeaponEnt,self.Attachment)
|
||||
self.EndPos = data:GetOrigin()
|
||||
util.ParticleTracerEx("cmb_tracer",self.StartPos,self.EndPos,1,0,-1)
|
||||
end
|
||||
function EFFECT:Render()
|
||||
return false
|
||||
end
|
||||
69
lua/effects/gw_laser/init.lua
Normal file
69
lua/effects/gw_laser/init.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
EFFECT.Mat = Material("trails/laser")
|
||||
|
||||
function EFFECT:Init(data)
|
||||
self.Pos = data:GetStart()
|
||||
self.Ent = data:GetEntity()
|
||||
self.Attachment = data:GetAttachment()
|
||||
|
||||
self.Start = self:GetTracerShootPos(self.Pos, self.Ent, self.Attachment)
|
||||
self.End = data:GetOrigin()
|
||||
|
||||
self.Normal = (self.Start - self.End):Angle():Forward()
|
||||
|
||||
self.Color = Color(150, 100, 255)
|
||||
self.Alpha = 150
|
||||
|
||||
self:SetRenderBoundsWS(self.Start, self.End)
|
||||
|
||||
local dynlight = DynamicLight(0)
|
||||
dynlight.Pos = self.End + self.Normal * 10
|
||||
dynlight.Size = 500
|
||||
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
|
||||
|
||||
dynlight = DynamicLight(0)
|
||||
dynlight.Pos = self.Start
|
||||
dynlight.Size = 500
|
||||
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 self.Alpha < 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local length = (self.Start - self.End):Length()
|
||||
local texcoord = math.Rand(0, 1)
|
||||
|
||||
render.SetMaterial(self.Mat)
|
||||
render.DrawBeam(self.Start, self.End, 32, texcoord, texcoord + length / 128, self.Color)
|
||||
end
|
||||
21
lua/effects/helicoptertracer.lua
Normal file
21
lua/effects/helicoptertracer.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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.Position = data:GetStart()
|
||||
self.WeaponEnt = data:GetEntity()
|
||||
self.Attachment = data:GetAttachment()
|
||||
self.StartPos = self:GetTracerShootPos(self.Position,self.WeaponEnt,self.Attachment)
|
||||
self.EndPos = data:GetOrigin()
|
||||
util.ParticleTracerEx("cmb_tracer",self.StartPos,self.EndPos,1,0,-1)
|
||||
end
|
||||
function EFFECT:Render()
|
||||
return false
|
||||
end
|
||||
77
lua/effects/hk_laser/init.lua
Normal file
77
lua/effects/hk_laser/init.lua
Normal 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
|
||||
33
lua/effects/rappel_line.lua
Normal file
33
lua/effects/rappel_line.lua
Normal 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
|
||||
138
lua/effects/simfphys_backfire.lua
Normal file
138
lua/effects/simfphys_backfire.lua
Normal 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
|
||||
110
lua/effects/simfphys_engine_fire.lua
Normal file
110
lua/effects/simfphys_engine_fire.lua
Normal 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
|
||||
82
lua/effects/simfphys_engine_smoke.lua
Normal file
82
lua/effects/simfphys_engine_smoke.lua
Normal 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
|
||||
100
lua/effects/simfphys_exhaust.lua
Normal file
100
lua/effects/simfphys_exhaust.lua
Normal 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
|
||||
99
lua/effects/simfphys_physics_wheeldust.lua
Normal file
99
lua/effects/simfphys_physics_wheeldust.lua
Normal 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
|
||||
66
lua/effects/simfphys_physics_wheelsmoke.lua
Normal file
66
lua/effects/simfphys_physics_wheelsmoke.lua
Normal 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
|
||||
86
lua/effects/simfphys_physics_wheelwatersplash.lua
Normal file
86
lua/effects/simfphys_physics_wheelwatersplash.lua
Normal 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
|
||||
86
lua/effects/simfphys_tiresmoke.lua
Normal file
86
lua/effects/simfphys_tiresmoke.lua
Normal 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
|
||||
37
lua/effects/sniper_lazer.lua
Normal file
37
lua/effects/sniper_lazer.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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.wep = effectdata:GetEntity()
|
||||
self.ply = self.wep.Owner
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
if !IsValid(self.wep) or !IsValid(self.ply) then return false end
|
||||
self.tr=self.ply:GetEyeTrace()
|
||||
self:SetPos(self.ply:GetShootPos())
|
||||
self:SetRenderBoundsWS(self:GetPos(),self.tr.HitPos)
|
||||
return self.wep:GetScoped()
|
||||
end
|
||||
|
||||
local lazerMat = Material("cable/physbeam")
|
||||
local dotMat = Material("sprites/light_glow02_add")
|
||||
function EFFECT:Render()
|
||||
if !self.tr then return end
|
||||
render.SetMaterial(lazerMat)
|
||||
|
||||
//render.SetColorModulation( number r, number g, number b )
|
||||
render.DrawBeam(self:GetPos(),self.tr.HitPos,1,0,self:GetPos():Distance(self.tr.HitPos)/300,Color(255,0,0))
|
||||
|
||||
cam.Start3D(EyePos(),EyeAngles())
|
||||
render.SetMaterial(dotMat)
|
||||
render.DrawSprite(self.tr.HitPos, 8, 8, Color(130,190,240)) //color
|
||||
cam.End3D()
|
||||
end
|
||||
21
lua/effects/stridertracer.lua
Normal file
21
lua/effects/stridertracer.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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.Position = data:GetStart()
|
||||
self.WeaponEnt = data:GetEntity()
|
||||
self.Attachment = data:GetAttachment()
|
||||
self.StartPos = self:GetTracerShootPos(self.Position,self.WeaponEnt,self.Attachment)
|
||||
self.EndPos = data:GetOrigin()
|
||||
util.ParticleTracerEx("cmb_tracer",self.StartPos,self.EndPos,1,0,-1)
|
||||
end
|
||||
function EFFECT:Render()
|
||||
return false
|
||||
end
|
||||
56
lua/effects/tfa_bullet_impact/init.lua
Normal file
56
lua/effects/tfa_bullet_impact/init.lua
Normal 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
|
||||
72
lua/effects/tfa_dust_impact/init.lua
Normal file
72
lua/effects/tfa_dust_impact/init.lua
Normal 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
|
||||
87
lua/effects/tfa_metal_impact/init.lua
Normal file
87
lua/effects/tfa_metal_impact/init.lua
Normal 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
|
||||
155
lua/effects/tfa_muzzle_smoketrail/init.lua
Normal file
155
lua/effects/tfa_muzzle_smoketrail/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_cryo/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_cryo/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_energy/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_energy/init.lua
Normal 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
|
||||
133
lua/effects/tfa_muzzleflash_gauss/init.lua
Normal file
133
lua/effects/tfa_muzzleflash_gauss/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_generic/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_generic/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_incendiary/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_incendiary/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_pistol/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_pistol/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_revolver/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_revolver/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_rifle/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_rifle/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_shotgun/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_shotgun/init.lua
Normal 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
|
||||
42
lua/effects/tfa_muzzleflash_silenced/init.lua
Normal file
42
lua/effects/tfa_muzzleflash_silenced/init.lua
Normal 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
|
||||
|
||||
41
lua/effects/tfa_muzzleflash_smg/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_smg/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_sniper/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_sniper/init.lua
Normal 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
|
||||
41
lua/effects/tfa_muzzleflash_sniper_energy/init.lua
Normal file
41
lua/effects/tfa_muzzleflash_sniper_energy/init.lua
Normal 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
|
||||
105
lua/effects/tfa_muzzlesmoke/init.lua
Normal file
105
lua/effects/tfa_muzzlesmoke/init.lua
Normal 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
|
||||
163
lua/effects/tfa_penetrate/init.lua
Normal file
163
lua/effects/tfa_penetrate/init.lua
Normal 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
|
||||
121
lua/effects/tfa_ricochet/init.lua
Normal file
121
lua/effects/tfa_ricochet/init.lua
Normal 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
|
||||
261
lua/effects/tfa_shell/init.lua
Normal file
261
lua/effects/tfa_shell/init.lua
Normal 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)
|
||||
121
lua/effects/tfa_shell_legacy/init.lua
Normal file
121
lua/effects/tfa_shell_legacy/init.lua
Normal 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
|
||||
120
lua/effects/tfa_shelleject_smoke/init.lua
Normal file
120
lua/effects/tfa_shelleject_smoke/init.lua
Normal 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
|
||||
86
lua/effects/tfa_tracer_cryo/init.lua
Normal file
86
lua/effects/tfa_tracer_cryo/init.lua
Normal 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
|
||||
154
lua/effects/tfa_tracer_gauss/init.lua
Normal file
154
lua/effects/tfa_tracer_gauss/init.lua
Normal 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
|
||||
86
lua/effects/tfa_tracer_incendiary/init.lua
Normal file
86
lua/effects/tfa_tracer_incendiary/init.lua
Normal 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
|
||||
86
lua/effects/tfa_tracer_plasma/init.lua
Normal file
86
lua/effects/tfa_tracer_plasma/init.lua
Normal 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
|
||||
56
lua/effects/vj_blood1/init.lua
Normal file
56
lua/effects/vj_blood1/init.lua
Normal 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
|
||||
55
lua/effects/vj_hlr_electric/init.lua
Normal file
55
lua/effects/vj_hlr_electric/init.lua
Normal 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
|
||||
46
lua/effects/vj_hlr_electric_charge/init.lua
Normal file
46
lua/effects/vj_hlr_electric_charge/init.lua
Normal 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
|
||||
50
lua/effects/vj_hlr_electric_charge_purple/init.lua
Normal file
50
lua/effects/vj_hlr_electric_charge_purple/init.lua
Normal 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
|
||||
59
lua/effects/vj_hlr_electric_nihilanth_blue/init.lua
Normal file
59
lua/effects/vj_hlr_electric_nihilanth_blue/init.lua
Normal 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.
|
||||
--------------------------------------------------*/
|
||||
59
lua/effects/vj_hlr_electric_nihilanth_green/init.lua
Normal file
59
lua/effects/vj_hlr_electric_nihilanth_green/init.lua
Normal 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.
|
||||
--------------------------------------------------*/
|
||||
52
lua/effects/vj_hlr_electric_purple/init.lua
Normal file
52
lua/effects/vj_hlr_electric_purple/init.lua
Normal 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
|
||||
46
lua/effects/vj_hlr_electric_xen_turretc/init.lua
Normal file
46
lua/effects/vj_hlr_electric_xen_turretc/init.lua
Normal 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
|
||||
44
lua/effects/vj_hlr_freezeray/init.lua
Normal file
44
lua/effects/vj_hlr_freezeray/init.lua
Normal 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
|
||||
53
lua/effects/vj_hlr_pitworm_beam/init.lua
Normal file
53
lua/effects/vj_hlr_pitworm_beam/init.lua
Normal 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
|
||||
57
lua/effects/vj_hlr_protozoan_pop/init.lua
Normal file
57
lua/effects/vj_hlr_protozoan_pop/init.lua
Normal 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
|
||||
80
lua/effects/vj_hlr_rico/init.lua
Normal file
80
lua/effects/vj_hlr_rico/init.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
--[[
|
||||
| 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data) // You're welcome @DrVrej for not making the effect name Ricochet you illiterate boi
|
||||
self.Pos = data:GetOrigin()
|
||||
self.Size = data:GetScale()
|
||||
self.EffectType = math.Round(data:GetMagnitude())
|
||||
local Emitter = ParticleEmitter(self.Pos)
|
||||
if Emitter == nil then return end
|
||||
|
||||
sound.Play("vj_hlr/fx/ric" .. math.random(1,5) .. ".wav",self.Pos,80,100)
|
||||
|
||||
if GetConVar("vj_hlr1_sparkfx"):GetInt() == 1 then
|
||||
for i = 1,math.random(5,15) do
|
||||
local particle = Emitter:Add("vj_hl/tracer_middle",self.Pos)
|
||||
particle:SetVelocity(VectorRand() *math.Rand(100,350))
|
||||
particle:SetDieTime(math.Rand(0.1,1))
|
||||
particle:SetStartAlpha(200)
|
||||
particle:SetEndAlpha(0)
|
||||
particle:SetStartSize(1)
|
||||
particle:SetEndSize(3)
|
||||
particle:SetRoll(math.random(0,360))
|
||||
particle:SetGravity(Vector(math.random(-300,300),math.random(-300,300),math.random(-300,-700)))
|
||||
particle:SetCollide(true)
|
||||
particle:SetBounce(0.9)
|
||||
particle:SetAirResistance(120)
|
||||
particle:SetStartLength(0)
|
||||
particle:SetEndLength(0.1)
|
||||
particle:SetVelocityScale(true)
|
||||
particle:SetCollide(true)
|
||||
particle:SetColor(255,231,166)
|
||||
end
|
||||
end
|
||||
|
||||
local effect = self.EffectType or math.random(1,2)
|
||||
if effect == 1 then
|
||||
local fx = Emitter:Add("vj_hl/rico2",self.Pos)
|
||||
fx:SetVelocity(Vector(0, 0, 0))
|
||||
fx:SetAirResistance(160)
|
||||
fx:SetDieTime(0.15)
|
||||
fx:SetStartAlpha(255)
|
||||
fx:SetEndAlpha(0)
|
||||
fx:SetStartSize(self.Size or math.random(5,8))
|
||||
fx:SetEndSize(5)
|
||||
fx:SetRoll(math.Rand(180,360))
|
||||
fx:SetRollDelta(math.Rand(-1,1))
|
||||
fx:SetColor(255,255,255)
|
||||
elseif effect == 2 then
|
||||
local fx = Emitter:Add("vj_hl/rico1",self.Pos)
|
||||
fx:SetVelocity(Vector(0, 0, 0))
|
||||
fx:SetAirResistance(160)
|
||||
fx:SetDieTime(0.15)
|
||||
fx:SetStartAlpha(255)
|
||||
fx:SetEndAlpha(0)
|
||||
fx:SetStartSize(self.Size or 4)
|
||||
fx:SetEndSize(self.Size && self.Size *2 or 8)
|
||||
fx:SetColor(255,255,255)
|
||||
end
|
||||
|
||||
Emitter:Finish()
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render() end
|
||||
45
lua/effects/vj_hlr_rope/init.lua
Normal file
45
lua/effects/vj_hlr_rope/init.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
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/rope")
|
||||
|
||||
function EFFECT:Init(data)
|
||||
self.StartPos = data:GetStart()
|
||||
self.Ent = data:GetEntity()
|
||||
self.Att = self.Ent:GetAttachment(4).Pos
|
||||
|
||||
self.Dead = false
|
||||
self.Wait = CurTime() + 0.5 -- Minimum wait time
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
if !IsValid(self.Ent) or self.Dead then return false end
|
||||
self.Att = self.Ent:GetAttachment(4).Pos
|
||||
self:SetRenderBoundsWS(self.StartPos, self.Att)
|
||||
if CurTime() > self.Wait && self.Ent:GetVelocity():Length() <= 0 then
|
||||
self.Dead = true
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local rColor = Color(255, 255, 255)
|
||||
--
|
||||
function EFFECT:Render()
|
||||
render.SetMaterial(self.MainMat)
|
||||
render.DrawBeam(self.StartPos, self.Att, 5, 0, 1 + ((self.StartPos - self.Att):Length() / 32), rColor)
|
||||
end
|
||||
37
lua/effects/vj_hlr_smoke/init.lua
Normal file
37
lua/effects/vj_hlr_smoke/init.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
self.Pos = data:GetOrigin()
|
||||
self.Size = data:GetScale()
|
||||
local emitter = ParticleEmitter(self.Pos)
|
||||
if emitter == nil then return end
|
||||
|
||||
local fx = emitter:Add("vj_hl/sprites/steam1", self.Pos)
|
||||
fx:SetVelocity(self:GetUp()*100 + Vector(0, 20, 20))
|
||||
fx:SetDieTime(2)
|
||||
fx:SetStartSize(self.Size)
|
||||
fx:SetEndSize(self.Size + math.random(0, 9))
|
||||
fx:SetRoll(math.Rand(-5, 5))
|
||||
fx:SetEndAlpha(0)
|
||||
emitter:Finish()
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render() end
|
||||
57
lua/effects/vj_hlr_spark/init.lua
Normal file
57
lua/effects/vj_hlr_spark/init.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
self.Pos = data:GetOrigin()
|
||||
self.Size = data:GetScale()
|
||||
local emitter = ParticleEmitter(self.Pos)
|
||||
if emitter == nil then return end
|
||||
|
||||
for _ = 1, 10 do
|
||||
local fxSpark = emitter:Add("vj_hl/tracer_middle", self.Pos)
|
||||
fxSpark:SetVelocity(VectorRand() * math.Rand(50, 50))
|
||||
fxSpark:SetDieTime(math.Rand(0.3, 0.5))
|
||||
fxSpark:SetStartAlpha(200)
|
||||
fxSpark:SetEndAlpha(0)
|
||||
fxSpark:SetStartSize(1)
|
||||
fxSpark:SetEndSize(2)
|
||||
fxSpark:SetRoll(math.random(0,360))
|
||||
fxSpark:SetGravity(Vector(math.random(-300,300),math.random(-300,300),math.random(-200,-10)))
|
||||
fxSpark:SetBounce(0.9)
|
||||
fxSpark:SetAirResistance(120)
|
||||
fxSpark:SetStartLength(0)
|
||||
fxSpark:SetEndLength(0.2)
|
||||
fxSpark:SetVelocityScale(true)
|
||||
fxSpark:SetCollide(true)
|
||||
fxSpark:SetColor(255,231,166)
|
||||
end
|
||||
local fx = emitter:Add("vj_hl/rico1",self.Pos)
|
||||
fx:SetVelocity(Vector(0, 0, 0))
|
||||
fx:SetAirResistance(160)
|
||||
fx:SetDieTime(0.15)
|
||||
fx:SetStartAlpha(255)
|
||||
fx:SetEndAlpha(0)
|
||||
fx:SetStartSize(self.Size or 4)
|
||||
fx:SetEndSize(self.Size && self.Size *2 or 8)
|
||||
fx:SetColor(255,255,255)
|
||||
emitter:Finish()
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render() end
|
||||
108
lua/effects/vj_hlr_tracer/init.lua
Normal file
108
lua/effects/vj_hlr_tracer/init.lua
Normal file
@@ -0,0 +1,108 @@
|
||||
--[[
|
||||
| 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/tracer_middle")
|
||||
|
||||
function EFFECT:Init(data)
|
||||
self.StartPos = data:GetStart()
|
||||
self.EndPos = data:GetOrigin()
|
||||
local ent = data:GetEntity()
|
||||
local att = data:GetAttachment()
|
||||
local locPly = LocalPlayer()
|
||||
|
||||
if (IsValid( ent ) && att > 0) then
|
||||
if (ent.Owner == locPly && locPly:GetViewModel() != locPly) then ent = ent.Owner:GetViewModel() end
|
||||
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 = math.min(1, self.StartPos:Distance(self.EndPos) / 10000) -- Calculate death time
|
||||
self.Length = 0.1
|
||||
|
||||
-- Die when it reaches its target
|
||||
self.DieTime = CurTime() + self.TracerTime
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local metalMat = {[MAT_VENT]=true, [MAT_METAL]=true, [MAT_GRATE]=true, [MAT_GLASS]=true, [MAT_COMPUTER]=true}
|
||||
local vecDef = Vector(0, 0, 0)
|
||||
--
|
||||
function EFFECT:Think()
|
||||
-- When it hits
|
||||
if CurTime() > self.DieTime then
|
||||
local tr = util.TraceLine({
|
||||
start = self.StartPos,
|
||||
endpos = self.EndPos
|
||||
})
|
||||
if tr.Hit && metalMat[tr.MatType] then
|
||||
sound.Play("vj_hlr/fx/ric" .. math.random(1, 5) .. ".wav", self.EndPos, 80, 100)
|
||||
local Emitter = ParticleEmitter(self.EndPos)
|
||||
if GetConVar("vj_hlr1_sparkfx"):GetInt() == 1 then
|
||||
for _ = 1, math.random(5, 15) do
|
||||
local particle = Emitter:Add("vj_hl/tracer_middle", self.EndPos)
|
||||
particle:SetVelocity(VectorRand()*math.Rand(100, 350))
|
||||
particle:SetDieTime(math.Rand(0.1, 1))
|
||||
particle:SetStartAlpha(200)
|
||||
particle:SetEndAlpha(0)
|
||||
particle:SetStartSize(1)
|
||||
particle:SetEndSize(3)
|
||||
particle:SetRoll(math.random(0, 360))
|
||||
particle:SetGravity(Vector(math.random(-300, 300), math.random(-300, 300), math.random(-300, -700)))
|
||||
particle:SetCollide(true)
|
||||
particle:SetBounce(0.9)
|
||||
particle:SetAirResistance(120)
|
||||
particle:SetStartLength(0)
|
||||
particle:SetEndLength(0.1)
|
||||
particle:SetVelocityScale(true)
|
||||
particle:SetCollide(true)
|
||||
particle:SetColor(255, 231, 166)
|
||||
end
|
||||
end
|
||||
local fx = Emitter:Add("vj_hl/rico"..math.random(1, 2), self.EndPos)
|
||||
fx:SetVelocity(vecDef)
|
||||
fx:SetAirResistance(160)
|
||||
fx:SetDieTime(0.15)
|
||||
fx:SetStartAlpha(255)
|
||||
fx:SetEndAlpha(0)
|
||||
fx:SetStartSize(math.random(4, 6))
|
||||
fx:SetEndSize(5)
|
||||
fx:SetRoll(math.Rand(180, 360))
|
||||
fx:SetRollDelta(math.Rand(-1, 1))
|
||||
fx:SetColor(255,255,255)
|
||||
end
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local colorBeam = Color(255, 255, 255, 25)
|
||||
--
|
||||
function EFFECT:Render()
|
||||
local fDelta = (self.DieTime - CurTime()) / self.TracerTime
|
||||
fDelta = math.Clamp(fDelta, 0, 1) ^ 0.5
|
||||
render.SetMaterial(self.MainMat)
|
||||
local sinWave = math.sin(fDelta * math.pi)
|
||||
render.DrawBeam(self.EndPos - self.Dir * (fDelta - sinWave * self.Length), self.EndPos - self.Dir * (fDelta + sinWave * self.Length), 1 + sinWave * 3, 1, 0, colorBeam)
|
||||
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.
|
||||
--------------------------------------------------*/
|
||||
108
lua/effects/vj_hlr_tracer_large/init.lua
Normal file
108
lua/effects/vj_hlr_tracer_large/init.lua
Normal file
@@ -0,0 +1,108 @@
|
||||
--[[
|
||||
| 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/tracer_middle")
|
||||
|
||||
function EFFECT:Init(data)
|
||||
self.StartPos = data:GetStart()
|
||||
self.EndPos = data:GetOrigin()
|
||||
local ent = data:GetEntity()
|
||||
local att = data:GetAttachment()
|
||||
local locPly = LocalPlayer()
|
||||
|
||||
if (IsValid( ent ) && att > 0) then
|
||||
if (ent.Owner == locPly && locPly:GetViewModel() != locPly) then ent = ent.Owner:GetViewModel() end
|
||||
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 = math.min(1, self.StartPos:Distance(self.EndPos) / 10000) -- Calculate death time
|
||||
self.Length = 0.1
|
||||
|
||||
-- Die when it reaches its target
|
||||
self.DieTime = CurTime() + self.TracerTime
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local metalMat = {[MAT_VENT]=true, [MAT_METAL]=true, [MAT_GRATE]=true, [MAT_GLASS]=true, [MAT_COMPUTER]=true}
|
||||
local vecDef = Vector(0, 0, 0)
|
||||
--
|
||||
function EFFECT:Think()
|
||||
-- When it hits
|
||||
if CurTime() > self.DieTime then
|
||||
local tr = util.TraceLine({
|
||||
start = self.StartPos,
|
||||
endpos = self.EndPos
|
||||
})
|
||||
if tr.Hit && metalMat[tr.MatType] then
|
||||
sound.Play("vj_hlr/fx/ric" .. math.random(1, 5) .. ".wav", self.EndPos, 80, 100)
|
||||
local Emitter = ParticleEmitter(self.EndPos)
|
||||
if GetConVar("vj_hlr1_sparkfx"):GetInt() == 1 then
|
||||
for _ = 1, math.random(5, 15) do
|
||||
local particle = Emitter:Add("vj_hl/tracer_middle", self.EndPos)
|
||||
particle:SetVelocity(VectorRand()*math.Rand(100, 350))
|
||||
particle:SetDieTime(math.Rand(0.1, 1))
|
||||
particle:SetStartAlpha(200)
|
||||
particle:SetEndAlpha(0)
|
||||
particle:SetStartSize(1)
|
||||
particle:SetEndSize(3)
|
||||
particle:SetRoll(math.random(0, 360))
|
||||
particle:SetGravity(Vector(math.random(-300, 300), math.random(-300, 300), math.random(-300, -700)))
|
||||
particle:SetCollide(true)
|
||||
particle:SetBounce(0.9)
|
||||
particle:SetAirResistance(120)
|
||||
particle:SetStartLength(0)
|
||||
particle:SetEndLength(0.1)
|
||||
particle:SetVelocityScale(true)
|
||||
particle:SetCollide(true)
|
||||
particle:SetColor(255, 231, 166)
|
||||
end
|
||||
end
|
||||
local fx = Emitter:Add("vj_hl/rico"..math.random(1, 2), self.EndPos)
|
||||
fx:SetVelocity(vecDef)
|
||||
fx:SetAirResistance(160)
|
||||
fx:SetDieTime(0.15)
|
||||
fx:SetStartAlpha(255)
|
||||
fx:SetEndAlpha(0)
|
||||
fx:SetStartSize(math.random(4, 6))
|
||||
fx:SetEndSize(5)
|
||||
fx:SetRoll(math.Rand(180, 360))
|
||||
fx:SetRollDelta(math.Rand(-1, 1))
|
||||
fx:SetColor(255,255,255)
|
||||
end
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local colorBeam = Color(255, 255, 255, 25)
|
||||
--
|
||||
function EFFECT:Render()
|
||||
local fDelta = (self.DieTime - CurTime()) / self.TracerTime
|
||||
fDelta = math.Clamp(fDelta, 0, 1) ^ 0.5
|
||||
render.SetMaterial(self.MainMat)
|
||||
local sinWave = math.sin(fDelta * math.pi)
|
||||
render.DrawBeam(self.EndPos - self.Dir * (fDelta - sinWave * self.Length), self.EndPos - self.Dir * (fDelta + sinWave * self.Length), 20 + sinWave * 3, 1, 0, colorBeam)
|
||||
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.
|
||||
--------------------------------------------------*/
|
||||
58
lua/effects/vj_hlr_xencannon_beam/init.lua
Normal file
58
lua/effects/vj_hlr_xencannon_beam/init.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
--[[
|
||||
| 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_blue")
|
||||
|
||||
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(14,18), 0, math.Rand(0,35) + ((self.StartPos - self.EndPos):Length() / 128), Color(0,0,255,50 / ((self.DieTime - 0.5) - CurTime())))
|
||||
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.
|
||||
--------------------------------------------------*/
|
||||
69
lua/effects/vj_laserrod_red/init.lua
Normal file
69
lua/effects/vj_laserrod_red/init.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
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("effects/spark")
|
||||
|
||||
function EFFECT:Init( data )
|
||||
self.StartPos = data:GetStart()
|
||||
self.EndPos = data:GetOrigin()
|
||||
local ent = data:GetEntity()
|
||||
local att = data:GetAttachment()
|
||||
|
||||
if ( IsValid( ent ) && att > 0 ) then
|
||||
if (ent.Owner == LocalPlayer() && !LocalPlayer():GetViewModel() != LocalPlayer()) then ent = ent.Owner:GetViewModel() end
|
||||
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 = math.min(1, self.StartPos:Distance(self.EndPos) / 10000) -- Calculate death time
|
||||
self.Length = 0.1
|
||||
|
||||
-- Die when it reaches its target
|
||||
self.DieTime = CurTime() + self.TracerTime
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
if (CurTime() > self.DieTime) then -- If it's dead then...
|
||||
util.Decal("fadingscorch", self.EndPos + self.Dir:GetNormalized(), self.EndPos - self.Dir:GetNormalized())
|
||||
|
||||
local effectData = EffectData()
|
||||
effectData:SetOrigin(self.EndPos + self.Dir:GetNormalized() * -2)
|
||||
effectData:SetNormal(self.Dir:GetNormalized() * -3)
|
||||
effectData:SetMagnitude(0.1)
|
||||
effectData:SetScale(0.8)
|
||||
effectData:SetRadius(5)
|
||||
util.Effect("Sparks", effectData)
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
local fDelta = (self.DieTime - CurTime()) / self.TracerTime
|
||||
fDelta = math.Clamp(fDelta, 0, 1) ^ 0.5
|
||||
render.SetMaterial(self.MainMat)
|
||||
local sinWave = math.sin(fDelta * math.pi)
|
||||
render.DrawBeam(
|
||||
self.EndPos - self.Dir * (fDelta - sinWave * self.Length),
|
||||
self.EndPos - self.Dir * (fDelta + sinWave * self.Length),
|
||||
5 + sinWave * 35, 1, 0, Color(255, 0, 0, 255)
|
||||
)
|
||||
end
|
||||
44
lua/effects/vj_medium_dust1/init.lua
Normal file
44
lua/effects/vj_medium_dust1/init.lua
Normal 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
self.Pos = data:GetOrigin()
|
||||
local Emitter = ParticleEmitter(self.Pos)
|
||||
if Emitter == nil then return end
|
||||
|
||||
-- Cloud of smoke that goes up
|
||||
for i = 1,20 do
|
||||
local EffectCode = Emitter:Add("particles/smokey",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-100,100),math.random(-100,100),math.random(50,60)))
|
||||
EffectCode:SetDieTime(math.Rand(9,11)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(150) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(230,270)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(300,350)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-0.2,0.2)) -- How fast it rolls
|
||||
EffectCode:SetColor(80,60,20) -- The color of the effect
|
||||
EffectCode:SetGravity(Vector(0, 0, 0)) -- The Gravity
|
||||
EffectCode:SetAirResistance(15)
|
||||
end
|
||||
Emitter:Finish()
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
end
|
||||
80
lua/effects/vj_medium_explosion1/init.lua
Normal file
80
lua/effects/vj_medium_explosion1/init.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
--[[
|
||||
| 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
self.Pos = data:GetOrigin()
|
||||
local Emitter = ParticleEmitter(self.Pos)
|
||||
if Emitter == nil then return end
|
||||
|
||||
/*local effectData = EffectData()
|
||||
effectData:SetOrigin( self.Pos )
|
||||
effectData:SetNormal( Vector(0, 0, 0) )
|
||||
effectData:SetMagnitude( 2.6 )
|
||||
effectData:SetScale( 2.6 )
|
||||
effectData:SetRadius( 93 )
|
||||
util.Effect( "Sparks", effectData, true, true )*/
|
||||
|
||||
-- Fire
|
||||
for i=1,8 do
|
||||
local EffectCode = Emitter:Add("particles/flamelet1",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-30,30),math.random(-30,30),math.random(30,40)))
|
||||
EffectCode:SetDieTime(math.Rand(1,2)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(90,100)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(300,300)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(300,300)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(0) -- How fast it rolls
|
||||
EffectCode:SetColor(170,170,170) -- The color of the effect
|
||||
EffectCode:SetGravity(Vector(0,0,math.random(-30,-10))) -- The Gravity
|
||||
end
|
||||
|
||||
-- Smoke screen
|
||||
for i = 1,12 do
|
||||
local EffectCode = Emitter:Add("particles/smokey",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-40,40),math.random(-40,40),math.random(5,15)))
|
||||
EffectCode:SetDieTime(math.Rand(15,17)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(220,230)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(130,170)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(300,350)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(0) -- How fast it rolls
|
||||
EffectCode:SetColor(100,100,100) -- The color of the effect
|
||||
EffectCode:SetGravity(Vector(0, 0, 0)) -- The Gravity
|
||||
EffectCode:SetAirResistance(15)
|
||||
end
|
||||
|
||||
-- Cloud of smoke that goes up
|
||||
for i = 1,8 do
|
||||
local EffectCode = Emitter:Add("particles/smokey",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-60,70),math.random(-100,70),math.random(70,180)))
|
||||
EffectCode:SetDieTime(math.Rand(4,5)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(220,230)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(55,66)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(192,256)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
EffectCode:SetColor(50,50,50) -- The color of the effect
|
||||
EffectCode:SetGravity(Vector(0,0,math.random(-30,-10))) -- The Gravity
|
||||
end
|
||||
Emitter:Finish()
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
end
|
||||
44
lua/effects/vj_small_dust1/init.lua
Normal file
44
lua/effects/vj_small_dust1/init.lua
Normal 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
self.Pos = data:GetOrigin()
|
||||
local Emitter = ParticleEmitter(self.Pos)
|
||||
if Emitter == nil then return end
|
||||
|
||||
-- Cloud of smoke that goes up
|
||||
for i = 1,8 do
|
||||
local EffectCode = Emitter:Add("particles/smokey",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-40,40),math.random(-40,40),math.random(5,15)))
|
||||
EffectCode:SetDieTime(math.Rand(7,9)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(150) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(20,40)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(100,120)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-0.2,0.2)) -- How fast it rolls
|
||||
EffectCode:SetColor(80,60,20) -- The color of the effect
|
||||
EffectCode:SetGravity(Vector(0, 0, 0)) -- The Gravity
|
||||
EffectCode:SetAirResistance(15)
|
||||
end
|
||||
Emitter:Finish()
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
end
|
||||
72
lua/effects/vj_small_explosion1/init.lua
Normal file
72
lua/effects/vj_small_explosion1/init.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
self.Pos = data:GetOrigin()
|
||||
local Emitter = ParticleEmitter(self.Pos)
|
||||
if Emitter == nil then return end
|
||||
|
||||
-- Fire
|
||||
for _ = 1, 3 do
|
||||
local EffectCode = Emitter:Add("particles/flamelet1",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-30,30),math.random(-30,30),math.random(30,40)))
|
||||
EffectCode:SetDieTime(math.Rand(0.4,0.6)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(90,100)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(60,80)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(100,100)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(0,0)) -- How fast it rolls
|
||||
EffectCode:SetColor(255,255,255) -- The color of the effect
|
||||
EffectCode:SetGravity(Vector(0,0,math.random(-30,-10))) -- The Gravity
|
||||
end
|
||||
|
||||
-- Smoke screen
|
||||
for _ = 1, 5 do
|
||||
local EffectCode = Emitter:Add("particles/smokey",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-40,40),math.random(-40,40),math.random(5,15)))
|
||||
EffectCode:SetDieTime(math.Rand(7,9)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(200,230)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(80,100)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(130,150)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-0.2,0.2)) -- How fast it rolls
|
||||
EffectCode:SetColor(50,50,50) -- The color of the effect
|
||||
EffectCode:SetGravity(Vector(0, 0, 0)) -- The Gravity
|
||||
EffectCode:SetAirResistance(15)
|
||||
end
|
||||
|
||||
-- Cloud of smoke that goes up
|
||||
for _ = 1, 5 do
|
||||
local EffectCode = Emitter:Add("particles/smokey",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-60,70),math.random(-60,70),math.random(70,100)))
|
||||
EffectCode:SetDieTime(math.Rand(3,4)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(150,190)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(80,100)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(130,150)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
EffectCode:SetColor(50,50,50) -- The color of the effect
|
||||
EffectCode:SetGravity(Vector(0,0,math.random(-30,-10))) -- The Gravity
|
||||
end
|
||||
Emitter:Finish()
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
end
|
||||
30
lua/effects/vj_weapon_pistolshell1/init.lua
Normal file
30
lua/effects/vj_weapon_pistolshell1/init.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
--[[
|
||||
| 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
local ent = data:GetEntity()
|
||||
if !IsValid(ent) then return end
|
||||
local effectData = EffectData()
|
||||
effectData:SetOrigin(self:GetTracerShootPos(data:GetOrigin(), ent, data:GetAttachment()))
|
||||
util.Effect("ShellEject", effectData, true, true)
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
end
|
||||
191
lua/effects/vj_weapon_playermuzzle/init.lua
Normal file
191
lua/effects/vj_weapon_playermuzzle/init.lua
Normal file
@@ -0,0 +1,191 @@
|
||||
--[[
|
||||
| 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
local ent = data:GetEntity()
|
||||
if !IsValid(ent) then return end
|
||||
local owner = ent:GetOwner()
|
||||
if !IsValid(owner) then return end
|
||||
local muzEnt = ((owner != LocalPlayer()) or owner:ShouldDrawLocalPlayer()) && ent or owner:GetViewModel()
|
||||
-- (if the owner isn't the local player OR the owner is in third person, then use world model) OR (Use the owner's viewmodel)
|
||||
ParticleEffectAttach(VJ_PICK(ent.PrimaryEffects_MuzzleParticles), PATTACH_POINT, muzEnt, data:GetAttachment())
|
||||
|
||||
-- Muzzle Flash
|
||||
/*
|
||||
self.Pos = self:GetTracerShootPos(data:GetOrigin(),data:GetEntity(),data:GetAttachment())
|
||||
local Emitter = ParticleEmitter(self.Pos)
|
||||
if Emitter == nil then return end
|
||||
|
||||
local LocalPlayerMagnitude = 0
|
||||
if IsValid(data:GetEntity()) && IsValid(data:GetEntity():GetOwner()) && data:GetEntity():GetOwner():IsPlayer() && data:GetEntity().Owner == LocalPlayer() then
|
||||
LocalPlayerMagnitude = data:GetMagnitude() else
|
||||
LocalPlayerMagnitude = 0
|
||||
end
|
||||
|
||||
if GetConVarNumber("vj_wep_nomuszzleflash") == 0 && IsValid(data:GetEntity()) then
|
||||
for i = 1,3 do //4
|
||||
local EffectCode = Emitter:Add("effects/muzzleflash"..math.random(1,4),self.Pos + LocalPlayerMagnitude * data:GetNormal())
|
||||
EffectCode:SetVelocity(data:GetNormal() + 1.1 * data:GetEntity():GetOwner():GetVelocity())
|
||||
//EffectCode:SetAirResistance(200)
|
||||
EffectCode:SetDieTime(math.Rand(0.05,0.05)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(200,255)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(5,6)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(16,20)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
EffectCode:SetColor(255,255,255) -- The color of the effect
|
||||
//EffectCode:SetGravity(Vector(0,0,100)) -- The Gravity
|
||||
end
|
||||
local EffectCode = Emitter:Add("effects/yellowflare", self.Pos)
|
||||
EffectCode:SetVelocity(data:GetNormal() + 1.1 * data:GetEntity():GetOwner():GetVelocity())
|
||||
EffectCode:SetAirResistance(160)
|
||||
EffectCode:SetDieTime(0.05)
|
||||
EffectCode:SetStartAlpha(255)
|
||||
EffectCode:SetEndAlpha(0)
|
||||
EffectCode:SetStartSize(.5)
|
||||
EffectCode:SetEndSize(15)
|
||||
EffectCode:SetRoll(math.Rand(180, 480))
|
||||
EffectCode:SetRollDelta(math.Rand(-1, 1))
|
||||
EffectCode:SetColor(255, 255, 255)
|
||||
end
|
||||
|
||||
-- Heat wave
|
||||
if GetConVarNumber("vj_wep_nomuzzleheatwave") == 0 && IsValid(data:GetEntity()) then
|
||||
local EffectCode = Emitter:Add("sprites/heatwave",self.Pos + LocalPlayerMagnitude * data:GetNormal())
|
||||
EffectCode:SetVelocity(data:GetNormal() + 1.1 * data:GetEntity():GetOwner():GetVelocity())
|
||||
EffectCode:SetDieTime(math.Rand(0.15,0.2)) -- How much time until it dies
|
||||
//EffectCode:SetStartAlpha(math.Rand(90,100)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(7,9)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(4,6)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
//EffectCode:SetColor(255,255,255) -- The color of the effect
|
||||
//EffectCode:SetGravity(Vector(0,0,100)) -- The Gravity
|
||||
end
|
||||
|
||||
-- Smoke
|
||||
if GetConVarNumber("vj_wep_nomuszzlesmoke") == 0 && IsValid(data:GetEntity()) then
|
||||
local smokeinum = 2
|
||||
if IsValid(data:GetEntity():GetOwner()) then
|
||||
if data:GetEntity():GetOwner():IsNPC() then smokeinum = 1 else smokeinum = 2 end
|
||||
end
|
||||
local smokediet = 0.5,0.5
|
||||
if IsValid(data:GetEntity():GetOwner()) then
|
||||
if data:GetEntity():GetOwner():IsNPC() then smokediet = 0.2,0.2 else smokediet = 0.4,0.4 end
|
||||
end
|
||||
for i = 1,smokeinum do //4
|
||||
local EffectCode = Emitter:Add("particles/smokey",self.Pos + LocalPlayerMagnitude * data:GetNormal())
|
||||
EffectCode:SetVelocity(data:GetNormal() + Vector(math.random(-30,30),math.random(-30,30),math.random(-30,30)))
|
||||
EffectCode:SetDieTime(math.Rand(smokediet,smokediet)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(40,60)) -- Transparency
|
||||
EffectCode:SetEndAlpha(0) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(2,3)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(13,15)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
EffectCode:SetColor(150,150,150) -- The color of the effect
|
||||
//EffectCode:SetGravity(Vector(0,0,math.random(-30,-10))) -- The Gravity
|
||||
EffectCode:SetAirResistance(300)
|
||||
end
|
||||
end
|
||||
|
||||
if GetConVarNumber("vj_wep_nomuszzleflash") == 0 && IsValid(data:GetEntity()) then
|
||||
if IsValid(data:GetEntity():GetOwner()) then
|
||||
if data:GetEntity():GetOwner():IsPlayer() then
|
||||
for i = 1,4 do
|
||||
local EffectCode = Emitter:Add("effects/yellowflare",self.Pos)
|
||||
EffectCode:SetVelocity((data:GetNormal() + VectorRand() * 0.5) * math.Rand(150, 200))
|
||||
EffectCode:SetDieTime(math.Rand(0.5, 0.8))
|
||||
EffectCode:SetStartAlpha(255)
|
||||
EffectCode:SetStartSize(.5)
|
||||
EffectCode:SetEndSize(2)
|
||||
EffectCode:SetRoll(0)
|
||||
EffectCode:SetGravity(Vector(0, 0, -1))
|
||||
EffectCode:SetBounce(.8)
|
||||
EffectCode:SetAirResistance(400)
|
||||
EffectCode:SetStartLength(0.01)
|
||||
EffectCode:SetEndLength(0)
|
||||
EffectCode:SetVelocityScale(true)
|
||||
EffectCode:SetCollide(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Emitter:Finish()*/
|
||||
|
||||
-- Small Smoke
|
||||
/*for i = 1,4 do
|
||||
local EffectCode = Emitter:Add("particle/particle_smokegrenade",self.Pos)
|
||||
EffectCode:SetVelocity(Vector(math.random(-30,30),math.random(-30,30),math.random(20,30)))
|
||||
EffectCode:SetAirResistance(200)
|
||||
EffectCode:SetDieTime(math.Rand(0.5,1)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(100,150)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(3,4)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(6,8)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
EffectCode:SetColor(255,255,255) -- The color of the effect
|
||||
//EffectCode:SetGravity(Vector(0,0,100)) -- The Gravity
|
||||
end*/
|
||||
//local EffectCode = Emitter:Add("effects/muzzleflash"..math.random(1,4),self.Pos + LocalPlayerMagnitude * data:GetNormal())
|
||||
//EffectCode:SetVelocity(data:GetNormal() + 1.1 * data:GetEntity():GetOwner():GetVelocity())
|
||||
|
||||
/*
|
||||
local EffectCode = Emitter:Add("effects/muzzleflare_01",self.Pos + LocalPlayerMagnitude * data:GetNormal())
|
||||
EffectCode:SetVelocity(data:GetNormal() + 1.1 * data:GetEntity():GetOwner():GetVelocity())
|
||||
//EffectCode:SetAirResistance(200)
|
||||
EffectCode:SetDieTime(math.Rand(0.05,0.05)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(200,255)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(5,6)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(16,20)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
EffectCode:SetColor(245,164,53) -- The color of the effect
|
||||
//EffectCode:SetGravity(Vector(0,0,100)) -- The Gravity
|
||||
|
||||
local EffectCode = Emitter:Add("effects/muzzlestarlarge_01",self.Pos + LocalPlayerMagnitude * data:GetNormal())
|
||||
EffectCode:SetVelocity(data:GetNormal() + 1.1 * data:GetEntity():GetOwner():GetVelocity())
|
||||
//EffectCode:SetAirResistance(200)
|
||||
EffectCode:SetDieTime(math.Rand(0.05,0.05)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(200,255)) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(5,6)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(16,20)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
EffectCode:SetColor(248,241,200) -- The color of the effect
|
||||
//EffectCode:SetGravity(Vector(0,0,100)) -- The Gravity
|
||||
|
||||
local EffectCode = Emitter:Add("particle/bm_whispysmoke_001",self.Pos + LocalPlayerMagnitude * data:GetNormal())
|
||||
EffectCode:SetVelocity(data:GetNormal() + Vector(math.random(-30,30),math.random(-30,30),math.random(-30,30)))
|
||||
EffectCode:SetDieTime(math.Rand(0.5,0.5)) -- How much time until it dies
|
||||
EffectCode:SetStartAlpha(math.Rand(40,60)) -- Transparency
|
||||
EffectCode:SetEndAlpha(0) -- Transparency
|
||||
EffectCode:SetStartSize(math.Rand(2,3)) -- Size of the effect
|
||||
EffectCode:SetEndSize(math.Rand(13,15)) -- Size of the effect at the end (The effect slowly trasnsforms to this size)
|
||||
EffectCode:SetRoll(math.Rand(480,540))
|
||||
EffectCode:SetRollDelta(math.Rand(-1,1)) -- How fast it rolls
|
||||
EffectCode:SetColor(255,255,255) -- The color of the effect
|
||||
//EffectCode:SetGravity(Vector(0,0,math.random(-30,-10))) -- The Gravity
|
||||
EffectCode:SetAirResistance(300)
|
||||
*/
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
end
|
||||
30
lua/effects/vj_weapon_rifleshell1/init.lua
Normal file
30
lua/effects/vj_weapon_rifleshell1/init.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
--[[
|
||||
| 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
local ent = data:GetEntity()
|
||||
if !IsValid(ent) then return end
|
||||
local effectData = EffectData()
|
||||
effectData:SetOrigin(self:GetTracerShootPos(data:GetOrigin(), ent, data:GetAttachment()))
|
||||
util.Effect("RifleShellEject", effectData, true, true)
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
end
|
||||
30
lua/effects/vj_weapon_shotgunshell1/init.lua
Normal file
30
lua/effects/vj_weapon_shotgunshell1/init.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
--[[
|
||||
| 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.
|
||||
--------------------------------------------------*/
|
||||
function EFFECT:Init(data)
|
||||
local ent = data:GetEntity()
|
||||
if !IsValid(ent) then return end
|
||||
local effectData = EffectData()
|
||||
effectData:SetOrigin(self:GetTracerShootPos(data:GetOrigin(), ent, data:GetAttachment()))
|
||||
util.Effect("ShotgunShellEject", effectData, true, true)
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Think()
|
||||
return false
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function EFFECT:Render()
|
||||
end
|
||||
63
lua/effects/warp_cannon.lua
Normal file
63
lua/effects/warp_cannon.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
--Most of the credit for this goes to the people who made/helped with the strider cannon SWEP:
|
||||
-- http://www.garrysmod.org/downloads/?a=view&id=31329
|
||||
local flashMat = Material("Effects/blueblackflash")
|
||||
local pinchMat = Material("Effects/strider_pinch_dudv")
|
||||
local beamMat = Material("Effects/blueblacklargebeam")
|
||||
|
||||
function EFFECT:Init(effectdata)
|
||||
self.ent = effectdata:GetEntity()
|
||||
self.hitPos = effectdata:GetOrigin()
|
||||
self.startTime = CurTime()
|
||||
self.cycle = 0
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
if not IsValid(self.ent) then return false end
|
||||
self:SetPos(self.ent:GetAttachment(self.ent:GetModel() == "models/combine_strider.mdl" and self.ent:LookupAttachment("BigGun") or self.ent:LookupAttachment("bellygun")).Pos)
|
||||
self:SetRenderBoundsWS(self:GetPos(), self.hitPos)
|
||||
if CurTime() - self.startTime > 2.4 then return false end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function EFFECT:Render()
|
||||
local cycleF = (CurTime() - self.startTime) / 1.2
|
||||
--flash
|
||||
render.SetMaterial(flashMat)
|
||||
|
||||
if cycleF < .5 then
|
||||
render.DrawSprite(self:GetPos(), cycleF * 100, cycleF * 100, Color(0, 0, 0, 255))
|
||||
elseif cycleF < 1 then
|
||||
render.DrawSprite(self:GetPos(), cycleF * 100, cycleF * 100, Color(cycleF * 255, cycleF * 255, cycleF * 255, 255))
|
||||
else
|
||||
render.DrawSprite(self:GetPos(), 50, 50, Color(255, 255, 255, 255))
|
||||
end
|
||||
|
||||
if cycleF < 1 then
|
||||
--pinch
|
||||
pinchMat:SetFloat("$refractamount", cycleF)
|
||||
render.SetMaterial(pinchMat)
|
||||
render.UpdateRefractTexture()
|
||||
render.DrawSprite(self:GetPos(), cycleF * 150, cycleF * 150)
|
||||
|
||||
--Beam
|
||||
if cycleF > .5 then
|
||||
render.SetMaterial(beamMat)
|
||||
render.DrawBeam(self:GetPos(), self.hitPos, cycleF * 2, 0, 0, Color(255, 255, 255, (cycleF - .5) * 255))
|
||||
end
|
||||
elseif cycleF < 1.1 then
|
||||
--fired beam
|
||||
render.SetMaterial(beamMat)
|
||||
render.DrawBeam(LerpVector((cycleF - 1) * 10, self:GetPos(), self.hitPos), self.hitPos, (cycleF - 1) * 500, 0, 0)
|
||||
end
|
||||
end
|
||||
44
lua/effects/wow_doge.lua
Normal file
44
lua/effects/wow_doge.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
function EFFECT:Init(effectdata)
|
||||
self:SetPos(effectdata:GetOrigin())
|
||||
self.color = HSVToColor(math.Rand(0, 360), .8, 1)
|
||||
self.vel = VectorRand()
|
||||
self.i = 0
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
--[[self:SetPos(self.ent:GetAttachment(self.ent:LookupAttachment("zipline")).Pos)
|
||||
self:SetRenderBoundsWS(self:GetPos(),self.endPoint)]]
|
||||
self:SetPos(self:GetPos() + self.vel)
|
||||
self.i = self.i + 1
|
||||
if self.i > 100 then return false end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
local wow = Material("pillsprites/wow.png")
|
||||
|
||||
function EFFECT:Render()
|
||||
--[[cam.Start3D2D(self:GetPos(),LocalPlayer():EyeAngles()+Angle(90,0,0),1)
|
||||
/*surface.SetFont("CloseCaption_Bold")
|
||||
surface.SetTextColor(HSVToColor(math.Rand(0,360),1,.5))
|
||||
surface.SetTextPos(100,100)
|
||||
surface.GetTextSize(32)
|
||||
surface.DrawText("wow")
|
||||
draw.SimpleText("Oh No!", "CloseCaption_Bold", 0, 0, Color(255,255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
draw.DrawText("TEXT", "CloseCaption_Bold", 1, 1, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER)
|
||||
cam.End3D2D()]]
|
||||
cam.Start3D(EyePos(), EyeAngles())
|
||||
render.SetMaterial(wow)
|
||||
render.DrawSprite(self:GetPos(), 20, 10, self.color)
|
||||
cam.End3D()
|
||||
end
|
||||
Reference in New Issue
Block a user