Skip to content

Missing ref in dtCreateNavMeshData #6

@nikita-one

Description

@nikita-one

Hi. You might want to add by-ref access to dtPoly's and dtPolyDetail's in dtCreateNavMeshData method. Currently you are writing data to stack instead of native memory.

            // Store polygons
            // Mesh polys
            var src = @params->polys;
            for (int i = 0; i < @params->polyCount; ++i)
            {
                ref dtPoly p = ref navPolys[i]; // <-- here and in some other places, you need to use ref or *
                p.vertCount = 0;
                p.flags = @params->polyFlags[i];
                p.setArea(@params->polyAreas[i]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions