Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2979,6 +2979,12 @@ void PartitionManager::unRegisterGhostObject( GhostObject* object )
*/
void PartitionManager::revealMapForPlayer( Int playerIndex )
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

// By looking and then stopping on every cell, I clear all Passive Shroud
// By adding a looker directly I don't hit the Ally logic of the normal look/doShroudReveal
for (int i = 0; i < m_totalCellCount; ++i)
Expand All @@ -2993,6 +2999,12 @@ void PartitionManager::revealMapForPlayer( Int playerIndex )
*/
void PartitionManager::revealMapForPlayerPermanently( Int playerIndex )
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

// By skipping the removeLooker, I consider myself as actively looking at everything,
// so Shroud generation will no longer function
// By adding a looker directly I don't hit the Ally logic of the normal look/doShroudReveal
Expand All @@ -3007,6 +3019,12 @@ void PartitionManager::revealMapForPlayerPermanently( Int playerIndex )
*/
void PartitionManager::undoRevealMapForPlayerPermanently( Int playerIndex )
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

//First make sure no lingering looks will leave holes when they aren't wanted.
processEntirePendingUndoShroudRevealQueue();

Expand All @@ -3023,6 +3041,12 @@ void PartitionManager::undoRevealMapForPlayerPermanently( Int playerIndex )
*/
void PartitionManager::shroudMapForPlayer( Int playerIndex )
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

//First make sure no lingering looks will leave holes when they aren't wanted.
processEntirePendingUndoShroudRevealQueue();

Expand All @@ -3037,6 +3061,12 @@ void PartitionManager::shroudMapForPlayer( Int playerIndex )
//-----------------------------------------------------------------------------
void PartitionManager::refreshShroudForLocalPlayer()
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

// This is a drawing refresh only, and so is allowed to use the Local Player.
TheDisplay->clearShroud();
TheRadar->clearShroud();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2986,6 +2986,12 @@ void PartitionManager::unRegisterGhostObject( GhostObject* object )
*/
void PartitionManager::revealMapForPlayer( Int playerIndex )
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

// By looking and then stopping on every cell, I clear all Passive Shroud
// By adding a looker directly I don't hit the Ally logic of the normal look/doShroudReveal
for (int i = 0; i < m_totalCellCount; ++i)
Expand All @@ -3000,6 +3006,12 @@ void PartitionManager::revealMapForPlayer( Int playerIndex )
*/
void PartitionManager::revealMapForPlayerPermanently( Int playerIndex )
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

// By skipping the removeLooker, I consider myself as actively looking at everything,
// so Shroud generation will no longer function
// By adding a looker directly I don't hit the Ally logic of the normal look/doShroudReveal
Expand All @@ -3014,6 +3026,12 @@ void PartitionManager::revealMapForPlayerPermanently( Int playerIndex )
*/
void PartitionManager::undoRevealMapForPlayerPermanently( Int playerIndex )
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

//First make sure no lingering looks will leave holes when they aren't wanted.
processEntirePendingUndoShroudRevealQueue();

Expand All @@ -3030,6 +3048,12 @@ void PartitionManager::undoRevealMapForPlayerPermanently( Int playerIndex )
*/
void PartitionManager::shroudMapForPlayer( Int playerIndex )
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

//First make sure no lingering looks will leave holes when they aren't wanted.
processEntirePendingUndoShroudRevealQueue();

Expand All @@ -3044,6 +3068,12 @@ void PartitionManager::shroudMapForPlayer( Int playerIndex )
//-----------------------------------------------------------------------------
void PartitionManager::refreshShroudForLocalPlayer()
{
// Safety check: ensure partition manager is properly initialized
if (m_cells == NULL || m_totalCellCount <= 0)
{
return;
}

// This is a drawing refresh only, and so is allowed to use the Local Player.
TheDisplay->clearShroud();
TheRadar->clearShroud();
Expand Down
Loading