mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
40
lua/stormfox2/functions/sh_vfire.lua
Normal file
40
lua/stormfox2/functions/sh_vfire.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
--[[
|
||||
| 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)
|
||||
Reference in New Issue
Block a user