diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-10-24 21:52:20 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-10-24 21:52:20 -0400 |
| commit | 78e40d9fd55b6ba23db4f459e2c7e9ae2109cf5a (patch) | |
| tree | 3c87a74fb2c6a792a93c7f242d9e92e478f4f77a /gamemode/shared/itemsystem/weapons_common.lua | |
| parent | 9ae67530dc4be9eaab7b1243330e810d1d5a6fee (diff) | |
| download | artery-78e40d9fd55b6ba23db4f459e2c7e9ae2109cf5a.tar.gz artery-78e40d9fd55b6ba23db4f459e2c7e9ae2109cf5a.tar.bz2 artery-78e40d9fd55b6ba23db4f459e2c7e9ae2109cf5a.zip | |
Allowed items to be dropped
Diffstat (limited to 'gamemode/shared/itemsystem/weapons_common.lua')
| -rw-r--r-- | gamemode/shared/itemsystem/weapons_common.lua | 10 |
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({ |
