diff options
| author | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2016-01-07 21:30:10 -0500 |
|---|---|---|
| committer | Alexander Pickering <Alexander.Pickering@anondomain.site90.net> | 2016-01-07 21:30:10 -0500 |
| commit | 43a6f971730a8441b47a44008a023e5af8cdb91c (patch) | |
| tree | afa57b2b3f0740f96037431863962c15a865b26c /gamemode/itemsystem/items/tent.lua | |
| parent | 12e7fff3321b4f0c827ddd3bb8dca7f8a58c6fc2 (diff) | |
| parent | 2de3779c361160a956f3da2c8e8a97b6af5d0783 (diff) | |
| download | wintersurvival2-43a6f971730a8441b47a44008a023e5af8cdb91c.tar.gz wintersurvival2-43a6f971730a8441b47a44008a023e5af8cdb91c.tar.bz2 wintersurvival2-43a6f971730a8441b47a44008a023e5af8cdb91c.zip | |
Fix for research table also snapping
Diffstat (limited to 'gamemode/itemsystem/items/tent.lua')
| -rw-r--r-- | gamemode/itemsystem/items/tent.lua | 8 |
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
|
