mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Finally placing objects sparsely.
This commit is contained in:
parent
930fa21d38
commit
2220786d0c
@ -1082,7 +1082,8 @@ bool CRmgTemplateZone::createRequiredObjects(CMapGenerator* gen)
|
||||
|
||||
void CRmgTemplateZone::createTreasures(CMapGenerator* gen)
|
||||
{
|
||||
const double minDistance = std::max<float>(20.f / sqrt(totalDensity), 2);
|
||||
//this is squared distance for optimization purposes
|
||||
const double minDistance = std::max<float>(200.f / totalDensity, 4);
|
||||
//distance lower than 2 causes objects to overlap and crash
|
||||
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user