Skip to content

Commit d097ada

Browse files
committed
added CreateAnimBlendAssocGroup and getAnimAssocGroupInterface functions
1 parent 26dc2b3 commit d097ada

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Client/game_sa/CGameSA.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
}

Client/game_sa/CGameSA.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ struct SCheatSA {
103103
class CGameSA : public CGame
104104
{
105105
friend class COffsets;
106+
typedef std::unique_ptr < CAnimBlendAssocGroup > AssocGroup_type;
106107

107108
private:
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;

0 commit comments

Comments
 (0)