1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-07 12:57:57 +00:00

fixed distance computation in 3D fieldquotient

This commit is contained in:
Zeno Rogue
2020-03-21 10:14:54 +01:00
parent 7096d152be
commit e70915de9d
3 changed files with 14 additions and 3 deletions

View File

@@ -1313,6 +1313,15 @@ int hk =
EX purehookset on_geometry_change;
EX int field_celldistance(cell *c1, cell *c2) {
if(geometry != gFieldQuotient) return DISTANCE_UNKNOWN;
if(GOLDBERG) return DISTANCE_UNKNOWN;
auto v1 =fieldpattern::fieldval(c1);
auto v2 =fieldpattern::fieldval(c2);
int d = currfp.getdist(v1, v2);
return d;
}
EX }
#define currfp fieldpattern::getcurrfp()