Skip to content
Permalink
Browse files

ix #1109: Weapon Fire ancient crash with anim ID 224

  • Loading branch information...
codenulls committed Sep 29, 2019
1 parent b296565 commit f0d00f46998539dcf281730704884c293eceeab7
Showing with 13 additions and 1 deletion.
  1. +13 −1 Client/multiplayer_sa/CMultiplayerSA_FixBadAnimId.cpp
@@ -19,8 +19,20 @@ CAnimBlendAssocGroupSAInterface* getAnimAssocGroupInterface(AssocGroupId animGro
int _cdecl OnCAnimBlendAssocGroupCopyAnimation_FixBadAnim(AssocGroupId* pAnimGroup, int* pAnimId)
{
pMultiplayer->SetLastStaticAnimationPlayed(*pAnimGroup, *pAnimId, *(DWORD*)0xb4ea34);
CAnimBlendAssocGroupSAInterface* pGroup = getAnimAssocGroupInterface(*pAnimGroup);

// Fix #1109: Weapon Fire ancient crash with anim ID 224
if (*pAnimId == 224 && *pAnimGroup != ANIM_GROUP_GRENADE)
{
if (*pAnimGroup < ANIM_GROUP_PYTHON || *pAnimGroup > ANIM_GROUP_GOGGLES)
{
LogEvent(533, "CopyAnimation", "Incorrect Group ID", SString("GroupID = %d | AnimID = %d", *pAnimGroup, *pAnimId), 533);

// switch to python anim group as it has 224 anim
*pAnimGroup = ANIM_GROUP_PYTHON;
}
}

CAnimBlendAssocGroupSAInterface* pGroup = getAnimAssocGroupInterface(*pAnimGroup);
DWORD* pInterface = reinterpret_cast<DWORD*>(pGroup);
if (pInterface < (DWORD*)0x250)
{

0 comments on commit f0d00f4

Please sign in to comment.
You can’t perform that action at this time.