Merged lp:~widelands-dev/widelands/terrain_affinity_as_int:
Fix desyncs caused by floating point arithmetic
- Floating point arithmetic can become inconsistent across platforms/compilers/hardware
- Upscale terrain affinity constants to turn them into ints
- Upscale the result of the affinity calculation and then use std::floor to cut it off at
largely reduced precision for consistent rounding behavior. This should fix inconsistencies
with double rounding and rounding direction.
- Catch a possible division by 0.