@@ -348,7 +348,6 @@ void CEnvironment::on_tool_frame()
348
348
ImGui::EndMenuBar ();
349
349
}
350
350
351
- auto & current = CurrentEnv;
352
351
float time_factor = g_pGameLevel ? g_pGameLevel->GetEnvironmentTimeFactor () : fTimeFactor ;
353
352
354
353
if (ImGui::CollapsingHeader (" Environment time" , ImGuiTreeNodeFlags_DefaultOpen))
@@ -403,7 +402,7 @@ void CEnvironment::on_tool_frame()
403
402
}
404
403
// ImGui::SameLine();
405
404
if (ConfigStyleSelector (" Weather config style" , CurrentWeather->soc_style ))
406
- current .soc_style = CurrentWeather->soc_style ;
405
+ CurrentEnv .soc_style = CurrentWeather->soc_style ;
407
406
408
407
ImGui::TableNextColumn ();
409
408
if (ImGui::BeginCombo (" Effect" , IsWFXPlaying () ? CurrentWeatherName.c_str () : " " ))
@@ -427,7 +426,7 @@ void CEnvironment::on_tool_frame()
427
426
// ImGui::SameLine();
428
427
ImGui::BeginDisabled (!IsWFXPlaying ());
429
428
if (ConfigStyleSelector (" Effect config style" , CurrentWeather->soc_style ))
430
- current .soc_style = CurrentWeather->soc_style ;
429
+ CurrentEnv .soc_style = CurrentWeather->soc_style ;
431
430
ImGui::EndDisabled ();
432
431
ImGui::EndTable ();
433
432
}
@@ -447,22 +446,22 @@ void CEnvironment::on_tool_frame()
447
446
448
447
ImGui::TableNextColumn ();
449
448
u32 hours, minutes, seconds;
450
- SplitTime (current .exec_time , hours, minutes, seconds);
449
+ SplitTime (CurrentEnv .exec_time , hours, minutes, seconds);
451
450
452
451
string128 temp;
453
452
xr_sprintf (temp, " %02d:%02d:%02d###frame_time" , hours, minutes, seconds);
454
453
455
- const float current0_time = Current[0 ] ? Current[0 ]->exec_time : current .exec_time ;
456
- const float current1_time = Current[1 ] ? Current[1 ]->exec_time : current .exec_time ;
454
+ const float current0_time = Current[0 ] ? Current[0 ]->exec_time : CurrentEnv .exec_time ;
455
+ const float current1_time = Current[1 ] ? Current[1 ]->exec_time : CurrentEnv .exec_time ;
457
456
458
457
ImGui::BeginDisabled (!Current[0 ] || !Current[1 ]);
459
- if (ImGui::SliderFloat (temp, ¤t .exec_time ,
458
+ if (ImGui::SliderFloat (temp, &CurrentEnv .exec_time ,
460
459
current0_time, current1_time, " " , ImGuiSliderFlags_NoInput))
461
460
{
462
461
// Invalidate();
463
462
if (g_pGameLevel)
464
- g_pGameLevel->SetEnvironmentGameTimeFactor (iFloor (current .exec_time * 1000 .f ), time_factor);
465
- SetGameTime (current .exec_time , time_factor);
463
+ g_pGameLevel->SetEnvironmentGameTimeFactor (iFloor (CurrentEnv .exec_time * 1000 .f ), time_factor);
464
+ SetGameTime (CurrentEnv .exec_time , time_factor);
466
465
lerp ();
467
466
}
468
467
ImGui::EndDisabled ();
@@ -487,7 +486,7 @@ void CEnvironment::on_tool_frame()
487
486
ImGui::Text (" Please, load a level or select time frame manually." );
488
487
489
488
ImGui::TableNextColumn ();
490
- current .ed_show_params (*this );
489
+ CurrentEnv .ed_show_params (*this );
491
490
492
491
ImGui::TableNextColumn ();
493
492
if (Current[1 ])
0 commit comments