aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/alter.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/items/alter.lua')
-rw-r--r--gamemode/itemsystem/items/alter.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/gamemode/itemsystem/items/alter.lua b/gamemode/itemsystem/items/alter.lua
index b60d30b..891f15c 100644
--- a/gamemode/itemsystem/items/alter.lua
+++ b/gamemode/itemsystem/items/alter.lua
@@ -1,7 +1,7 @@
ITEM.Name = "Alter"
ITEM.Class = "structure"
-ITEM.Desc = "This allows you to sacrifice your soul for a player."
+ITEM.Desc = "This allows you to sacrifice your soul for a player.\nHold down shift to snap"
ITEM.Model = "models/props_c17/gravestone003a.mdl"
ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_crow.png")
ITEM.Recipe = {
@@ -51,13 +51,16 @@ function ITEM:OnPrimary(pl,tr)
if (tr.Hit) then
local drop = ents.Create("ws_alter")
- 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(Angle(0,Aim,0))
drop:SetPos(Pos)
drop:Spawn()
drop:Activate()