MapMagic 2 Terrace Generator Node Not Working (Fix Included).

Steps to reproduce:

  1. Create a template MapMagic 2 graph.
  2. Add a terrace generator node between "noise" and "erosion" generator nodes

Expected result: The resulting terrain to be terraced

Actual result: Flat terrain on some tiles, no effect on others.

mm2_terrace_bug

Problem: The Native Plugin definition of the Terrace method in MatrixNativeExtensions.cs is missing the terraceCount parameter.

Fix: The definition at line 149 of MatrixNativeExtensions.cs can be modified to include this parameter as such:

public static extern void Terrace(this Matrix thisMatrix, float[] terraces, int terraceCount, float steepness, float intensity);

The function call at Line 496 of MatrixModifiers.cs must also be modified accordingly:

dst.Terrace(terraceLevels, terraceLevels.Length, steepness, intensity);

Fixed Result: The image below shows the terrace generator working as intended by this fix:

mm2_terrace_bug_fixed