1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-21 12:43:18 +00:00

3d:: fixed Euclidean celldistance (abs was missing)

This commit is contained in:
? 2019-02-27 17:58:58 +01:00 committed by Zeno Rogue
parent be56844dcc
commit 38ded28511

View File

@ -569,7 +569,7 @@ namespace euclid3 {
int celldistance(cell *c1, cell *c2) {
auto cm = cubemap();
coord a = cm->ispacemap[c1->master] - cm->ispacemap[c2->master];
return getcoord(a, 0) + getcoord(a, 1) + getcoord(a, 2);
return abs(getcoord(a, 0)) + abs(getcoord(a, 1)) + abs(getcoord(a, 2));
}
}