aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/itemsystem/weapons_common.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/shared/itemsystem/weapons_common.lua')
-rw-r--r--gamemode/shared/itemsystem/weapons_common.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/gamemode/shared/itemsystem/weapons_common.lua b/gamemode/shared/itemsystem/weapons_common.lua
index 6e73318..a7679a9 100644
--- a/gamemode/shared/itemsystem/weapons_common.lua
+++ b/gamemode/shared/itemsystem/weapons_common.lua
@@ -29,11 +29,19 @@ local positionset = {}
-- @param onhit A function to call on any entities that were hit in the swing of the weapon.
function ART.swingarc(player,times,positions,onhit)
local positionpoints = {}
+ --[[
+ local ea = player:EyeAngles()
+ for k,v in pairs(positions) do
+ print("Position that was at ", positions[k])
+ positions[k].z = positions[k].z * math.sin(ea.pitch+90)
+ print("Is now at",positions[k])
+ end
+ ]]
table.insert(positionset,positionpoints)
local hitents = {}
for k,v in ipairs(times) do
timer.Simple(v,function()
- local weaponpos = positions[k] + player:GetPos()
+ local weaponpos = positions[k] + player:GetPos() + Vector(0,0,64)
table.insert(positionpoints,weaponpos)
if #positionpoints > 1 then
local tr = util.TraceLine({