fix(client): rare rope glitch.

Sometimes the rope wouldn't attach to the nozzle when grabbed form the pump.
This commit is contained in:
Andyyy7666
2022-08-20 19:46:11 +02:00
committed by GitHub
parent 1bc545379e
commit 36c10cffa5

View File

@@ -132,7 +132,7 @@ function grabNozzleFromPump()
while not RopeAreTexturesLoaded() do
Wait(0)
end
RopeLoadTextures()
RopeLoadTextures()
while not pump do
Wait(0)
end
@@ -141,6 +141,7 @@ function grabNozzleFromPump()
Wait(0)
end
ActivatePhysics(rope)
Wait(50)
local nozzlePos = GetEntityCoords(nozzle)
nozzlePos = GetOffsetFromEntityInWorldCoords(nozzle, 0.0, -0.033, -0.195)
AttachEntitiesToRope(rope, pumpHandle, nozzle, pump.x, pump.y, pump.z + 1.45, nozzlePos.x, nozzlePos.y, nozzlePos.z, 5.0, false, false, nil, nil)