The issue where part of the view hides hopelessly behind the shortcut bar is still present. Here's the exact cause of the bug :
- When the map is too big to fit on the screen, the game will selects how far the view can scroll (horizontally and vertically) by allowing around 150 pixles worth of extra margin outside the level.
- When the map is too small to fit on the screen, the game will force center the view constantly.
The bug happens when the map is too small to fit on the screen, yet too big to fit if you counted the margin too!
Repro step : just play full screen with the 32x32 tile size and visit most small dungeons in 1680x1050 or 1920x1080 like alt Crystal Caves or the Trapped map before the merchant.
[1.4.9] Map display hides behind toolbars
Moderator: Moderator
Re: [1.4.9] Map display hides behind toolbars
I've seen this same issue- I've noticed it the most in regular maze floor 2, where it's not unusual for me to see the backup guardian appear offscreen where I can't scroll the camera to, and Kraltor's (name?) shop in orcs campaign, where the training dummies can also frequently spawn off screen.
Re: [1.4.9] Map display hides behind toolbars
Basically, in game/engines/default/engine/Map.lua the function checkMapViewBounded() forgets to take into account the padding in some situations.
Replace
with
Replace
Code: Select all
--- Checks the map is bound to the screen (no "empty space" if the map is big enough)
function _M:checkMapViewBounded()
if self.mx < - self.viewport_padding_4 then self.mx = - self.viewport_padding_4 self.changed = true end
if self.my < - self.viewport_padding_8 then self.my = - self.viewport_padding_8 self.changed = true end
if self.mx > self.w - self.viewport.mwidth + self.viewport_padding_6 then self.mx = self.w - self.viewport.mwidth + self.viewport_padding_6 self.changed = true end
if self.my > self.h - self.viewport.mheight + self.viewport_padding_2 then self.my = self.h - self.viewport.mheight + self.viewport_padding_2 self.changed = true end
-- Center if smaller than map viewport
local centered = false
if self.w < self.viewport.mwidth then self.mx = math.floor((self.w - self.viewport.mwidth) / 2) centered = true self.changed = true end
if self.h < self.viewport.mheight then self.my = math.floor((self.h - self.viewport.mheight) / 2) centered = true self.changed = true end
-- self._map:setScroll(self.mx, self.my, centered and 0 or self.smooth_scroll)
self._map:setScroll(self.mx, self.my, self.smooth_scroll)
end
Code: Select all
--- Checks the map is bound to the screen (no "empty space" if the map is big enough)
function _M:checkMapViewBounded()
if self.mx < - self.viewport_padding_4 then self.mx = - self.viewport_padding_4 self.changed = true end
if self.my < - self.viewport_padding_8 then self.my = - self.viewport_padding_8 self.changed = true end
if self.mx > self.w - self.viewport.mwidth + self.viewport_padding_6 then self.mx = self.w - self.viewport.mwidth + self.viewport_padding_6 self.changed = true end
if self.my > self.h - self.viewport.mheight + self.viewport_padding_2 then self.my = self.h - self.viewport.mheight + self.viewport_padding_2 self.changed = true end
-- Center if smaller than map viewport
local centered = false
if self.w + self.viewport_padding_4 + self.viewport_padding_6 < self.viewport.mwidth then self.mx = math.floor((self.w - self.viewport.mwidth) / 2) centered = true self.changed = true end
if self.h + self.viewport_padding_8 + self.viewport_padding_2 < self.viewport.mheight then self.my = math.floor((self.h - self.viewport.mheight) / 2) centered = true self.changed = true end
-- self._map:setScroll(self.mx, self.my, centered and 0 or self.smooth_scroll)
self._map:setScroll(self.mx, self.my, self.smooth_scroll)
end
Re: [1.4.9] Map display hides behind toolbars
Oh my this is some great bugreport
Fixed thanks !

[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
