mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 20:29:17 +00:00
fixed some bugs with ultra mirrors
This commit is contained in:
parent
384a6bb806
commit
91338d047e
7
fake.cpp
7
fake.cpp
@ -254,8 +254,6 @@ EX ld compute_around(bool setup) {
|
|||||||
h2 = gpushxto0(u) * h2;
|
h2 = gpushxto0(u) * h2;
|
||||||
u = gpushxto0(u) * u;
|
u = gpushxto0(u) * u;
|
||||||
|
|
||||||
reg3::compute_ultra();
|
|
||||||
|
|
||||||
ld x = hypot(h2[1], h2[2]);
|
ld x = hypot(h2[1], h2[2]);
|
||||||
ld y = h2[0];
|
ld y = h2[0];
|
||||||
return 360 / (90 + atan(y/x) / degree);
|
return 360 / (90 + atan(y/x) / degree);
|
||||||
@ -279,6 +277,7 @@ EX void generate() {
|
|||||||
cgi.spins[b] = ucgi.spins[b];
|
cgi.spins[b] = ucgi.spins[b];
|
||||||
|
|
||||||
compute_around(true);
|
compute_around(true);
|
||||||
|
reg3::compute_ultra();
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_middle() {
|
int get_middle() {
|
||||||
@ -371,8 +370,6 @@ void set_gfake(ld _around) {
|
|||||||
compute_scale();
|
compute_scale();
|
||||||
check_cgi();
|
check_cgi();
|
||||||
|
|
||||||
auto& u = underlying_cgip;
|
|
||||||
|
|
||||||
ginf[gFake].xcode = no_code;
|
ginf[gFake].xcode = no_code;
|
||||||
|
|
||||||
if(currentmap) new hrmap_fake(currentmap);
|
if(currentmap) new hrmap_fake(currentmap);
|
||||||
@ -399,7 +396,7 @@ EX void change_around() {
|
|||||||
|
|
||||||
println(hlog, "scale = ", t, " -> ", scale, " range = ", range);
|
println(hlog, "scale = ", t, " -> ", scale, " range = ", range);
|
||||||
t = scale / t;
|
t = scale / t;
|
||||||
println(hlog, "t = ", t, " h distance = ", hypot_d(3, h));
|
// println(hlog, "t = ", t, " h distance = ", hypot_d(3, h), " for ", h);
|
||||||
h *= t;
|
h *= t;
|
||||||
View = rgpushxto0(direct_exp(h)) * T;
|
View = rgpushxto0(direct_exp(h)) * T;
|
||||||
playermoved = false;
|
playermoved = false;
|
||||||
|
@ -955,6 +955,7 @@ EX string cgi_string() {
|
|||||||
if(euclid) V("E", fts(fake::scale));
|
if(euclid) V("E", fts(fake::scale));
|
||||||
if(sphere) V("S", fts(fake::scale));
|
if(sphere) V("S", fts(fake::scale));
|
||||||
V("G", FPIU(cgi_string()));
|
V("G", FPIU(cgi_string()));
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(GOLDBERG) V("GP", its(gp::param.first) + "," + its(gp::param.second));
|
if(GOLDBERG) V("GP", its(gp::param.first) + "," + its(gp::param.second));
|
||||||
|
3
reg3.cpp
3
reg3.cpp
@ -74,7 +74,8 @@ EX namespace reg3 {
|
|||||||
c = normalize(c);
|
c = normalize(c);
|
||||||
cgi.ultra_mirror_dist = hdist0(c);
|
cgi.ultra_mirror_dist = hdist0(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cgi.ultra_mirrors.clear();
|
||||||
if(cgflags & qULTRA) for(auto v: cgi.vertices_only)
|
if(cgflags & qULTRA) for(auto v: cgi.vertices_only)
|
||||||
cgi.ultra_mirrors.push_back(rspintox(v) * xpush(cgi.ultra_mirror_dist*2) * MirrorX * spintox(v));
|
cgi.ultra_mirrors.push_back(rspintox(v) * xpush(cgi.ultra_mirror_dist*2) * MirrorX * spintox(v));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user