X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fterrain.cpp;h=ccfd912a2fd65e5e1048aa5c14b759fe7382bc3c;hb=3ffe8b384fabeee1c3e636b83dd0006f3f5acfe1;hp=002a536581a6201698baa2e45ab2870b8cd42cb3;hpb=9969895eea7f12d43333f81ad10234dd2208b4ef;p=r2c2.git diff --git a/source/libr2c2/terrain.cpp b/source/libr2c2/terrain.cpp index 002a536..ccfd912 100644 --- a/source/libr2c2/terrain.cpp +++ b/source/libr2c2/terrain.cpp @@ -39,7 +39,7 @@ void Terrain::set_position(const Vector &p) { position = p; float eg = type.get_elevation_granularity(); - position.z = int(position.z/eg+0.5)*eg; + position.z = round(position.z/eg)*eg; signal_moved.emit(); }