1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Do not let monsters or treasures spawn near already placed monsters.

This commit is contained in:
DjWarmonger
2014-07-09 22:09:06 +02:00
parent 6c0a396094
commit 966873181f
3 changed files with 22 additions and 5 deletions

View File

@@ -259,7 +259,7 @@ void CMapGenerator::createConnections()
if (guardPos.valid())
{
setOccupied (guardPos, ETileType::FREE); //just in case monster is too weak to spawn
zoneA->addMonster (this, guardPos, connection.getGuardStrength());
zoneA->addMonster (this, guardPos, connection.getGuardStrength(), false);
//zones can make paths only in their own area
zoneA->crunchPath (this, guardPos, posA, zoneA->getId(), zoneA->getFreePaths()); //make connection towards our zone center
zoneB->crunchPath (this, guardPos, posB, zoneB->getId(), zoneB->getFreePaths()); //make connection towards other zone center