diff --git a/rogueviz/ads/control.cpp b/rogueviz/ads/control.cpp index e8421c3d..23648288 100644 --- a/rogueviz/ads/control.cpp +++ b/rogueviz/ads/control.cpp @@ -186,6 +186,7 @@ bool ads_turn(int idelta) { shipstate ss; ss.at = ads_inverse(current * vctrV) * spin((ang+90)*degree); ss.ang = ang; + ss.current = current; ss.start = ship_pt; ss.duration = pt; ss.vctrV = vctrV; diff --git a/rogueviz/ads/ds-game.cpp b/rogueviz/ads/ds-game.cpp index e0a1d076..bbd851aa 100644 --- a/rogueviz/ads/ds-game.cpp +++ b/rogueviz/ads/ds-game.cpp @@ -377,13 +377,14 @@ bool ds_turn(int idelta) { ss.at.T = inverse(current.T) * spin(ang*degree); ss.at.shift = current.shift; ss.start = ship_pt; + ss.current = current; ss.duration = pt; ss.ang = ang; history.emplace_back(ss); } current.T = lorentz(3, 2, -tc) * current.T; - + auto& mshift = main_rock->pt_main.shift; if(mshift) { current.shift += mshift; @@ -619,16 +620,15 @@ void ds_record() { view_pt = (ticks / full) * DS_(simspeed); for(auto& ss: history) if(ss.start + ss.duration > view_pt) { + current = ss.current; if(sphere) { dynamicval g(geometry, gSpace435); - current.shift = ss.at.shift; - current.T = inverse(ss.at.T * spin(-ss.ang*degree)); + current.T = inverse(ss.at.T * spin(-(ss.ang+90)*degree)); current.T = lorentz(3, 2, view_pt - ss.start) * current.T; } else PIA({ - current = ads_inverse(ss.at * spin(-ss.ang*degree)); - vctr = ss.vctr; - vctrV = ss.vctrV; + vctr = new_vctr = ss.vctr; + vctrV = new_vctrV = ss.vctrV; current.T = cspin(3, 2, view_pt - ss.start) * current.T; if(auto_rotate) current.T = cspin(1, 0, view_pt - ss.start) * current.T; diff --git a/rogueviz/ads/map.cpp b/rogueviz/ads/map.cpp index 4e1194b6..a16b2c1e 100644 --- a/rogueviz/ads/map.cpp +++ b/rogueviz/ads/map.cpp @@ -33,6 +33,7 @@ int gen_expire() { struct shipstate { ads_matrix at; + ads_matrix current; ld start; ld duration; ld ang;