Fix player position on scaled maps
This commit is contained in:
parent
b4acab145e
commit
fcb6de872c
@ -66,8 +66,6 @@ end
|
||||
local function generate_map(data, x, y, w, h, player_x, player_y, detail, map_scale, is_visible, get_marker, user)
|
||||
local str = "";
|
||||
local noise = PerlinNoiseMap(MAP_NOISE, { x=w + 1, y=h + 1, z=1}):get_2d_map({ x=x, y=y});
|
||||
player_x = math.floor(player_x / map_scale + 0.5);
|
||||
player_y = math.floor(player_y / map_scale + 0.5);
|
||||
|
||||
for i = x,x + w,1 do
|
||||
local fx = (i - x) * TILE_OFFSET;
|
||||
|
Loading…
Reference in New Issue
Block a user