mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
45
lua/effects/lvs_tracer_green.lua
Normal file
45
lua/effects/lvs_tracer_green.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/
|
||||
--]]
|
||||
|
||||
|
||||
EFFECT.MatBeam = Material( "effects/lvs_base/spark" )
|
||||
EFFECT.MatSprite = Material( "sprites/light_glow02_add" )
|
||||
|
||||
function EFFECT:Init( data )
|
||||
local pos = data:GetOrigin()
|
||||
local dir = data:GetNormal()
|
||||
|
||||
self.ID = data:GetMaterialIndex()
|
||||
|
||||
self:SetRenderBoundsWS( pos, pos + dir * 50000 )
|
||||
end
|
||||
|
||||
function EFFECT:Think()
|
||||
if not LVS:GetBullet( self.ID ) then return false end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function EFFECT:Render()
|
||||
local bullet = LVS:GetBullet( self.ID )
|
||||
|
||||
local endpos = bullet:GetPos()
|
||||
local dir = bullet:GetDir()
|
||||
|
||||
local len = 1500 * bullet:GetLength()
|
||||
|
||||
render.SetMaterial( self.MatBeam )
|
||||
|
||||
render.DrawBeam( endpos - dir * len, endpos + dir * len * 0.1, 10, 1, 0, Color( 220, 255, 220, 255 ) )
|
||||
render.DrawBeam( endpos - dir * len * 0.5, endpos + dir * len * 0.1, 5, 1, 0, Color( 255, 255, 0, 255 ) )
|
||||
|
||||
render.SetMaterial( self.MatSprite )
|
||||
render.DrawSprite( endpos, 400, 400, Color( 110, 150, 110, 255 ) )
|
||||
end
|
||||
Reference in New Issue
Block a user