diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-08-23 00:44:38 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-08-23 00:53:53 +0200 |
commit | e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a (patch) | |
tree | 8ea09fb5f072f26005983e435e46ac70b4ecdb37 /src/peds/PedIK.h | |
parent | Merge pull request #195 from erorcun/erorcun (diff) | |
download | re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.gz re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.bz2 re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.lz re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.xz re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.zst re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/PedIK.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/peds/PedIK.h b/src/peds/PedIK.h index a8d9c75d..21f8cce4 100644 --- a/src/peds/PedIK.h +++ b/src/peds/PedIK.h @@ -18,16 +18,21 @@ struct LimbMovementInfo { float pitchD; }; +enum LimbMoveStatus { + ANGLES_SET_TO_MAX, // because given angles were unreachable + ONE_ANGLE_COULDNT_BE_SET_EXACTLY, // because it can't be reached in a jiffy + ANGLES_SET_EXACTLY +}; + class CPed; class CPedIK { public: - // TODO enum { FLAG_1 = 1, - FLAG_2 = 2, // related to looking somewhere - FLAG_4 = 4, // aims with arm + LOOKING = 2, + AIMS_WITH_ARM = 4, }; CPed *m_ped; @@ -38,6 +43,7 @@ public: int32 m_flags; static LimbMovementInfo &ms_torsoInfo; + static LimbMovementInfo &ms_headInfo; CPedIK(CPed *ped); bool PointGunInDirection(float phi, float theta); @@ -47,7 +53,9 @@ public: void RotateTorso(AnimBlendFrameData* animBlend, LimbOrientation* limb, bool changeRoll); void ExtractYawAndPitchLocal(RwMatrixTag*, float*, float*); void ExtractYawAndPitchWorld(RwMatrixTag*, float*, float*); - uint32 MoveLimb(LimbOrientation &a1, float a2, float a3, LimbMovementInfo &a4); + LimbMoveStatus MoveLimb(LimbOrientation &a1, float a2, float a3, LimbMovementInfo &a4); bool RestoreGunPosn(void); + bool LookInDirection(float phi, float theta); + bool LookAtPosition(CVector const& pos); }; static_assert(sizeof(CPedIK) == 0x28, "CPedIK: error"); |