mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-17 10:44:48 +00:00
fixed a crash problem with tes files in 2.5D
This commit is contained in:
parent
dbf9b2b325
commit
f29f908e05
@ -1277,7 +1277,7 @@ EX transmatrix get_adj(arbi_tiling& c, int t, int dl, int t1, int xdl) {
|
||||
println(hlog, "s1 = ", kz(spintox(rm*vr)), " s2 = ", kz(rspintox(xrm*xvr)));
|
||||
println(hlog, tie(t, dl), " = ", kz(Res));
|
||||
println(hlog, hdist(vl, Res * xvr), " # ", hdist(vr, Res * xvl));
|
||||
exit(3);
|
||||
throw hr_exception("error in arb::get_adj");
|
||||
}
|
||||
|
||||
return Res;
|
||||
@ -1952,12 +1952,17 @@ EX pair<ld, ld> rep_ideal(ld e, ld u IS(1)) {
|
||||
return {len, 90 * degree - (gamma - beta)};
|
||||
}
|
||||
|
||||
#if MAXMDIM >= 4
|
||||
auto hooksw = addHook(hooks_swapdim, 100, [] {
|
||||
EX void swap_vertices() {
|
||||
for(auto& p: {¤t, &slided})
|
||||
for(auto& s: p->shapes)
|
||||
for(auto& v: s.vertices)
|
||||
swapmatrix(v);
|
||||
}
|
||||
|
||||
#if MAXMDIM >= 4
|
||||
auto hooksw = addHook(hooks_swapdim, 100, [] {
|
||||
println(hlog, "swapmatrix called for vertices");
|
||||
swap_vertices();
|
||||
for(auto& p: altmap) for(auto& pp: p.second) swapmatrix(pp.second);
|
||||
for(auto& p: arbi_matrix) swapmatrix(p.second.second);
|
||||
});
|
||||
|
7
sky.cpp
7
sky.cpp
@ -518,6 +518,8 @@ EX void make_air() {
|
||||
dynamicval<int> i(vrhr::state, 0);
|
||||
#endif
|
||||
|
||||
bool missing = false;
|
||||
|
||||
if(1) {
|
||||
//shot::take("airtest.png", drawqueue);
|
||||
dynamicval<videopar> v(vid, vid);
|
||||
@ -545,8 +547,10 @@ EX void make_air() {
|
||||
pmodel = mdDisk;
|
||||
|
||||
vid.always3 = false;
|
||||
geom3::apply_always3();
|
||||
geom3::apply_always3();
|
||||
check_cgi();
|
||||
missing = !(cgi.state & 2);
|
||||
if(missing) arb::swap_vertices();
|
||||
cgi.require_shapes();
|
||||
|
||||
eGeometry orig = geometry;
|
||||
@ -595,6 +599,7 @@ EX void make_air() {
|
||||
|
||||
GLERR("after draw");
|
||||
geom3::apply_always3();
|
||||
if(missing) arb::swap_vertices();
|
||||
check_cgi();
|
||||
calcparam();
|
||||
GLERR("after make_air");
|
||||
|
Loading…
Reference in New Issue
Block a user