mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-17 11:38:05 +00:00
cleaned up findbaseAround
This commit is contained in:
@@ -128,9 +128,9 @@ cell *findbaseAround(hyperpoint p, cell *around, int maxsteps) {
|
|||||||
for(int i=0; i<around->type; i++) {
|
for(int i=0; i<around->type; i++) {
|
||||||
cell *c2 = around->move(i);
|
cell *c2 = around->move(i);
|
||||||
if(c2) {
|
if(c2) {
|
||||||
transmatrix U = fake::in() ? T * currentmap->adj(around, i) : ggmatrix(c2);
|
transmatrix U = ggmatrix(c2);
|
||||||
horo_distance d1(p, U);
|
horo_distance d1(p, U);
|
||||||
if(d1 < d0) { best = c2; d0 = d1; T = U; }
|
if(d1 < d0) { best = c2; d0 = d1; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(best == around) break;
|
if(best == around) break;
|
||||||
|
|||||||
Reference in New Issue
Block a user