mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 07:30:26 +00:00
virtualRebase tohex works in Goldberg geometries
This commit is contained in:
parent
1ea9c929b6
commit
1b11f4e5e2
@ -289,6 +289,23 @@ void virtualRebase(cell*& base, T& at, bool tohex, const U& check) {
|
||||
newbase = c;
|
||||
}
|
||||
}
|
||||
if(tohex && GOLDBERG) {
|
||||
while(true) {
|
||||
newbase = NULL;
|
||||
forCellCM(c2, base) {
|
||||
transmatrix V2 = calc_relative_matrix(base, c2, C0);
|
||||
double newz = check(V2 * at) [2];
|
||||
if(newz < currz) {
|
||||
currz = newz;
|
||||
bestV = V2;
|
||||
newbase = c2;
|
||||
}
|
||||
}
|
||||
if(!newbase) break;
|
||||
base = newbase;
|
||||
at = bestV * at;
|
||||
}
|
||||
}
|
||||
if(newbase) {
|
||||
base = newbase;
|
||||
at = bestV * at;
|
||||
|
Loading…
Reference in New Issue
Block a user