diff --git a/Client/mods/deathmatch/logic/CClientIFP.cpp b/Client/mods/deathmatch/logic/CClientIFP.cpp index 5694d2c337..7e8b212798 100644 --- a/Client/mods/deathmatch/logic/CClientIFP.cpp +++ b/Client/mods/deathmatch/logic/CClientIFP.cpp @@ -151,7 +151,7 @@ WORD CClientIFP::ReadSequencesWithDummies(std::unique_ptr& MoveSequencesWithDummies(pAnimationHierarchy, MapOfSequences); WORD cSequences = m_kcIFPSequences + wUnknownSequences; - // As we need support for all 32 bones, we must change the total sequences count + // As we need support for all 64 bones (32 ped + 32 cutscene ped), we must change the total sequences count pAnimationHierarchy->SetNumSequences(cSequences); return cSequences; } @@ -243,7 +243,7 @@ std::int32_t CClientIFP::ReadSequenceVersion1(SAnim& Anim) RoundSize(Anim.Base.Size); ReadBytes(&Anim.Name, Anim.Base.Size); - SString strBoneName = ConvertStringToKey(Anim.Name); + SString strBoneName = ConvertStringToKey(Anim.Name, true); std::int32_t iBoneID = GetBoneIDFromName(strBoneName); SString strCorrectBoneName = GetCorrectBoneNameFromName(strBoneName); @@ -549,6 +549,25 @@ void CClientIFP::InsertAnimationDummySequence(std::unique_ptr& pAnimationSequence, const SString& BoneName, const DWORD& dwBoneID); void CopyDummyKeyFrameByBoneID(BYTE* pKeyFrames, DWORD dwBoneID); - SString ConvertStringToKey(const SString& strBoneName); + SString ConvertStringToKey(const SString& strBoneName, bool isANPK = false); constexpr void RoundSize(std::uint32_t& u32Size); constexpr bool IsKeyFramesTypeRoot(eFrameType iFrameType); @@ -279,16 +316,46 @@ class CClientIFP final : public CClientEntity, CFileReader bool m_bUnloading; CAnimManager* m_pAnimManager; - // 32 because there are 32 bones in a ped model - const unsigned short m_kcIFPSequences = 32; + // 64 because there are 32 bones in a ped model + 32 possibly cutscene bones + const unsigned short m_kcIFPSequences = 64; // We'll keep all key frames compressed by default. GTA:SA will decompress // them, when it's going to play the animation. We don't need to worry about it. const bool m_kbAllKeyFramesCompressed = true; - const DWORD m_karruBoneIds[32] = {0, 1, 2, 3, 4, 5, 8, 6, 7, 31, 32, 33, 34, 35, 36, 21, 22, 23, 24, 25, 26, 302, 301, 201, 41, 42, 43, 44, 51, 52, 53, 54}; - const char m_karrstrBoneNames[32][24] = { - "Normal", "Pelvis", "Spine", "Spine1", "Neck", "Head", "Jaw", "L Brow", - "R Brow", "Bip01 L Clavicle", "L UpperArm", "L ForeArm", "L Hand", "L Finger", "L Finger01", "Bip01 R Clavicle", - "R UpperArm", "R ForeArm", "R Hand", "R Finger", "R Finger01", "L breast", "R breast", "Belly", - "L Thigh", "L Calf", "L Foot", "L Toe0", "R Thigh", "R Calf", "R Foot", "R Toe0"}; + const DWORD m_karruBoneIds[64] = {0, 1, 2, 3, 4, 5, 8, 6, 7, 31, 32, 33, 34, 35, 36, 21, + 22, 23, 24, 25, 26, 302, 301, 201, 41, 42, 43, 44, 51, 52, 53, 54, + 28, 29, 30, 38, 39, 40, 303, 304, 305, 306, 307, 5001, 5002, 5003, 5004, 5005, + 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021}; + const char m_karrstrBoneNames[64][24] = {"Normal", "Pelvis", + "Spine", "Spine1", + "Neck", "Head", + "Jaw", "L Brow", + "R Brow", "Bip01 L Clavicle", + "L UpperArm", "L ForeArm", + "L Hand", "L Finger", + "L Finger01", "Bip01 R Clavicle", + "R UpperArm", "R ForeArm", + "R Hand", "R Finger", + "R Finger01", "L breast", + "R breast", "Belly", + "L Thigh", "L Calf", + "L Foot", "L Toe0", + "R Thigh", "R Calf", + "R Foot", "R Toe0", + "RThumb1", "RThumb2", + "llip11", "LThumb1", + "LThumb2", "jaw22", + "HeadNub", "L Finger0Nub", + "R Finger0Nub", "L Toe0Nub", + "R Toe0Nub", "rbrow1", + "rbrow2", "lbrow2", + "lbrow1", "rlid", + "llid", "rtlip3", + "ltlip3", "rtlip1", + "rtlip2", "ltlip1", + "ltlip2", "rcorner", + "lcorner", "jaw1", + "jaw2", "llip1", + "reye", "leye", + "rcheek", "lcheek"}; };