1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Hide enemies from the map (with fog) with the difficult skill level

It's the first step for resolving issue #22.
This commit is contained in:
Mathieu Schroeter 2017-09-22 12:18:45 +02:00
parent 18551ced5f
commit 8a9849c27e

View File

@ -533,6 +533,16 @@ CDecor::GenerateMap ()
if (m_blupi[rank].bExist)
{
pos = ConvCelToMap (m_blupi[rank].cel);
if (this->GetSkill () >= 1 && !m_bBuild)
{
auto fogCel = m_blupi[rank].cel;
fogCel.x = (fogCel.x / 4) * 4;
fogCel.y = (fogCel.y / 4) * 4;
if (m_decor[fogCel.x / 2][fogCel.y / 2].fog == FOGHIDE) // hidden?
continue;
}
if (
pos.x >= 0 && pos.x < DIMMAPX - 1 && pos.y >= 0 && pos.y < DIMMAPY - 1)
{