Page 1 of 1

[1.6 git alpha] Player not placed on worldmap

Posted: Mon May 14, 2018 3:10 am
by Zizzo
In my initial tests of the 1.6 alpha built from git, I've run into a pretty big problem going to the worldmap: the player is apparently not placed. Sometimes I can get the player onto the map by attempting to move; it's placed in a location entirely unrelated to the exited zone, changing from one game to the next for the same zone. Sometimes I've ended up in the middle of the mountains or the water on the west of the map, with nowhere to go.

On investigation, the offending code appears to be in Game:changeLevelReal(), lines 1198-1208:

Code: Select all

        elseif self.zone.wilderness then
                local x, y = self.player.wild_x, self.player.wild_y
                local blocking_actor = self.level.map(x, y, engine.Map.ACTOR)
                if blocking_actor then
                        -- This is mostly protecting the Angolwen Apprentice from misc stuff like leaving Timepoint Zero
                        local newx, newy = util.findFreeGrid(x, y, 2, true, {[Map.ACTOR]=true})
                        if newx and newy then blocking_actor:move(newx, newy, true)
                        else blocking_actor:teleportRandom(x, y, 10) end
                end
        -- Place the player on the level
        else
which AFAICT does not place the player on the map at all. [sound F/X: git diving] Ah, the relevant lines of code appear to have been removed in commit 5bba250f, "support for temporary zone parties". Odd, but fixable.