Skip to content
Snippets Groups Projects
Commit 31886600 authored by dg's avatar dg
Browse files

New archery hooks

git-svn-id: http://svn.net-core.org/repos/t-engine4@5645 51575b47-30f0-44d4-a5cc-537603b46e54
parent 81b4868a
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,9 @@ function _M:archeryAcquireTargets(tg, params)
ammo.combat.shots_left = ammo.combat.shots_left - 1
end
if a then
local hd = {"Combat:archeryAcquire", tg=tg, params=params, weapon=weapon, ammo=a}
if self:triggerHook(hd) then hitted = hd.hitted end
targets = {{x=x, y=y, ammo=a.combat}}
end
else
......@@ -85,7 +88,11 @@ function _M:archeryAcquireTargets(tg, params)
else break
end
end
if a then targets[#targets+1] = {x=tx, y=ty, ammo=a.combat}
if a then
local hd = {"Combat:archeryAcquire", tg=tg, params=params, weapon=weapon, ammo=a}
if self:triggerHook(hd) then hitted = hd.hitted end
targets[#targets+1] = {x=tx, y=ty, ammo=a.combat}
else break end
end
end)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment