Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanAizek committed Nov 30, 2022
1 parent 625d794 commit 7bd98b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
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
13 changes: 5 additions & 8 deletions src/xrGame/movement_manager_level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ void CMovementManager::process_level_path()

if (!m_build_at_once)
break;

[[fallthrough]]; // xxx: or break?
}
case ePathStateContinueLevelPath:
{
level_path().select_intermediate_vertex();

m_path_state = ePathStateBuildDetailPath;
[[fallthrough]];
}
case ePathStateBuildDetailPath:
{
Expand All @@ -69,9 +70,7 @@ void CMovementManager::process_level_path()
}
case ePathStatePathVerification:
{
if (!level_path().actual())
m_path_state = ePathStateBuildLevelPath;
else if (!detail().actual())
if (!level_path().actual() || !detail().actual())
m_path_state = ePathStateBuildLevelPath;
else
{
Expand All @@ -86,9 +85,7 @@ void CMovementManager::process_level_path()
}
case ePathStatePathCompleted:
{
if (!level_path().actual())
m_path_state = ePathStateBuildLevelPath;
else if (!detail().actual())
if (!level_path().actual() || !detail().actual())
m_path_state = ePathStateBuildLevelPath;
break;
}
Expand Down
9 changes: 3 additions & 6 deletions src/xrGame/movement_manager_patrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void CMovementManager::process_patrol_path()
break;
}

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

m_path_state = ePathStateBuildDetailPath;
[[fallthrough]];
}
case ePathStateBuildDetailPath:
{
Expand Down Expand Up @@ -91,9 +90,7 @@ void CMovementManager::process_patrol_path()
// Msg ("[%6d][%s] actuality is false 3",Device.dwFrame,*object().cName());
m_path_state = ePathStateSelectPatrolPoint;
}
else if (!level_path().actual())
m_path_state = ePathStateBuildLevelPath;
else if (!detail().actual())
else if (!level_path().actual() || !detail().actual())
m_path_state = ePathStateBuildLevelPath;
else if (detail().completed(object().Position(), !detail().state_patrol_path()))
{
Expand Down

0 comments on commit 7bd98b3

Please sign in to comment.