RangeManager: Grid for 2D array, enum cleanups.

Range manager has several `std::vector` for fixed-size arrays and 2D
grids. By using proper data structures, the code readability is
improved.
This also moves around the LosVisibility enum.

Comments by: Stan`, nani
Differential Revision: https://code.wildfiregames.com/D2770
This was SVN commit r23769.
This commit is contained in:
wraitii
2020-06-13 09:05:40 +00:00
parent 6f70a901f8
commit 939002f0dc
14 changed files with 453 additions and 313 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ void CCameraController::Update(const float deltaRealTime)
CmpPtr<ICmpPosition> cmpPosition(*(g_Game->GetSimulation2()), m_FollowEntity);
CmpPtr<ICmpRangeManager> cmpRangeManager(*(g_Game->GetSimulation2()), SYSTEM_ENTITY);
if (cmpPosition && cmpPosition->IsInWorld() &&
cmpRangeManager && cmpRangeManager->GetLosVisibility(m_FollowEntity, g_Game->GetViewedPlayerID()) == ICmpRangeManager::VIS_VISIBLE)
cmpRangeManager && cmpRangeManager->GetLosVisibility(m_FollowEntity, g_Game->GetViewedPlayerID()) == LosVisibility::VISIBLE)
{
// Get the most recent interpolated position
float frameOffset = g_Game->GetSimulation2()->GetLastFrameOffset();