1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-04 00:52:33 +00:00

door loop sounds fix

This commit is contained in:
Moon Horse
2025-01-05 19:34:56 +03:00
parent 9ef57da851
commit 4d785d9def
4 changed files with 4 additions and 4 deletions

View File

@@ -1452,7 +1452,7 @@ function ENT:Think()
local id,sid = st..(i+1),"door"..i.."x"..k
local state = self:GetPackedRatio(id)
local prevstate = self.DSprev[i+1][k+1]
if (prevstate ~= state) then
if math.abs(prevstate - state) > 0.01 then
self.DoorLoopStates[id] = math.Clamp((self.DoorLoopStates[id] or 0) + 2*self.DeltaTime,0,1)
self.DoorDelta[i+1][k+1] = 0.0
else