mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
Merge branch 'main' of https://github.com/HaodongMo/ARC-9
This commit is contained in:
commit
c396fac6c0
@ -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
|
||||
|
||||
|
7
materials/arc9/laser2.vmt
Normal file
7
materials/arc9/laser2.vmt
Normal 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.
Loading…
Reference in New Issue
Block a user