1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-28 11:00:34 +00:00

3d:: fixed a bug in celldistance for Rhombic

This commit is contained in:
Zeno Rogue 2019-04-12 00:18:18 +02:00
parent 7c59f572ca
commit fc06e999c8

View File

@ -701,9 +701,9 @@ namespace euclid3 {
if(S7 == 12) {
int d = v[1] - v[0]; v[1] -= d; v[2] -= d;
dist += d;
int m = min((v[2] - v[0]) / 2, v[0]);
dist += 2 * d;
v[0] -= m; v[1] -= m; v[2] -= m;
int m = min((v[2] - v[0]), v[0]);
dist += 2 * m;
v[0] -= m; v[1] -= m; v[2] -= m * 2;
if(v[0])
dist += (v[0] + v[1] + v[2]) / 2;
else