mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
intra:: fixed mirroring
This commit is contained in:
parent
ed88c6dfbb
commit
b3fc40a8fc
@ -128,7 +128,6 @@ EX portal_data make_portal(cellwalker cw, int spin) {
|
||||
if(MDIM == 3) for(int i=0; i<4; i++) id.iT[3][i] = id.iT[i][3] = i==3;
|
||||
int first = spin;
|
||||
int second = spin + 1;
|
||||
if(in_s2xe() || sphere) swap(first, second);
|
||||
first = gmod(first, isize(fac));
|
||||
second = gmod(second, isize(fac));
|
||||
id.co0 = id.to_poco(fac[first]);
|
||||
@ -193,6 +192,12 @@ void connect_portal_1(cellwalker cw1, cellwalker cw2, int spin) {
|
||||
if(debugflags & DF_GEOM) for(int i=0; i<4; i++)
|
||||
println(hlog, "mapping ", get_column(T1, i), " to ", get_column(T2, i));
|
||||
p.T = T2 * inverse(T1);
|
||||
|
||||
if(det(p.T) < 0) {
|
||||
set_column(T2, 0, p.id2.co1);
|
||||
set_column(T2, 1, p.id2.co0);
|
||||
p.T = T2 * inverse(T1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user