# HG changeset patch # User Simon Cross # Date 1673721210 -3600 # Node ID 03c0f1f5488cdcbff507b74d7cb1ad194668ea49 # Parent 0a2cc2ee16c24aff5058bc9956f9c04d9eedf275 Use integer division when calculating tile position. diff -r 0a2cc2ee16c2 -r 03c0f1f5488c mamba/widgets/level.py --- a/mamba/widgets/level.py Sat Jan 14 19:04:47 2023 +0100 +++ b/mamba/widgets/level.py Sat Jan 14 19:33:30 2023 +0100 @@ -125,7 +125,7 @@ self.drawing = False def convert_pos(self, pos): - return (pos[0] / TILE_SIZE[0], pos[1] / TILE_SIZE[1]) + return (pos[0] // TILE_SIZE[0], pos[1] // TILE_SIZE[1]) def update_tile(self, tile_pos): """Update the tile at the current mouse position"""