Skip to content

Commit aa965f0

Browse files
committed
add latest Core Method
1 parent 379259f commit aa965f0

File tree

8 files changed

+215
-9
lines changed

8 files changed

+215
-9
lines changed

api/AltV.Net.CApi/Libraries/ClientLibrary.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ public unsafe interface IClientLibrary
876876

877877
public unsafe class ClientLibrary : IClientLibrary
878878
{
879-
public readonly uint Methods = 1661;
879+
public readonly uint Methods = 1673;
880880
public delegate* unmanaged[Cdecl]<nint, nint, void> Audio_AddOutput { get; }
881881
public delegate* unmanaged[Cdecl]<nint, nint> Audio_GetBaseObject { get; }
882882
public delegate* unmanaged[Cdecl]<nint, double> Audio_GetCurrentTime { get; }
@@ -3472,7 +3472,7 @@ private IntPtr GetUnmanagedPtr<T>(IDictionary<ulong, IntPtr> funcTable, ulong ha
34723472
public ClientLibrary(Dictionary<ulong, IntPtr> funcTable)
34733473
{
34743474
if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true;
3475-
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 11511328496285563025UL) Outdated = true;
3475+
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 7123691631013690355UL) Outdated = true;
34763476
Audio_AddOutput = (delegate* unmanaged[Cdecl]<nint, nint, void>) GetUnmanagedPtr<Audio_AddOutputDelegate>(funcTable, 9914412815391408844UL, Audio_AddOutputFallback);
34773477
Audio_GetBaseObject = (delegate* unmanaged[Cdecl]<nint, nint>) GetUnmanagedPtr<Audio_GetBaseObjectDelegate>(funcTable, 6330360502401226894UL, Audio_GetBaseObjectFallback);
34783478
Audio_GetCurrentTime = (delegate* unmanaged[Cdecl]<nint, double>) GetUnmanagedPtr<Audio_GetCurrentTimeDelegate>(funcTable, 2944324482134975819UL, Audio_GetCurrentTimeFallback);

api/AltV.Net.CApi/Libraries/ServerLibrary.cs

Lines changed: 62 additions & 2 deletions
Large diffs are not rendered by default.

api/AltV.Net.CApi/Libraries/SharedLibrary.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ public unsafe interface ISharedLibrary
375375

376376
public unsafe class SharedLibrary : ISharedLibrary
377377
{
378-
public readonly uint Methods = 1661;
378+
public readonly uint Methods = 1673;
379379
public delegate* unmanaged[Cdecl]<nint, uint> Audio_GetID { get; }
380380
public delegate* unmanaged[Cdecl]<nint, uint> AudioAttachedOutput_GetID { get; }
381381
public delegate* unmanaged[Cdecl]<nint, uint> AudioFilter_GetID { get; }
@@ -1468,7 +1468,7 @@ private IntPtr GetUnmanagedPtr<T>(IDictionary<ulong, IntPtr> funcTable, ulong ha
14681468
public SharedLibrary(Dictionary<ulong, IntPtr> funcTable)
14691469
{
14701470
if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true;
1471-
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 11511328496285563025UL) Outdated = true;
1471+
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 7123691631013690355UL) Outdated = true;
14721472
Audio_GetID = (delegate* unmanaged[Cdecl]<nint, uint>) GetUnmanagedPtr<Audio_GetIDDelegate>(funcTable, 4464042055475980737UL, Audio_GetIDFallback);
14731473
AudioAttachedOutput_GetID = (delegate* unmanaged[Cdecl]<nint, uint>) GetUnmanagedPtr<AudioAttachedOutput_GetIDDelegate>(funcTable, 17725794901805112189UL, AudioAttachedOutput_GetIDFallback);
14741474
AudioFilter_GetID = (delegate* unmanaged[Cdecl]<nint, uint>) GetUnmanagedPtr<AudioFilter_GetIDDelegate>(funcTable, 8824535635529306325UL, AudioFilter_GetIDFallback);

api/AltV.Net.Mock/MockCore.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,12 @@ public void SetVoiceExternal(string host, ushort port)
961961
public byte StreamerThreadCount { get; set; }
962962
public uint StreamingTickRate { get; set; }
963963
public uint StreamingDistance { get; set; }
964+
public uint ColShapeTickRate { get; set; }
965+
public uint MigrationDistance { get; set; }
966+
public byte MigrationThreadCount { get; set; }
967+
public uint MigrationTickRate { get; set; }
968+
public byte SyncReceiveThreadCount { get; set; }
969+
public byte SyncSendThreadCount { get; set; }
964970

965971
public string PtrToStringUtf8AndFree(nint str, int size)
966972
{

api/AltV.Net/Alt.cs

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,38 @@ public static uint StreamingTickRate
165165
}
166166
public static uint StreamingDistance
167167
{
168-
get => Core.StreamingTickRate;
169-
set => Core.StreamingTickRate = value;
168+
get => Core.StreamingDistance;
169+
set => Core.StreamingDistance = value;
170+
}
171+
public static uint ColShapeTickRate
172+
{
173+
get => Core.ColShapeTickRate;
174+
set => Core.ColShapeTickRate = value;
175+
}
176+
public static uint MigrationDistance
177+
{
178+
get => Core.MigrationDistance;
179+
set => Core.MigrationDistance = value;
180+
}
181+
public static byte MigrationThreadCount
182+
{
183+
get => Core.MigrationThreadCount;
184+
set => Core.MigrationThreadCount = value;
185+
}
186+
public static uint MigrationTickRate
187+
{
188+
get => Core.MigrationTickRate;
189+
set => Core.MigrationTickRate = value;
190+
}
191+
public static byte SyncReceiveThreadCount
192+
{
193+
get => Core.SyncReceiveThreadCount;
194+
set => Core.SyncReceiveThreadCount = value;
195+
}
196+
public static byte SyncSendThreadCount
197+
{
198+
get => Core.SyncSendThreadCount;
199+
set => Core.SyncSendThreadCount = value;
170200
}
171201
}
172202
}

api/AltV.Net/Core.cs

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,109 @@ public uint StreamingDistance
14811481
}
14821482
}
14831483

1484+
public uint ColShapeTickRate
1485+
{
1486+
get
1487+
{
1488+
unsafe
1489+
{
1490+
return Library.Server.Core_GetColShapeTickRate(NativePointer);
1491+
}
1492+
}
1493+
set
1494+
{
1495+
unsafe
1496+
{
1497+
Library.Server.Core_SetColShapeTickRate(NativePointer, value);
1498+
}
1499+
}
1500+
}
1501+
public uint MigrationDistance
1502+
{
1503+
get
1504+
{
1505+
unsafe
1506+
{
1507+
return Library.Server.Core_GetMigrationDistance(NativePointer);
1508+
}
1509+
}
1510+
set
1511+
{
1512+
unsafe
1513+
{
1514+
Library.Server.Core_SetMigrationDistance(NativePointer, value);
1515+
}
1516+
}
1517+
}
1518+
public byte MigrationThreadCount
1519+
{
1520+
get
1521+
{
1522+
unsafe
1523+
{
1524+
return Library.Server.Core_GetMigrationThreadCount(NativePointer);
1525+
}
1526+
}
1527+
set
1528+
{
1529+
unsafe
1530+
{
1531+
Library.Server.Core_SetMigrationThreadCount(NativePointer, value);
1532+
}
1533+
}
1534+
}
1535+
public uint MigrationTickRate
1536+
{
1537+
get
1538+
{
1539+
unsafe
1540+
{
1541+
return Library.Server.Core_GetMigrationTickRate(NativePointer);
1542+
}
1543+
}
1544+
set
1545+
{
1546+
unsafe
1547+
{
1548+
Library.Server.Core_SetMigrationTickRate(NativePointer, value);
1549+
}
1550+
}
1551+
}
1552+
public byte SyncReceiveThreadCount
1553+
{
1554+
get
1555+
{
1556+
unsafe
1557+
{
1558+
return Library.Server.Core_GetSyncReceiveThreadCount(NativePointer);
1559+
}
1560+
}
1561+
set
1562+
{
1563+
unsafe
1564+
{
1565+
Library.Server.Core_SetSyncReceiveThreadCount(NativePointer, value);
1566+
}
1567+
}
1568+
}
1569+
public byte SyncSendThreadCount
1570+
{
1571+
get
1572+
{
1573+
unsafe
1574+
{
1575+
return Library.Server.Core_GetSyncSendThreadCount(NativePointer);
1576+
}
1577+
}
1578+
set
1579+
{
1580+
unsafe
1581+
{
1582+
Library.Server.Core_SetSyncSendThreadCount(NativePointer, value);
1583+
}
1584+
}
1585+
}
1586+
14841587
public IReadOnlyCollection<IMetric> GetAllMetrics()
14851588
{
14861589
return metricCache.Values.ToList();

api/AltV.Net/ICore.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,12 @@ IBaseObject[] GetClosestEntities(Position position, int range, int dimension, in
206206
byte StreamerThreadCount { get; set; }
207207
uint StreamingTickRate { get; set; }
208208
uint StreamingDistance { get; set; }
209+
uint ColShapeTickRate { get; set; }
210+
uint MigrationDistance { get; set; }
211+
byte MigrationThreadCount { get; set; }
212+
uint MigrationTickRate { get; set; }
213+
byte SyncReceiveThreadCount { get; set; }
214+
byte SyncSendThreadCount { get; set; }
215+
209216
}
210217
}

runtime

0 commit comments

Comments
 (0)