Add public throwing.make_arrow_def

It was removed in b9c78c9, leaving no way for other mods to use
the arrow_step function.
This commit is contained in:
coil 2020-02-18 01:55:48 -05:00
parent edeba9de8b
commit 6571ee4562
No known key found for this signature in database
GPG Key ID: 8D08BD821F21A393
1 changed files with 8 additions and 0 deletions

View File

@ -207,6 +207,14 @@ local function arrow_step(self, dtime)
self.last_pos = pos -- Used by the build arrow
end
function throwing.make_arrow_def(def)
def.timer = 0
def.player = ""
def.on_step = arrow_step
def.data = {}
return def
end
--[[
on_hit(pos, last_pos, node, object, hitter)
Either node or object is nil, depending whether the arrow collided with an object (luaentity or player) or with a node.