mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-09 18:23:00 +00:00
error checking in hrmap_inverse::relative_matrixc
This commit is contained in:
@@ -1226,8 +1226,10 @@ EX namespace gp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
transmatrix relative_matrixc(cell *c2, cell *c1, const hyperpoint& hint) override {
|
transmatrix relative_matrixc(cell *c2, cell *c1, const hyperpoint& hint) override {
|
||||||
c1 = mapping[c1];
|
if(!mapping.count(c1)) { rate_limited_error("c1 is bad", lalign(0, " c1 = ", c1)); return Id; }
|
||||||
c2 = mapping[c2];
|
if(!mapping.count(c2)) { rate_limited_error("c2 is bad", lalign(0, " c2 = ", c2)); return Id; }
|
||||||
|
c1 = mapping.at(c1);
|
||||||
|
c2 = mapping.at(c2);
|
||||||
return in_underlying([&] { return currentmap->relative_matrix(c2, c1, hint); });
|
return in_underlying([&] { return currentmap->relative_matrix(c2, c1, hint); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user