1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

Berger sphere should now work correctly in subdivided

This commit is contained in:
Zeno Rogue 2023-05-30 18:38:58 +02:00
parent e069a2cd46
commit 20546133c3

View File

@ -79,6 +79,16 @@ EX void make_vertices_only(vector<hyperpoint>& vo, const vector<vector<hyperpoin
} }
EX } EX }
transmatrix sfix_rgpushxto0(hyperpoint h) {
if(stretch::applicable() && !fake::in()) return stretch::translate(h);
return rgpushxto0(h);
};
transmatrix sfix_gpushxto0(hyperpoint h) {
if(stretch::applicable() && !fake::in()) return stretch::itranslate(h);
return gpushxto0(h);
};
#if MAXMDIM >= 4 #if MAXMDIM >= 4
void subcellshape::compute_sub() { void subcellshape::compute_sub() {
hyperpoint gres = Hypc; hyperpoint gres = Hypc;
@ -90,8 +100,8 @@ void subcellshape::compute_sub() {
gres += res; gres += res;
} }
cellcenter = normalize(gres); cellcenter = normalize(gres);
to_cellcenter = rgpushxto0(cellcenter); to_cellcenter = sfix_rgpushxto0(cellcenter);
from_cellcenter = gpushxto0(cellcenter); from_cellcenter = sfix_gpushxto0(cellcenter);
compute_common(); compute_common();
} }