1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-20 11:54:48 +00:00

fixed a crash when walking over a hyperbolic digon in Archimedean tiling

This commit is contained in:
Zeno Rogue 2020-07-24 11:43:36 +02:00
parent 4c6500514e
commit dc458ba31a

View File

@ -925,7 +925,13 @@ EX gp::loc pseudocoords(cell *c) {
}
EX cdata *arcmCdata(cell *c) {
heptagon *h2 = arcm::archimedean_gmatrix[c->master].first;
auto &agm = arcm::archimedean_gmatrix;
if(!agm.count(c->master) || !agm[c->master].first) {
forCellEx(c1, c) if(agm.count(c->master) && agm[c->master].first) return arcmCdata(c1);
static cdata dummy;
return &dummy;
}
heptagon *h2 = agm[c->master].first;
dynamicval<eGeometry> g(geometry, gNormal);
dynamicval<hrmap*> cm(currentmap, arcm::current_altmap);
return getHeptagonCdata(h2);