mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user