click module fix

This commit is contained in:
p.kosyh 2010-06-09 10:19:11 +00:00
parent c2d87cc593
commit 28a82c3574

View file

@ -7,7 +7,13 @@ end
game.action = hook(game.action, game.action = hook(game.action,
function(f, s, cmd, x, y, ...) function(f, s, cmd, x, y, ...)
if cmd == 'click' then if cmd == 'click' then
return call(here(), 'click', x, y); if here().click then
return call(here(), 'click', x, y, unpack(arg));
end
if game.click then
return call(game, 'click', x, y, unpack(arg));
end
return nil,true
end end
if f then return f(s, cmd, x, y, unpack(arg)) end if f then return f(s, cmd, x, y, unpack(arg)) end
end) end)