From 17dcdb62f0f9ab5f948bc6a10e7eaddf0f73ea92 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 18 Feb 2024 22:43:14 +0800 Subject: [PATCH] [saco] Implement CEntity Set/GetMoveSpeedVector --- saco/game/common.h | 4 ++++ saco/game/entity.cpp | 18 ++++++++++++++++++ saco/game/entity.h | 2 ++ 3 files changed, 24 insertions(+) diff --git a/saco/game/common.h b/saco/game/common.h index d802d96..84a61cd 100644 --- a/saco/game/common.h +++ b/saco/game/common.h @@ -45,6 +45,10 @@ typedef struct _ENTITY_TYPE MATRIX4X4 *mat; // 20-24 DWORD *pdwRenderWare; // 24-28 + char _gap1C[40]; + + VECTOR vecMoveSpeed; // 68-80 + } ENTITY_TYPE; //----------------------------------------------------------- diff --git a/saco/game/entity.cpp b/saco/game/entity.cpp index 2026acc..d7f46ee 100644 --- a/saco/game/entity.cpp +++ b/saco/game/entity.cpp @@ -77,3 +77,21 @@ void CEntity::sub_1009EC80() //----------------------------------------------------------- +void CEntity::GetMoveSpeedVector(PVECTOR Vector) +{ + Vector->X = m_pEntity->vecMoveSpeed.X; + Vector->Y = m_pEntity->vecMoveSpeed.Y; + Vector->Z = m_pEntity->vecMoveSpeed.Z; +} + +//----------------------------------------------------------- + +void CEntity::SetMoveSpeedVector(VECTOR Vector) +{ + m_pEntity->vecMoveSpeed.X = Vector.X; + m_pEntity->vecMoveSpeed.Y = Vector.Y; + m_pEntity->vecMoveSpeed.Z = Vector.Z; +} + +//----------------------------------------------------------- + diff --git a/saco/game/entity.h b/saco/game/entity.h index 4d75ae3..a40f80d 100644 --- a/saco/game/entity.h +++ b/saco/game/entity.h @@ -14,6 +14,8 @@ public: void GetMatrix(PMATRIX4X4 Matrix); void SetMatrix(MATRIX4X4 Matrix); void sub_1009EC80(); + void GetMoveSpeedVector(PVECTOR Vector); + void SetMoveSpeedVector(VECTOR Vector); char field_4[60]; ENTITY_TYPE *m_pEntity;