mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
get_shiftview_of used gpush instead of rgpush; fixed wallradar
This commit is contained in:
parent
db351d9511
commit
ce46243b55
@ -7181,15 +7181,15 @@ EX purehookset hooks_drawmap;
|
||||
EX transmatrix actual_view_transform;
|
||||
|
||||
EX ld wall_radar(cell *c, transmatrix T, transmatrix LPe, ld max) {
|
||||
if(pmodel != mdPerspective || !vid.use_wall_radar) return max;
|
||||
if(!in_perspective() || !vid.use_wall_radar) return max;
|
||||
ld step = max / 20;
|
||||
ld fixed_yshift = 0;
|
||||
for(int i=0; i<20; i++) {
|
||||
T = solmul_pt(T, LPe, zpush(-step));
|
||||
T = solmul_pt(T, LPe, ztangent(-step));
|
||||
virtualRebase(c, T, true);
|
||||
color_t col;
|
||||
if(isWall3(c, col) || (WDIM == 2 && GDIM == 3 && tC0(T)[2] > cgi.FLOOR)) {
|
||||
T = solmul_pt(T, LPe, zpush(step));
|
||||
T = solmul_pt(T, LPe, ztangent(step));
|
||||
step /= 2; i = 17;
|
||||
if(step < 1e-3) break;
|
||||
}
|
||||
|
@ -985,9 +985,9 @@ EX transmatrix solmul_pt(const transmatrix Position, const transmatrix T) {
|
||||
else return Position * T;
|
||||
}
|
||||
|
||||
EX transmatrix solmul_pt(const transmatrix Position, const transmatrix LPe, const transmatrix T) {
|
||||
if(nonisotropic || prod) return nisot::parallel_transport(Position, LPe, tC0(T));
|
||||
else return Position * T;
|
||||
EX transmatrix solmul_pt(const transmatrix Position, const transmatrix LPe, const hyperpoint h) {
|
||||
if(nonisotropic || prod) return nisot::parallel_transport(Position, LPe, h);
|
||||
else return Position * rgpushxto0(direct_exp(h, 100));
|
||||
}
|
||||
|
||||
EX transmatrix spin_towards(const transmatrix Position, const hyperpoint goal, int dir, int back) {
|
||||
|
@ -2089,7 +2089,7 @@ EX transmatrix get_shift_view_of(const hyperpoint H, const transmatrix V) {
|
||||
return rgpushxto0(h) * V;
|
||||
}
|
||||
else if(!nonisotropic) {
|
||||
return gpushxto0(direct_exp(H, 100)) * V;
|
||||
return rgpushxto0(direct_exp(H, 100)) * V;
|
||||
}
|
||||
else if(!nisot::geodesic_movement) {
|
||||
transmatrix IV = inverse(V);
|
||||
|
@ -1193,7 +1193,7 @@ EX namespace nisot {
|
||||
T = push * gtl;
|
||||
}
|
||||
|
||||
EX transmatrix parallel_transport(const transmatrix Position, const transmatrix LPe, hyperpoint h) {
|
||||
EX transmatrix parallel_transport(const transmatrix Position, const transmatrix LPe, const hyperpoint h) {
|
||||
if(prod) {
|
||||
hyperpoint h = product::direct_exp(inverse(LPe) * product::inverse_exp(h));
|
||||
return Position * rgpushxto0(h);
|
||||
|
Loading…
Reference in New Issue
Block a user