Added: allow set userId for offmesh connections

This commit is contained in:
Семенов Иван 2024-10-25 14:51:31 +03:00
parent 53aac60713
commit 4a1b430ee6
2 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ namespace DotRecast.Recast.Toolset.Geom
option.offMeshConDir[i] = offMeshCon.bidir ? 1 : 0;
option.offMeshConAreas[i] = offMeshCon.area;
option.offMeshConFlags[i] = offMeshCon.flags;
// option.offMeshConUserID[i] = offMeshCon.userId;
option.offMeshConUserID[i] = offMeshCon.userId;
}
}
}

View File

@ -33,7 +33,7 @@ namespace DotRecast.Recast.Geom
public readonly int flags;
public readonly int userId;
public RcOffMeshConnection(RcVec3f start, RcVec3f end, float radius, bool bidir, int area, int flags)
public RcOffMeshConnection(RcVec3f start, RcVec3f end, float radius, bool bidir, int area, int flags, int userId = 0)
{
verts = new float[6];
verts[0] = start.X;
@ -46,6 +46,7 @@ namespace DotRecast.Recast.Geom
this.bidir = bidir;
this.area = area;
this.flags = flags;
this.userId = userId;
}
}
}