From: Christian Heller Date: Tue, 15 Dec 2015 00:13:16 +0000 (+0100) Subject: New client: Fix jittery diagonal movement in map. X-Git-Tag: tce~237 X-Git-Url: https://plomlompom.com/repos/?p=plomrogue;a=commitdiff_plain;h=727cc6b9e6419617dd19dbb2573dd5f4c83045b3 New client: Fix jittery diagonal movement in map. --- diff --git a/client_prototype.py b/client_prototype.py index 41693d8..19ac3fd 100644 --- a/client_prototype.py +++ b/client_prototype.py @@ -315,6 +315,8 @@ def win_map(): < world_data["map_size"] * (i + 1) - win_size[i] / 2: offset[i] = world_data["map_center"][i] * (i + 1) \ - int(win_size[i] / 2) + if i == 1: + offset[1] = offset[1] + world_data["map_center"][0] % 2 else: offset[i] = world_data["map_size"] * (i + 1) - win_size[i] + i winmap_size = [world_data["map_size"], world_data["map_size"] * 2 + 1] @@ -325,7 +327,7 @@ def win_map(): for x in range(world_data["map_size"]): char = world_data["fov_map"][y * world_data["map_size"] + x] if world_data["look_mode"] and y == world_data["map_center"][0] \ - and x == world_data["map_center"][1]: + and x == world_data["map_center"][1]: if char == " ": char = \ world_data["mem_map"][y * world_data["map_size"] + x]