diff --git a/vr.cpp b/vr.cpp index 5bf560b5..d39fcf84 100644 --- a/vr.cpp +++ b/vr.cpp @@ -1041,11 +1041,31 @@ EX void render() { if(1) { make_actual_view(); master_cview = cview(); + + /* unfortunately we need to backup everything that could change by shift_view... */ dynamicval tN(NLP, NLP); dynamicval tV(View, View); dynamicval tC(current_display->which_copy, current_display->which_copy); dynamicval trt(radar_transform); + /* changed in intra */ + dynamicval tcs(camera_speed); + dynamicval tcl(anims::cycle_length); + dynamicval tau(vrhr::absolute_unit_in_meters); + dynamicval tel(walking::eye_level); + dynamicval tfd(walking::floor_dir); + dynamicval tof(walking::on_floor_of); + + int id = intra::current; + cell *co = centerover; + finalizer fin([&] { + if(intra::current != id) { + println(hlog, "rendering via portal"); + intra::switch_to(id); + centerover = co; + } + }); + if(hsm == eHeadset::rotation_only) { transmatrix T = hmd_at; be_33(T);