Fixed players not being able to phase when stuck

This commit is contained in:
Arthur Geron 2019-04-11 13:57:29 -03:00
parent 5457f44c16
commit c701cb5bf2

View file

@ -3295,7 +3295,7 @@ function GM:KeyPress(pl, key)
else else
local plvel = pl:GetVelocity() local plvel = pl:GetVelocity()
if pl:GetPhysicsObject():IsPenetrating() then if pl:GetPhysicsObject():IsPenetrating() then
if plvel == vector_origin then if (plvel.x == 0 and plvel.y == 0 and (plvel.z == -4.5 or plvel.z == 0)) then
pl.LastGhostFailureVelocity = nil pl.LastGhostFailureVelocity = nil
pl:SetBarricadeGhosting(true) pl:SetBarricadeGhosting(true)
else else