Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed few mistakes and warnings in the code #1142

Merged
merged 9 commits into from
Dec 17, 2022
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_GL/gl_rendertarget_phase_combine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ void CRenderTarget::phase_combine()

// PP enabled ?
// Render to RT texture to be able to copy RT even in windowed mode.
BOOL PP_Complex = u_need_PP() | (BOOL)RImplementation.m_bMakeAsyncSS;
BOOL PP_Complex = u_need_PP() || (BOOL)RImplementation.m_bMakeAsyncSS;
if (_menu_pp)
PP_Complex = FALSE;

Expand Down
2 changes: 0 additions & 2 deletions src/Layers/xrRenderPC_GL/r2_R_sun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ void XRMatrixOrthoOffCenterLH(Fmatrix* pout, float l, float r, float b, float t,
void XRMatrixInverse(Fmatrix* pout, float* pdeterminant, const Fmatrix& pm)
{
glm::mat4 out = glm::inverse(glm::make_mat4x4(&pm.m[0][0]));

*pout = *(Fmatrix*)glm::value_ptr(out);
return;
}

//////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Actor_Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ bool CActor::net_Relevant() // relevant for export to server
{
if (OnServer())
{
return getSVU() | getLocal();
return getSVU() || getLocal();
}
else
{
Expand Down
3 changes: 3 additions & 0 deletions src/xrGame/movement_manager_level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ void CMovementManager::process_level_path()

if (!m_build_at_once)
break;

[[fallthrough]];
}
case ePathStateContinueLevelPath:
{
level_path().select_intermediate_vertex();

m_path_state = ePathStateBuildDetailPath;
[[fallthrough]];
}
case ePathStateBuildDetailPath:
{
Expand Down
2 changes: 2 additions & 0 deletions src/xrGame/movement_manager_patrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void CMovementManager::process_patrol_path()
}

m_path_state = ePathStateBuildLevelPath;
[[fallthrough]];
}
case ePathStateBuildLevelPath:
{
Expand All @@ -64,6 +65,7 @@ void CMovementManager::process_patrol_path()
level_path().select_intermediate_vertex();

m_path_state = ePathStateBuildDetailPath;
[[fallthrough]];
}
case ePathStateBuildDetailPath:
{
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIMapList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void CUIMapList::LoadMapList()
{
const auto& weathers = gMapListHelper.GetGameWeathers();
u32 cnt = 0;
if (m_pWeatherSelector->GetSize() > 0);
if (m_pWeatherSelector->GetSize() > 0)
m_pWeatherSelector->ClearList();
for (const MPWeatherDesc& weather : weathers)
AddWeather(weather.Name, weather.StartTime, cnt++);
Expand Down