add sborka
This commit is contained in:
49
garrysmod/addons/sania/lua/autorun/mur_drone_fx.lua
Normal file
49
garrysmod/addons/sania/lua/autorun/mur_drone_fx.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
if CLIENT then
|
||||
|
||||
function DrawHeavySignalNoise(strength)
|
||||
if not strength then return end
|
||||
if strength > 0.9 then return end
|
||||
|
||||
local sw, sh = ScrW(), ScrH()
|
||||
|
||||
local noiseCount = (1 - strength) * 400
|
||||
for i = 1, noiseCount do
|
||||
surface.SetDrawColor(255, 255, 255, math.random(10, 60))
|
||||
surface.DrawRect(math.random(0, sw), math.random(0, sh), 1, 1)
|
||||
end
|
||||
|
||||
local lineCount = (1 - strength) * 60
|
||||
for i = 1, lineCount do
|
||||
local y = math.random(0, sh)
|
||||
local w = math.random(sw * 0.2, sw)
|
||||
local x = math.random(0, sw - w)
|
||||
surface.SetDrawColor(255, 255, 255, math.random(20, 80))
|
||||
surface.DrawRect(x, y, w, math.random(1, 3))
|
||||
end
|
||||
|
||||
if strength < 0.4 then
|
||||
local shift = math.random(-8, 8) * (1 - strength)
|
||||
surface.SetDrawColor(255, 255, 255, 40)
|
||||
surface.DrawRect(shift, 0, sw, sh)
|
||||
end
|
||||
|
||||
if strength < 0.3 then
|
||||
for i = 1, 10 do
|
||||
local x = math.random(0, sw)
|
||||
surface.SetDrawColor(255, 255, 255, math.random(30, 80))
|
||||
surface.DrawRect(x, 0, math.random(2, 6), sh)
|
||||
end
|
||||
end
|
||||
|
||||
if strength < 0.2 then
|
||||
local shake = (0.2 - strength) * 6
|
||||
surface.SetDrawColor(255, 255, 255, 25)
|
||||
surface.DrawRect(
|
||||
math.random(-shake, shake),
|
||||
math.random(-shake, shake),
|
||||
sw, sh
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user