mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
fixed virtualRebase for Nil
This commit is contained in:
parent
fcad5d3f34
commit
f355006b2b
@ -287,6 +287,23 @@ void virtualRebase_cell(cell*& base, T& at, const U& check) {
|
|||||||
template<class T, class U>
|
template<class T, class U>
|
||||||
void virtualRebase(cell*& base, T& at, const U& check) {
|
void virtualRebase(cell*& base, T& at, const U& check) {
|
||||||
|
|
||||||
|
if(nil) {
|
||||||
|
hyperpoint h = check(at);
|
||||||
|
auto step = [&] (int i) {
|
||||||
|
at = currentmap->iadj(base, i) * at;
|
||||||
|
base = base->cmove(i);
|
||||||
|
h = check(at);
|
||||||
|
};
|
||||||
|
|
||||||
|
while(h[1] < -0.5) step(1);
|
||||||
|
while(h[1] >= 0.5) step(4);
|
||||||
|
while(h[0] < -0.5) step(0);
|
||||||
|
while(h[0] >= 0.5) step(3);
|
||||||
|
while(h[2] < -0.5) step(2);
|
||||||
|
while(h[2] >= 0.5) step(5);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(prod) {
|
if(prod) {
|
||||||
auto d = product_decompose(check(at)).first;
|
auto d = product_decompose(check(at)).first;
|
||||||
while(d > cgi.plevel / 2) {
|
while(d > cgi.plevel / 2) {
|
||||||
|
Loading…
Reference in New Issue
Block a user