diff options
| author | Alexander Pickering <Apickx@cogarr.org> | 2016-01-08 00:31:35 -0500 |
|---|---|---|
| committer | Alexander Pickering <Apickx@cogarr.org> | 2016-01-08 00:31:35 -0500 |
| commit | a4d3a0f6509ff0b1f1811a9e34f55526b01a3db6 (patch) | |
| tree | bfd40c00fa4547982cb08a54d9bdd7a540d3e187 /gamemode/itemsystem/items/researchtable.lua | |
| parent | 790e96ffa5cb5e9eb3c44f6ede09612bafda2239 (diff) | |
| parent | 02ffa95e931d0a1968593da29b93bedcfc280799 (diff) | |
| download | wintersurvival2-a4d3a0f6509ff0b1f1811a9e34f55526b01a3db6.tar.gz wintersurvival2-a4d3a0f6509ff0b1f1811a9e34f55526b01a3db6.tar.bz2 wintersurvival2-a4d3a0f6509ff0b1f1811a9e34f55526b01a3db6.zip | |
Updated queue to ai overhaul
Diffstat (limited to 'gamemode/itemsystem/items/researchtable.lua')
| -rw-r--r-- | gamemode/itemsystem/items/researchtable.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gamemode/itemsystem/items/researchtable.lua b/gamemode/itemsystem/items/researchtable.lua index 8c5c9e5..25c8201 100644 --- a/gamemode/itemsystem/items/researchtable.lua +++ b/gamemode/itemsystem/items/researchtable.lua @@ -1,6 +1,6 @@ ITEM.Name = "Research Table"
ITEM.Class = "structure"
-ITEM.Desc = "A table that gives hints every 30 seconds to nearby players"
+ITEM.Desc = "A table to find recepies\nHold down shift to snap"
ITEM.Model = "models/props_junk/wood_crate001a.mdl"
ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png")
ITEM.Recipe = {
@@ -40,8 +40,16 @@ 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 Aim = 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)
+ Aim.yaw = Aim.yaw - (Aim.yaw%15)
+ end
+ drop:SetAngles(Aim)
+ drop:SetPos(Pos)
drop:Spawn()
drop:Activate()
|
