Skip to content

Commit

Permalink
Save the minimap on a per server basis
Browse files Browse the repository at this point in the history
Co-authored-by: Xagul <eixim@hotmail.com>
  • Loading branch information
diath and Xagul committed Dec 10, 2022
1 parent a3fdf07 commit 5247576
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/game_minimap/minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ function loadMap(clean)
end

if otmm then
local minimapFile = '/minimap.otmm'
local minimapFile = '/minimap_'.. G.host ..'.otmm'
if g_resources.fileExists(minimapFile) then
g_minimap.loadOtmm(minimapFile)
end
else
local minimapFile = '/minimap_' .. clientVersion .. '.otcm'
local minimapFile = '/minimap_' .. clientVersion .. '_'.. G.host ..'.otcm'
if g_resources.fileExists(minimapFile) then
g_map.loadOtcm(minimapFile)
end
Expand All @@ -119,10 +119,10 @@ end
function saveMap()
local clientVersion = g_game.getClientVersion()
if otmm then
local minimapFile = '/minimap.otmm'
local minimapFile = '/minimap_'.. G.host ..'.otmm'
g_minimap.saveOtmm(minimapFile)
else
local minimapFile = '/minimap_' .. clientVersion .. '.otcm'
local minimapFile = '/minimap_' .. clientVersion .. '_'.. G.host ..'.otcm'
g_map.saveOtcm(minimapFile)
end
minimapWidget:save()
Expand Down

0 comments on commit 5247576

Please sign in to comment.