more clever goto

This commit is contained in:
p.kosyh 2010-07-04 15:43:39 +00:00
parent 63b57bc036
commit 11b4769cb3
2 changed files with 5 additions and 2 deletions

View file

@ -143,7 +143,7 @@ go = stead.hook(go, function(f, ...)
end
if r == nil and PLAYER_MOVED and v == nil then
if cctx() then
cctx().txt = true --hack to cancel game.act
cctx().action = true
else
r = true
end

View file

@ -79,7 +79,7 @@ end
function callpush(v, ...)
stead.call_top = stead.call_top + 1;
stead.cctx[stead.call_top] = { txt = nil, self = v };
stead.cctx[stead.call_top] = { txt = nil, self = v, action = false };
args = arg
arg1 = arg[1]
arg2 = arg[2]
@ -697,6 +697,9 @@ function call(v, n, ...)
a = stead.pget()
b = nil
end
if a == nil and b == nil and cctx().action then
a = true
end
callpop()
return a,b
end