Installera Steam
logga in
|
språk
简体中文 (förenklad kinesiska)
繁體中文 (traditionell kinesiska)
日本語 (japanska)
한국어 (koreanska)
ไทย (thailändska)
Български (bulgariska)
Čeština (tjeckiska)
Dansk (danska)
Deutsch (tyska)
English (engelska)
Español – España (spanska – Spanien)
Español – Latinoamérica (spanska – Latinamerika)
Ελληνικά (grekiska)
Français (franska)
Italiano (italienska)
Bahasa Indonesia (indonesiska)
Magyar (ungerska)
Nederlands (nederländska)
Norsk (norska)
Polski (polska)
Português (portugisiska – Portugal)
Português – Brasil (portugisiska – Brasilien)
Română (rumänska)
Русский (ryska)
Suomi (finska)
Türkçe (turkiska)
Tiếng Việt (vietnamesiska)
Українська (ukrainska)
Rapportera problem med översättningen
I chose 0.05s because in my experience that's small enough that people will regard it as "smooth" but large enough that computers will have plenty of time to do work in it without lagging things up. But I also exposed it as a configuration in case people would want to change it, such as if they don't want a smooth player-speed recovery or if their server is doing a lot of things all the time and would like this to be less of a drain, even though Stopping Power doesn't have much of a performance hit.
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2424087277
I couldn't see any simple way of differentiating between armor damage or HP damage, but hopefully this is close enough.
local lastRecovTick = 0.0
local plys = player.GetAll()
hook.Add("Tick", "StoppingPowerRecovery", function()
if enabled then
local delta = CurTime() - lastRecovTick
if delta >= tickTime then
lastRecovTick = CurTime()
local recov = delta * recovAmt
for _, ply in ipairs(plys) do
if ply:Alive() then
local pRecovTick = ply:GetStopPowerRecoveryTime()
if pRecovTick and lastRecovTick >= pRecovTick then
ply:ChangeStopPowerSlowdownMult(recov, multMin)
end
end
end
end
end
end)
[Stopping Power - Damage slows you down] lua/autorun/sh_stoppower.lua:13: attempt to index global 'Math' (a nil value)
1. fn - lua/autorun/sh_stoppower.lua:13
2. unknown - lua/ulib/shared/hook.lua:109
[Stopping Power - Damage slows you down] lua/autorun/sh_stoppower.lua:13: attempt to index global 'Math' (a nil value)
1. fn - lua/autorun/sh_stoppower.lua:13
2. unknown - lua/ulib/shared/hook.lua:109 (x2)