Merge pull request #206 from arthurgeron/master

Fixed players not being able to phase when stuck inside a object
This commit is contained in:
William Moodhe 2019-04-11 20:11:54 -04:00 committed by GitHub
commit e3f3285ede
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3295,7 +3295,7 @@ function GM:KeyPress(pl, key)
else
local plvel = pl:GetVelocity()
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:SetBarricadeGhosting(true)
else