1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix water generation, try to improve decoration level a bit

This commit is contained in:
Ivan Savenko 2023-12-22 18:35:38 +02:00
parent 9b40271ab1
commit 8916ae7bcd
2 changed files with 2 additions and 2 deletions

View File

@ -292,7 +292,7 @@ void CDrawTerrainOperation::updateTerrainViews()
if(pattern.decoration)
{
if (gen->nextInt(100) > decorationsPercentage)
if (pattern.mapping.size() < 2 || gen->nextInt(100) > decorationsPercentage)
mapping = pattern.mapping[0];
else
mapping = pattern.mapping[1];

View File

@ -47,7 +47,7 @@ RmgMap::RmgMap(const CMapGenOptions& mapGenOptions) :
int RmgMap::getDecorationsPercentage() const
{
return 10; // arbitrary value to generate more readable map
return 15; // arbitrary value to generate more readable map
}
void RmgMap::foreach_neighbour(const int3 & pos, const std::function<void(int3 & pos)> & foo) const