diff options
author | Jens Rottmann <30634967+JRottm@users.noreply.github.com> | 2017-08-05 01:42:39 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2017-08-05 12:38:11 +0200 |
commit | 248a1a8d65c483edcab328d898cc570071d6a182 (patch) | |
tree | 64a491330e6d1b5fb1afe7935899376466db77cf /po/sr_Cyrl | |
parent | 0c893ea1232c96f43d6934bdce8f954ae05b1203 (diff) | |
download | minetest-248a1a8d65c483edcab328d898cc570071d6a182.tar.gz minetest-248a1a8d65c483edcab328d898cc570071d6a182.tar.bz2 minetest-248a1a8d65c483edcab328d898cc570071d6a182.zip |
Add tiny Y offset in collisionMoveSimple() to tweak performance
Another small general problem: the player is always standing exactly on the
bondary between 2 nodes e.g. Y=1.5 is exactly between nodes Y=1 and Y=2.
floatToInt() and myround() will round +/-n.5 always 'outwards' to +/-(n+1),
which means they behave differently depending on where you are: they round
upwards above sea level and downwards when underground. This inconsistency
comes from the way the coordinates are calculated, independent of the
specific C++ code.
The result is a tiny bit of lost performance when moving underground,
because 1 node level more than necessary is checked for collisions. This can
be amended by adding a tiny offset to minpos_f.Y, like @paramat suggested.
This is not an elegant solution, but still better than wasting CPU.
Diffstat (limited to 'po/sr_Cyrl')
0 files changed, 0 insertions, 0 deletions