aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/researchtable.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/items/researchtable.lua')
-rw-r--r--gamemode/itemsystem/items/researchtable.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/gamemode/itemsystem/items/researchtable.lua b/gamemode/itemsystem/items/researchtable.lua
index 4b05cf2..b347828 100644
--- a/gamemode/itemsystem/items/researchtable.lua
+++ b/gamemode/itemsystem/items/researchtable.lua
@@ -41,7 +41,13 @@ function ITEM:OnPrimary(pl,tr)
if (tr.Hit) then
local drop = ents.Create("ws_researchtable")
drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0))
- drop:SetPos(tr.HitPos)
+ local Pos = tr.HitPos
+ if(GM:KeyPress(pl,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
+ drop:SetPos(Pos)
drop:Spawn()
drop:Activate()