[saco] Implement CEntity::sub_1009ED40(...)

This commit is contained in:
RD42 2024-02-18 22:44:02 +08:00
parent 17dcdb62f0
commit 6ea7682c3c
2 changed files with 26 additions and 1 deletions

View File

@ -95,3 +95,27 @@ void CEntity::SetMoveSpeedVector(VECTOR Vector)
//-----------------------------------------------------------
void CEntity::sub_1009ED40(float fX, float fY, float fZ)
{
int x=4;
while(x) {
field_4[x-1].X = field_4[x].X;
field_4[x-1].Y = field_4[x].Y;
field_4[x-1].Z = field_4[x].Z;
x--;
}
field_4[4].X = fX;
field_4[4].Y = fY;
field_4[4].Z = fZ;
m_pEntity->vecMoveSpeed.X =
(field_4[0].X + field_4[1].X + field_4[2].X + field_4[3].X + field_4[4].X) * 0.2f;
m_pEntity->vecMoveSpeed.Y =
(field_4[0].Y + field_4[1].Y + field_4[2].Y + field_4[3].Y + field_4[4].Y) * 0.2f;
m_pEntity->vecMoveSpeed.Z =
(field_4[0].Z + field_4[1].Z + field_4[2].Z + field_4[3].Z + field_4[4].Z) * 0.2f;
}
//-----------------------------------------------------------

View File

@ -16,8 +16,9 @@ public:
void sub_1009EC80();
void GetMoveSpeedVector(PVECTOR Vector);
void SetMoveSpeedVector(VECTOR Vector);
void sub_1009ED40(float fX, float fY, float fZ); // unused
char field_4[60];
VECTOR field_4[5];
ENTITY_TYPE *m_pEntity;
DWORD m_dwGTAId;
};