mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-20 23:34:08 +00:00
fixed an issue in optimizeview for crystal334
This commit is contained in:
parent
8ebeb60bcb
commit
94857cad86
@ -7291,6 +7291,7 @@ EX void make_actual_view() {
|
|||||||
radar_transform = T * U;
|
radar_transform = T * U;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Viewbase = View;
|
||||||
}
|
}
|
||||||
|
|
||||||
EX transmatrix cview() {
|
EX transmatrix cview() {
|
||||||
@ -7350,6 +7351,8 @@ EX void precise_mouseover() {
|
|||||||
mouseover = omouseover;
|
mouseover = omouseover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX transmatrix Viewbase;
|
||||||
|
|
||||||
EX void drawthemap() {
|
EX void drawthemap() {
|
||||||
check_cgi();
|
check_cgi();
|
||||||
cgi.require_shapes();
|
cgi.require_shapes();
|
||||||
|
14
hypgraph.cpp
14
hypgraph.cpp
@ -1459,6 +1459,20 @@ EX void optimizeview() {
|
|||||||
ld best = INF;
|
ld best = INF;
|
||||||
|
|
||||||
transmatrix TB = Id;
|
transmatrix TB = Id;
|
||||||
|
|
||||||
|
if(WDIM == 3 && (cgflags & qIDEAL)) {
|
||||||
|
if(gmatrix.count(centerover.at)) {
|
||||||
|
ld last = hdist0(tC0(Viewbase));
|
||||||
|
transmatrix V = gmatrix[centerover.at];
|
||||||
|
ld next = hdist0(tC0(V));
|
||||||
|
if(next < last) {
|
||||||
|
View = View * inverse(Viewbase) * V;
|
||||||
|
fixmatrix(View);
|
||||||
|
viewctr.at = centerover.at->master;
|
||||||
|
viewctr.spin = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(false) ;
|
if(false) ;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user