aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/campfire.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/items/campfire.lua')
-rw-r--r--gamemode/itemsystem/items/campfire.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/gamemode/itemsystem/items/campfire.lua b/gamemode/itemsystem/items/campfire.lua
index f6ec4e6..4e35932 100644
--- a/gamemode/itemsystem/items/campfire.lua
+++ b/gamemode/itemsystem/items/campfire.lua
@@ -1,7 +1,7 @@
ITEM.Name = "Campfire"
ITEM.Class = "structure"
-ITEM.Desc = "Ready to be lit. Some assembly required."
+ITEM.Desc = "Ready to be lit. Some assembly required.\nHold down shift to snap"
ITEM.Model = "models/props_debris/wood_board07a.mdl"
ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_campfire")
ITEM.Recipe = {
@@ -67,13 +67,16 @@ function ITEM:OnPrimary(pl,tr)
if (tr.Hit and tr.HitWorld) then
local drop = ents.Create("ws_campfire")
- drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0))
+ local Aim = Angle(0,pl:GetAimVector():Angle().y+90,0)
+
local Pos = tr.HitPos
- if(GM:KeyPress(pl,IN_SPEED)) then
+ 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
+ drop:SetAngles(Aim)
drop:SetPos(Pos)
drop:Spawn()
drop:Activate()