Skip to content

Commit

Permalink
Fixed few mistakes and warnings in the code (#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Herman Semenov authored Dec 17, 2022
1 parent 9513101 commit 7d4ee56
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
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

0 comments on commit 7d4ee56

Please sign in to comment.