Prevented being able to crouch jump through barricades

The player stops moving on the first instance of ghosting.
This commit is contained in:
Ben 2015-02-08 21:20:49 +00:00
parent 6b4a310373
commit 9c13ad1eeb

View file

@ -421,8 +421,14 @@ function meta:ShouldBarricadeGhostWith(ent)
end
function meta:BarricadeGhostingThink()
if self:KeyDown(IN_ZOOM) or self:ActiveBarricadeGhosting() then return end
if self:KeyDown(IN_ZOOM) or self:ActiveBarricadeGhosting() then
if self.FirstGhostThink then
self:SetLocalVelocity( Vector( 0, 0, 0 ) )
self.FirstGhostThink = false
end
return
end
self.FirstGhostThink = true
self:SetBarricadeGhosting(false)
end