mirror of
https://github.com/etlegacy/etlegacy-lua-scripts.git
synced 2024-11-10 07:22:07 +00:00
v0.2 : no need to snap muzzle point anymore
This commit is contained in:
parent
492738d54a
commit
7369668988
1 changed files with 1 additions and 6 deletions
|
@ -19,7 +19,7 @@
|
|||
]]--
|
||||
|
||||
local modname = "medic-syringe-heal"
|
||||
local version = "0.1"
|
||||
local version = "0.2"
|
||||
|
||||
-- local constants
|
||||
|
||||
|
@ -65,10 +65,6 @@ function toAngleVectors(angles)
|
|||
return forward, right, up
|
||||
end
|
||||
|
||||
function snapVector(v)
|
||||
return { math.tointeger(v[1]), math.tointeger(v[2]), math.tointeger(v[3]) }
|
||||
end
|
||||
|
||||
function multAddVector(v, s, b)
|
||||
return { v[1] + b[1] * s, v[2] + b[2] * s, v[3] + b[3] * s }
|
||||
end
|
||||
|
@ -89,7 +85,6 @@ end
|
|||
function calcMuzzlePoint(base, viewHeight, leanValue, right)
|
||||
local muzzlePoint = copyVector(base)
|
||||
muzzlePoint[3] = muzzlePoint[3] + viewHeight
|
||||
muzzlePoint = snapVector(addLean(right, leanValue, muzzlePoint))
|
||||
return muzzlePoint
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue