From 9c13ad1eeb576ec0e9a2c96038232bc037ff3418 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 8 Feb 2015 21:20:49 +0000 Subject: [PATCH] Prevented being able to crouch jump through barricades The player stops moving on the first instance of ghosting. --- .../zombiesurvival/gamemode/obj_player_extend.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gamemodes/zombiesurvival/gamemode/obj_player_extend.lua b/gamemodes/zombiesurvival/gamemode/obj_player_extend.lua index 058788d..5e9495c 100644 --- a/gamemodes/zombiesurvival/gamemode/obj_player_extend.lua +++ b/gamemodes/zombiesurvival/gamemode/obj_player_extend.lua @@ -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