@@ -708,8 +708,7 @@ public enum UwTaskTypeEnum
708708 {
709709 None = 0 ,
710710 UnitPathfinding = 1 ,
711- TilesPathfinding = 2 ,
712- ClustersPathfinding = 3 ,
711+ ClustersDistances = 2 ,
713712 }
714713
715714 [ UnmanagedFunctionPointer ( CallingConvention . Cdecl ) ]
@@ -828,10 +827,32 @@ public static extern bool uwTestShooting(uint shooterPosition, uint shooterProto
828827 public static extern float uwDistanceLine ( float x1 , float y1 , float z1 , float x2 , float y2 , float z2 ) ;
829828
830829 [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
831- public static extern float uwDistanceEstimate ( uint a , uint b ) ;
830+ public static extern float uwDistanceEstimate ( uint positionA , uint positionB ) ;
832831
833832 [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
834- public static extern float uwYaw ( uint position , uint towards ) ;
833+ public static extern float uwYaw ( uint startPosition , uint goalPosition ) ;
834+
835+ [ StructLayout ( LayoutKind . Sequential ) ]
836+ public struct UwClustersDistancesQuery
837+ {
838+ public ulong taskUserData ;
839+ public uint startingCluster ;
840+ public uint unitPrototype ;
841+ [ MarshalAs ( UnmanagedType . I1 ) ]
842+ public bool allowImpassableTerrain ;
843+ }
844+
845+ [ StructLayout ( LayoutKind . Sequential ) ]
846+ public struct UwClustersDistancesResult
847+ {
848+ public UwIds distances ;
849+ }
850+
851+ [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
852+ public static extern void uwStartClustersDistances ( ref UwClustersDistancesQuery query ) ;
853+
854+ [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
855+ public static extern void uwRetrieveClustersDistances ( ref UwClustersDistancesResult data ) ;
835856
836857 public enum UwPrototypeTypeEnum
837858 {
@@ -934,48 +955,23 @@ public struct UwUnitPathfindingQuery
934955 public uint startingPosition ;
935956 public uint goalPosition ;
936957 public uint unitPrototype ;
958+ public uint maxIterations ;
959+ [ MarshalAs ( UnmanagedType . I1 ) ]
960+ public bool allowNearbyPosition ;
937961 }
938962
939963 [ StructLayout ( LayoutKind . Sequential ) ]
940964 public struct UwUnitPathfindingResult
941965 {
942- public IntPtr tilesData ;
943- public uint tilesCount ;
966+ public UwIds path ;
944967 public UwPathStateEnum state ;
945968 }
946969
947970 [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
948971 public static extern void uwStartUnitPathfinding ( ref UwUnitPathfindingQuery query ) ;
949972
950973 [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
951- public static extern void uwRetrieveUnitPathfinding ( ref UwUnitPathfindingResult query ) ;
952-
953- [ StructLayout ( LayoutKind . Sequential ) ]
954- public struct UwMapPathfindingQuery
955- {
956- public ulong taskUserData ;
957- public uint start ;
958- public uint goal ;
959- }
960-
961- [ StructLayout ( LayoutKind . Sequential ) ]
962- public struct UwMapPathfindingResult
963- {
964- public IntPtr data ;
965- public uint count ;
966- }
967-
968- [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
969- public static extern void uwStartTilesPathfinding ( ref UwMapPathfindingQuery query ) ;
970-
971- [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
972- public static extern void uwStartClustersPathfinding ( ref UwMapPathfindingQuery query ) ;
973-
974- [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
975- public static extern void uwRetrieveTilesPathfinding ( ref UwMapPathfindingResult query ) ;
976-
977- [ DllImport ( LibName , CallingConvention = CallingConvention . Cdecl ) ]
978- public static extern void uwRetrieveClustersPathfinding ( ref UwMapPathfindingResult query ) ;
974+ public static extern void uwRetrieveUnitPathfinding ( ref UwUnitPathfindingResult data ) ;
979975 }
980976
981977 public partial class Entity
0 commit comments