mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-14 01:14:48 +00:00
fixed incorrectly shown error in hybrid get_shift
This commit is contained in:
parent
9335df9b28
commit
d34031454c
@ -1380,13 +1380,14 @@ EX namespace hybrid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(candidates.size() == 2 && candidates[0] != candidates[1]) {
|
if(candidates.size() == 2 && candidates[0] != candidates[1]) {
|
||||||
if(!quotient) println(hlog, "two candidates in shift : ", candidates);
|
bool over_closed = in_underlying([] { return quotient || sphere || closed_manifold; });
|
||||||
|
if(!over_closed) println(hlog, "two candidates in shift : ", candidates);
|
||||||
int val = candidates[0] - candidates[1];
|
int val = candidates[0] - candidates[1];
|
||||||
int old_disc_quotient = disc_quotient;
|
int old_disc_quotient = disc_quotient;
|
||||||
if(disc_quotient == 0) disc_quotient = val;
|
if(disc_quotient == 0) disc_quotient = val;
|
||||||
disc_quotient = gcd(val, disc_quotient);
|
disc_quotient = gcd(val, disc_quotient);
|
||||||
if(disc_quotient < 0) disc_quotient = -disc_quotient;
|
if(disc_quotient < 0) disc_quotient = -disc_quotient;
|
||||||
if(old_disc_quotient != disc_quotient && !in_underlying([] { return quotient || sphere; }))
|
if(old_disc_quotient != disc_quotient && !over_closed)
|
||||||
addMessage(XLAT("ERROR: failed to solve the twist values, the map will be incorrect", its(disc_quotient)));
|
addMessage(XLAT("ERROR: failed to solve the twist values, the map will be incorrect", its(disc_quotient)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user