Skip to content

Commit 1a6b4ca

Browse files
committed
UwForceEliminatedCall
1 parent c689f4d commit 1a6b4ca

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

c/uwapi/uwapi/modules/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C"
3434
typedef uint64_t uint64;
3535
typedef int64_t sint64;
3636

37-
static const uint32 UW_VERSION = 30;
37+
static const uint32 UW_VERSION = 32;
3838
static const uint32 UW_GameTicksPerSecond = 20;
3939

4040
typedef struct UwIds

c/uwapi/uwapi/modules/game.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ extern "C"
7575
UNNATURAL_ENTRY void uwUpdateCallback(uint32 tick, bool stepping);
7676
#endif
7777

78+
// force eliminated callback
79+
80+
#ifdef UNNATURAL_BOTS
81+
typedef void (*UwForceEliminatedCallbackType)(uint32 id);
82+
UNNATURAL_API void uwSetForceEliminatedCallback(UwForceEliminatedCallbackType callback);
83+
#endif
84+
#ifdef UNNATURAL_SCRIPTS
85+
UNNATURAL_ENTRY void uwForceEliminatedCallback(uint32 id);
86+
#endif
87+
7888
// shooting callback
7989

8090
typedef struct UwShootingUnit

csharp/uwapi/interop.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public enum UwPathStateEnum
258258
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
259259
public static extern void uwCommandSelfDestruct(uint entityId);
260260

261-
public const uint UW_VERSION = 30;
261+
public const uint UW_VERSION = 32;
262262
public const uint UW_GameTicksPerSecond = 20;
263263
[StructLayout(LayoutKind.Sequential)]
264264
public struct UwIds
@@ -370,6 +370,12 @@ public enum UwGameStateEnum
370370
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
371371
public static extern void uwSetUpdateCallback(UwUpdateCallbackType callback);
372372

373+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
374+
public delegate void UwForceEliminatedCallbackType(uint id);
375+
376+
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
377+
public static extern void uwSetForceEliminatedCallback(UwForceEliminatedCallbackType callback);
378+
373379
[StructLayout(LayoutKind.Sequential)]
374380
public struct UwShootingUnit
375381
{

python/uwapi/uw/bots.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
typedef uint64_t uint64;
2222
typedef int64_t sint64;
2323

24-
static const uint32 UW_VERSION = 30;
24+
static const uint32 UW_VERSION = 32;
2525
static const uint32 UW_GameTicksPerSecond = 20;
2626

2727
typedef struct UwIds
@@ -255,6 +255,8 @@
255255

256256
typedef void (*UwUpdateCallbackType)(uint32 tick, bool stepping);
257257
void uwSetUpdateCallback(UwUpdateCallbackType callback);
258+
typedef void (*UwForceEliminatedCallbackType)(uint32 id);
259+
void uwSetForceEliminatedCallback(UwForceEliminatedCallbackType callback);
258260

259261

260262

0 commit comments

Comments
 (0)