From f6708f5d938620912ee7002c1431e9a0fc95ba5f Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Sun, 11 Jul 2010 10:20:04 +0000
Subject: [PATCH] dlg fixes, fading fixes
---
stead/gui.lua | 3 ++-
stead/stead.lua | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/stead/gui.lua b/stead/gui.lua
index 0425992..79caff6 100644
--- a/stead/gui.lua
+++ b/stead/gui.lua
@@ -187,7 +187,9 @@ stead.fmt = fmt
game.fading = function(s)
local rc = false
+ local p = call(here(), 'pic');
if stead.cmd == 'load' then
+ game.lastpic = p;
return true
end
if not stead.state then --only for states!!!
@@ -196,7 +198,6 @@ game.fading = function(s)
if game._time == 1 then -- first cmd
return true
end
- local p = call(here(), 'pic');
if PLAYER_MOVED or game.lastpic ~= p then
rc = true
end
diff --git a/stead/stead.lua b/stead/stead.lua
index 303c7c4..622d71e 100644
--- a/stead/stead.lua
+++ b/stead/stead.lua
@@ -973,6 +973,8 @@ function phrase_action(self)
-- here it is
ph:disable(); -- /* disable it!!! */
+ local last = call(ph, 'ans');
+
if type(ph.do_act) == 'string' then
local f = loadstring(ph.do_act);
if f ~= nil then
@@ -983,7 +985,9 @@ function phrase_action(self)
elseif type(ph.do_act) == 'function' then
ret = ph.do_act(self);
end
- local last = call(ph, 'ans');
+
+ if ret == nil then ret = stead.pget(); end
+
if last == true or ret == true then
r = true;
end