Skip to content

Commit 0f46e87

Browse files
committed
simpler MoveComponent
1 parent a750ff1 commit 0f46e87

File tree

5 files changed

+8
-28
lines changed

5 files changed

+8
-28
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 = 41;
37+
static const uint32 UW_VERSION = 42;
3838
static const uint32 UW_GameTicksPerSecond = 20;
3939

4040
typedef struct UwIds

c/uwapi/uwapi/modules/components.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,7 @@ extern "C"
7979

8080
typedef struct UwMoveComponent
8181
{
82-
uint32 posStart;
83-
uint32 posEnd;
84-
uint32 tickStart;
85-
uint32 tickEnd;
86-
float yawStart;
87-
float yawEnd;
82+
uint32 timestamp;
8883
} UwMoveComponent;
8984
UNNATURAL_API bool uwFetchMoveComponent(UwEntityPtr entity, UwMoveComponent *data);
9085

csharp/uwapi/interop.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public static extern void uwCommandPlaceConstruction(uint constructionProto, uin
317317
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
318318
public static extern void uwCommandSelfDestruct(uint entityId);
319319

320-
public const uint UW_VERSION = 41;
320+
public const uint UW_VERSION = 42;
321321
public const uint UW_GameTicksPerSecond = 20;
322322
[StructLayout(LayoutKind.Sequential)]
323323
public struct UwIds
@@ -483,12 +483,7 @@ public struct UwManaComponent
483483
[StructLayout(LayoutKind.Sequential)]
484484
public struct UwMoveComponent
485485
{
486-
public uint posStart;
487-
public uint posEnd;
488-
public uint tickStart;
489-
public uint tickEnd;
490-
public float yawStart;
491-
public float yawEnd;
486+
public uint timestamp;
492487
}
493488

494489
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]

python/uwapi/bots.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ typedef int32_t sint32;
99
typedef uint64_t uint64;
1010
typedef int64_t sint64;
1111

12-
static const uint32 UW_VERSION = 41;
12+
static const uint32 UW_VERSION = 42;
1313
static const uint32 UW_GameTicksPerSecond = 20;
1414

1515
typedef struct UwIds
@@ -287,12 +287,7 @@ bool uwFetchManaComponent(UwEntityPtr entity, UwManaComponent *data);
287287

288288
typedef struct UwMoveComponent
289289
{
290-
uint32 posStart;
291-
uint32 posEnd;
292-
uint32 tickStart;
293-
uint32 tickEnd;
294-
float yawStart;
295-
float yawEnd;
290+
uint32 timestamp;
296291
} UwMoveComponent;
297292
bool uwFetchMoveComponent(UwEntityPtr entity, UwMoveComponent *data);
298293

python/uwapi/interop.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,7 @@ class UwManaComponent:
240240

241241
@dataclass
242242
class UwMoveComponent:
243-
posStart: int
244-
posEnd: int
245-
tickStart: int
246-
tickEnd: int
247-
yawStart: float
248-
yawEnd: float
243+
timestamp: int
249244

250245
@dataclass
251246
class UwAimComponent:
@@ -1248,7 +1243,7 @@ def _UwManaComponent_ctopy(self, val) -> UwManaComponent:
12481243
return UwManaComponent(int(val.mana))
12491244

12501245
def _UwMoveComponent_ctopy(self, val) -> UwMoveComponent:
1251-
return UwMoveComponent(int(val.posStart), int(val.posEnd), int(val.tickStart), int(val.tickEnd), float(val.yawStart), float(val.yawEnd))
1246+
return UwMoveComponent(int(val.timestamp))
12521247

12531248
def _UwAimComponent_ctopy(self, val) -> UwAimComponent:
12541249
return UwAimComponent(int(val.target))

0 commit comments

Comments
 (0)