aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/tent.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/items/tent.lua')
-rw-r--r--gamemode/itemsystem/items/tent.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/gamemode/itemsystem/items/tent.lua b/gamemode/itemsystem/items/tent.lua
index 1d5a1b5..2c65eca 100644
--- a/gamemode/itemsystem/items/tent.lua
+++ b/gamemode/itemsystem/items/tent.lua
@@ -1,7 +1,7 @@
ITEM.Name = "Tent"
ITEM.Class = "structure"
-ITEM.Desc = "Something to duck under."
+ITEM.Desc = "Something to duck under.\nHold down shift to snap"
ITEM.Model = "models/props_debris/wood_board07a.mdl"
ITEM.Icon = Material("settlement/icon_tent")
ITEM.Recipe = {
@@ -50,6 +50,12 @@ function ITEM:OnPrimary(pl,tr)
if (tr.Hit) then
local Ang = Angle(0,pl:GetAimVector():Angle().y+90,0)
local Pos = tr.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)
+ Ang.yaw = Ang.yaw - (Ang.yaw%15)
+ end
for k,v in pairs(self.Ghost) do
local Off = v.Pos*1