File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -857,3 +857,16 @@ CPed* CGameSA::GetPedContext ( void )
857857 m_pPedContext = pGame->GetPools ()->GetPedFromRef ( (DWORD)1 );
858858 return m_pPedContext;
859859}
860+
861+ constexpr
862+ CAnimBlendAssocGroupSAInterface * CGameSA::getAnimAssocGroupInterface ( AssocGroupId animGroup )
863+ {
864+ DWORD * pAnimAssocGroupsArray = reinterpret_cast < DWORD * > ( *(DWORD*)ARRAY_CAnimManager_AnimAssocGroups );
865+ return reinterpret_cast < CAnimBlendAssocGroupSAInterface * > ( pAnimAssocGroupsArray + 5 * animGroup );
866+ }
867+
868+ CGameSA::AssocGroup_type CGameSA::CreateAnimBlendAssocGroup ( AssocGroupId animGroup )
869+ {
870+ auto pAnimAssocGroupInterface = getAnimAssocGroupInterface ( animGroup );
871+ return std::make_unique < CAnimBlendAssocGroupSA > ( pAnimAssocGroupInterface );
872+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ struct SCheatSA {
103103class CGameSA : public CGame
104104{
105105 friend class COffsets ;
106+ typedef std::unique_ptr < CAnimBlendAssocGroup > AssocGroup_type;
106107
107108private:
108109 CWeaponInfo * WeaponInfos[NUM_WeaponInfosTotal];
@@ -256,6 +257,10 @@ class CGameSA : public CGame
256257 void SetPostWeaponFireHandler ( PostWeaponFireHandler* pPostWeaponFireHandler ) { m_pPostWeaponFireHandler = pPostWeaponFireHandler; }
257258 void SetTaskSimpleBeHitHandler ( TaskSimpleBeHitHandler* pTaskSimpleBeHitHandler ) { m_pTaskSimpleBeHitHandler = pTaskSimpleBeHitHandler; }
258259
260+ constexpr
261+ CAnimBlendAssocGroupSAInterface * getAnimAssocGroupInterface ( AssocGroupId animGroup );
262+ AssocGroup_type CreateAnimBlendAssocGroup ( AssocGroupId animGroup );
263+
259264 PreWeaponFireHandler* m_pPreWeaponFireHandler;
260265 PostWeaponFireHandler* m_pPostWeaponFireHandler;
261266 TaskSimpleBeHitHandler* m_pTaskSimpleBeHitHandler;
You can’t perform that action at this time.
0 commit comments