Core/MMAPs: Improve NPC behavior with fences and high climbs

Increase the max walkable angle and max walkable climb in MMAPs generator to allow NPCs to jump on fences and climb steps.
This requires MMAPs to be extracted again with mmaps_generator, old extracted MMAPs are still compatible but will not provide the benefits of this commit.
Fixes #9965
This commit is contained in:
jackpoz
2014-04-19 15:35:13 +02:00
parent 574fa30ea6
commit 93a68a66c3
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -553,7 +553,9 @@ namespace MMAP
config.borderSize = config.walkableRadius + 3;
config.maxEdgeLen = VERTEX_PER_TILE + 1; // anything bigger than tileSize
config.walkableHeight = m_bigBaseUnit ? 3 : 6;
config.walkableClimb = m_bigBaseUnit ? 2 : 4; // keep less than walkableHeight
// a value >= 3|6 allows npcs to walk over some fences
// a value >= 4|8 allows npcs to walk over all fences
config.walkableClimb = m_bigBaseUnit ? 4 : 8;
config.minRegionArea = rcSqr(60);
config.mergeRegionArea = rcSqr(50);
config.maxSimplificationError = 1.8f; // eliminates most jagged edges (tiny polygons)
+1 -1
View File
@@ -61,7 +61,7 @@ namespace MMAP
class MapBuilder
{
public:
MapBuilder(float maxWalkableAngle = 55.f,
MapBuilder(float maxWalkableAngle = 70.f,
bool skipLiquid = false,
bool skipContinents = false,
bool skipJunkMaps = true,
+1 -1
View File
@@ -242,7 +242,7 @@ int finish(const char* message, int returnValue)
int main(int argc, char** argv)
{
int threads = 3, mapnum = -1;
float maxAngle = 55.0f;
float maxAngle = 70.0f;
int tileX = -1, tileY = -1;
bool skipLiquid = false,
skipContinents = false,