When trying to actually start a game, atanks crashes with a segmentation fault, because an illegal index in env.slope is accessed.
The following diff fixes the issue.
There were no "distortions" or anything like that in the landscape afterwards, so there doesn't seem to be a bigger underlying issue.
--- src/land.cpp.old 2021-08-20 11:00:25.605198565 +0200
+++ src/land.cpp 2021-08-20 11:01:44.784199236 +0200
@@ -162,7 +162,7 @@
double maxTop = std::max(depthStrip[0][depth],
depthStrip[1][depth]);
double btdiff = maxTop - minBot;
- double i = (y - bot) / btdiff;
+ double i = (y - bot) / ( (btdiff > 1.) ? btdiff : 1. );
double a1 = RAD2DEG(atan2(depthStrip[0][depth - 1]
- depthStrip[1][depth - 1], 1.0))
+ 180.;
Cheers
Sven
Confirmed. Tested the patch and it's working. Will commit this to the repo.