From 698b6eedf1d6d2806c77895775bcf8245ce02229 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 4 Jan 2016 13:26:04 -0500 Subject: Added building snap --- gamemode/shared/player_ghost.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gamemode/shared/player_ghost.lua') diff --git a/gamemode/shared/player_ghost.lua b/gamemode/shared/player_ghost.lua index ef61422..d2eade8 100644 --- a/gamemode/shared/player_ghost.lua +++ b/gamemode/shared/player_ghost.lua @@ -54,6 +54,11 @@ else local CanP = pl:CanPlaceStructure(Pos) Pos = Pos.HitPos + if(pl:KeyDown(IN_SPEED)) then + Pos.x = Pos.x - (Pos.x%20) + Pos.y = Pos.y - (Pos.y%20) + Pos.z = Pos.z - (Pos.z%20) + end for k,v in pairs(pl.GhostItem.Ghost) do local OffPos = v.Pos*1 -- cgit v1.2.3-70-g09d2