HomeWildfire Games

RangeManager: Grid for 2D array, enum cleanups.

Description

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

Event Timeline

vladislavbelov raised a concern with this commit.Aug 9 2020, 11:35 AM
vladislavbelov added a subscriber: vladislavbelov.
vladislavbelov added inline comments.
/ps/trunk/source/simulation2/components/CCmpRangeManager.cpp
2168

The behavior was incorrectly changed. Before that change when you m_LosPlayerCounts.clear() and m_LosPlayerCounts[player_id].reset() you get empty vector counts and initialize it correctly, even after resize. Now m_LosPlayerCounts[player_id].reset() doesn't reset its size, only set values to zeroes.

This commit now has outstanding concerns.Aug 9 2020, 11:35 AM
This commit no longer requires audit.Dec 5 2020, 5:27 PM