Skip to content

Commit ae72bbc

Browse files
committed
Make custom animations work with the EU version too
1 parent 432344f commit ae72bbc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Client/multiplayer_sa/CMultiplayerSA_CustomAnimations.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ DWORD RETURN_CAnimManager_BlendAnimation_Hierarchy = 0x4D4577;
2828

2929
auto CAnimBlendStaticAssociation_FreeSequenceArray = (hCAnimBlendStaticAssociation_FreeSequenceArray)0x4ce9a0;
3030
auto UncompressAnimation = (hUncompressAnimation)0x4d41c0;
31-
auto CAnimBlendAssociation_NewOperator = (hCAnimBlendAssociation_NewOperator)0x082119A;
3231
auto CAnimBlendAssociation_Constructor_staticAssocByReference = (hCAnimBlendAssociation_Constructor_staticAssocByReference)0x4CF080;
3332

33+
auto CAnimBlendAssociation_NewOperator_US = (hCAnimBlendAssociation_NewOperator)0x82119A;
34+
auto CAnimBlendAssociation_NewOperator_EU = (hCAnimBlendAssociation_NewOperator)0x8211DA;
35+
3436
AddAnimationHandler* m_pAddAnimationHandler = nullptr;
3537
AddAnimationAndSyncHandler* m_pAddAnimationAndSyncHandler = nullptr;
3638
AssocGroupCopyAnimationHandler* m_pAssocGroupCopyAnimationHandler = nullptr;
@@ -61,8 +63,10 @@ void CMultiplayerSA::SetBlendAnimationHierarchyHandler(BlendAnimationHierarchyHa
6163
CAnimBlendAssociationSAInterface* __cdecl CAnimBlendAssocGroup_CopyAnimation(RpClump* pClump, CAnimBlendAssocGroupSAInterface* pAnimAssocGroupInterface,
6264
AnimationId animID)
6365
{
66+
auto CAnimBlendAssociation_NewOperator = pGameInterface->GetGameVersion() == VERSION_EU_10 ? CAnimBlendAssociation_NewOperator_EU : CAnimBlendAssociation_NewOperator_US;
6467
auto pAnimAssociationInterface =
6568
reinterpret_cast<CAnimBlendAssociationSAInterface*>(CAnimBlendAssociation_NewOperator(sizeof(CAnimBlendAssociationSAInterface)));
69+
6670
if (pAnimAssociationInterface)
6771
{
6872
CAnimBlendStaticAssociationSAInterface staticAnimAssociationInterface;

0 commit comments

Comments
 (0)