mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
40 lines
1.2 KiB
Lua
40 lines
1.2 KiB
Lua
--[[
|
|
| 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/
|
|
--]]
|
|
|
|
--[[-------------------------------------------------------------------------
|
|
vFire support :D
|
|
---------------------------------------------------------------------------]]
|
|
|
|
local vFireList = {}
|
|
hook.Add("vFireOnCalculateWind","vFire - StormFox Handshake",function(vFireEnt)
|
|
local outside = StormFox2.Wind.IsEntityInWind(vFireEnt)
|
|
if outside then
|
|
vFireList[vFireEnt] = true
|
|
return StormFox2.Wind.GetVector() / 20
|
|
end
|
|
end)
|
|
if CLIENT then return end
|
|
local ran = math.random
|
|
timer.Create("vFire - StormFox Rain",2,0,function()
|
|
local r = StormFox2.Weather.GetRainAmount()
|
|
if r <= 0 then table.Empty(vFireList) return end
|
|
for ent,_ in pairs(vFireList) do
|
|
if IsValid(ent) then
|
|
ent:SoftExtinguish(r * ran(130,160))
|
|
end
|
|
end
|
|
table.Empty(vFireList)
|
|
end)
|
|
|
|
timer.Simple(2,function()
|
|
if not vFireInstalled then return end
|
|
StormFox2.Msg("Gee, vFire, what do you want to do tonight?")
|
|
hook.Call("vFire - StormFox Handeshake")
|
|
end) |