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

Fix saving while controlling a summon/golem

git-svn-id: http://svn.net-core.org/repos/t-engine4@3899 51575b47-30f0-44d4-a5cc-537603b46e54
parent f92efd81
No related branches found
No related tags found
No related merge requests found
......@@ -431,7 +431,7 @@ function _M:moveFocus(v)
local cnt = 0
id = util.boundWrap((id or 1) + v, 1, #self.uis)
while start ~= id and cnt <= #self.uis do
if self.uis[id].ui.can_focus then
if self.uis[id] and self.uis[id].ui and self.uis[id].ui.can_focus then
self:setFocus(id)
break
end
......
......@@ -1484,7 +1484,12 @@ function _M:saveGame()
-- savefile_pipe is created as a global by the engine
savefile_pipe:push(self.save_name, "game", self)
world:saveWorld()
if not self.creating_player then game.player:saveUUID() end
if not self.creating_player then
local oldplayer = self.player
self.party:setPlayer(self:getPlayer(true), true)
self.player:saveUUID()
self.party:setPlayer(oldplayer, true)
end
self.log("Saving game...")
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