This commit is contained in:
Darsu 2023-04-25 16:23:05 +07:00
commit c396fac6c0
6 changed files with 12 additions and 5 deletions

View File

@ -1,5 +1,5 @@
local defaulttracemat = Material("arc9/laser1")
local defaultflaremat = Material("arc9/laser_glow", "mips smooth")
local defaulttracemat = Material("arc9/laser2")
local defaultflaremat = Material("sprites/light_glow02_add", "mips smooth")
local lasercolorred = Color(255, 0, 0)
local lasercolor200 = Color(200, 200, 200)
@ -10,7 +10,7 @@ function SWEP:DrawLaser(pos, dir, atttbl, behav)
local flaremat = atttbl.LaserFlareMat or defaultflaremat
local lasermat = atttbl.LaserTraceMat or defaulttracemat
local dist = 1000
local dist = 5000
local tr = util.TraceLine({
start = pos,
@ -21,7 +21,7 @@ function SWEP:DrawLaser(pos, dir, atttbl, behav)
if tr.StartSolid then return end
local width = math.Rand(0.1, 0.2) * strength
local width = math.Rand(0.1, 0.5) * strength
local hit = tr.Hit
local hitpos = tr.HitPos
@ -38,7 +38,7 @@ function SWEP:DrawLaser(pos, dir, atttbl, behav)
if !behav then
render.SetMaterial(lasermat)
render.DrawBeam(pos, laspos, width * 0.3, 0, fraction, lasercolor200)
render.DrawBeam(pos, laspos, width * 0.2, 0, fraction, lasercolor200)
render.DrawBeam(pos, laspos, width, 0, fraction, color)
end

View File

@ -0,0 +1,7 @@
"UnlitGeneric"
{
"$basetexture" "arc9/laser2"
"$additive" 1
"$translucent" 1
"$vertexcolor" 1
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.