Skip to content

Commit

Permalink
Fixed a bug in opening the F11 menu
Browse files Browse the repository at this point in the history
and activated saving of the sight range in GMP mode
  • Loading branch information
Sabr0sa committed Jun 3, 2021
1 parent 7c5d790 commit 7609312
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions D3D11Engine/GothicAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,10 @@ void GothicAPI::LoadRendererWorldSettings( GothicRendererSettings& s ) {
GetPrivateProfileIntA( "Atmoshpere", "FogColorModB", (int)(s.FogColorMod.z * 255.0f), ini.c_str() )
);

if ( !GMPModeActive ) {
s.VisualFXDrawRadius = GetPrivateProfileFloatA( "General", "VisualFXDrawRadius", s.VisualFXDrawRadius, ini.c_str() );
s.OutdoorVobDrawRadius = GetPrivateProfileFloatA( "General", "OutdoorVobDrawRadius", s.OutdoorVobDrawRadius, ini.c_str() );
s.OutdoorSmallVobDrawRadius = GetPrivateProfileFloatA( "General", "OutdoorSmallVobDrawRadius", s.OutdoorSmallVobDrawRadius, ini.c_str() );
s.SectionDrawRadius = GetPrivateProfileFloatA( "General", "SectionDrawRadius", s.SectionDrawRadius, ini.c_str() );
}
s.VisualFXDrawRadius = GetPrivateProfileFloatA( "General", "VisualFXDrawRadius", s.VisualFXDrawRadius, ini.c_str() );
s.OutdoorVobDrawRadius = GetPrivateProfileFloatA( "General", "OutdoorVobDrawRadius", s.OutdoorVobDrawRadius, ini.c_str() );
s.OutdoorSmallVobDrawRadius = GetPrivateProfileFloatA( "General", "OutdoorSmallVobDrawRadius", s.OutdoorSmallVobDrawRadius, ini.c_str() );
s.SectionDrawRadius = GetPrivateProfileFloatA( "General", "SectionDrawRadius", s.SectionDrawRadius, ini.c_str() );

s.ReplaceSunDirection = GetPrivateProfileBoolA( "Atmoshpere", "ReplaceSunDirection", s.ReplaceSunDirection, ini );

Expand Down Expand Up @@ -2481,7 +2479,7 @@ LRESULT GothicAPI::OnWindowMessage( HWND hWnd, UINT msg, WPARAM wParam, LPARAM l
Engine::GraphicsEngine->OnKeyDown( wParam );
switch ( wParam ) {
case VK_F11:
if ( GetAsyncKeyState( VK_CONTROL ) && !GMPModeActive ) {
if ( GetAsyncKeyState( VK_CONTROL ) & 0x8000 && !GMPModeActive ) {
Engine::AntTweakBar->SetActive( !Engine::AntTweakBar->GetActive() );
SetEnableGothicInput( !Engine::AntTweakBar->GetActive() );
} else {
Expand Down

0 comments on commit 7609312

Please sign in to comment.