[1.6 git alpha] Player not placed on worldmap

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2522
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[1.6 git alpha] Player not placed on worldmap

#1 Post 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.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply