check_version is now do require 'goto'

This commit is contained in:
p.kosyh 2010-06-16 10:09:41 +00:00
parent a6b4794e13
commit 40aed624e5
2 changed files with 13 additions and 12 deletions

View file

@ -45,24 +45,23 @@ go = function (self, where, back)
self.where = deref(where);
end
if not back or not isDialog(ref(self.where)) or isDialog(ref(where)) then
v, r = call(ref(where), 'enter', deref(was));
if r == false then
self.where = was;
return par('^^', res, v), ret(r)
end
need_scene = true;
if ref(where) ~= ref(self.where) then -- jump !!!
need_scene = false;
end
v, r = call(ref(where), 'enter', deref(was));
if r == false then
self.where = was;
return par('^^', res, v), ret(r)
end
need_scene = true;
if ref(where) ~= ref(self.where) then -- jump !!!
need_scene = false;
end
res = par('^^',res,v);
if not back then
ref(where).__from__ = deref(was);
end
ret()
if not stead.in_goto_call then
@ -82,7 +81,6 @@ go = function (self, where, back)
res = par('^^',res,v);
end
if need_scene then -- or isForcedsc(ref(where)) then -- i'am not sure...
return par('^^',res,ref(where):scene());
end

View file

@ -2409,6 +2409,9 @@ function check_version(v)
if stead.version < v then
error ([[The game requires instead engine of version ]] ..v.. [[ or higher. http://instead.googlecode.com]])
end
if v >= "1.2.0" then
require ("goto")
end
end
--- here the game begins