X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Ftilemap.cpp;h=88def18534b3bcb9b8a34c4678a4c9d872122f57;hb=555d1b7bebb45326d82d934e07463209837309b0;hp=d24cacab97a4a346383757066d6ec3383f20b837;hpb=b4b8af638ac4ed8dbe0f081b453f568f585899de;p=supertux.git diff --git a/src/object/tilemap.cpp b/src/object/tilemap.cpp index d24cacab9..88def1853 100644 --- a/src/object/tilemap.cpp +++ b/src/object/tilemap.cpp @@ -182,7 +182,8 @@ TileMap::draw(DrawingContext& context) float trans_x = roundf(context.get_translation().x); float trans_y = roundf(context.get_translation().y); - context.set_translation(Vector(trans_x * speed_x, trans_y * speed_y)); + context.set_translation(Vector(int(trans_x * speed_x), + int(trans_y * speed_y))); /** if we don't round here, we'll have a 1 pixel gap on screen sometimes. * I have no idea why */