1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 08:30:00 +00:00

Fix anim id in replay

This commit is contained in:
Sergeanur 2021-01-26 19:39:05 +02:00
parent c5ff13abca
commit 2d2625bf75

View file

@ -521,7 +521,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
state->aFunctionCallbackID[i] = 0; state->aFunctionCallbackID[i] = 0;
} }
}else{ }else{
state->aAnimId[i] = NUM_ANIMS; state->aAnimId[i] = NUM_STD_ANIMS;
state->aCurTime[i] = 0; state->aCurTime[i] = 0;
state->aSpeed[i] = 85; state->aSpeed[i] = 85;
state->aFunctionCallbackID[i] = 0; state->aFunctionCallbackID[i] = 0;
@ -548,7 +548,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
} }
} }
else { else {
state->aAnimId2[i] = NUM_ANIMS; state->aAnimId2[i] = NUM_STD_ANIMS;
state->aCurTime2[i] = 0; state->aCurTime2[i] = 0;
state->aSpeed2[i] = 85; state->aSpeed2[i] = 85;
state->aFunctionCallbackID2[i] = 0; state->aFunctionCallbackID2[i] = 0;
@ -659,7 +659,7 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt
for (int i = 0; ((assoc = RpAnimBlendClumpGetMainPartialAssociation_N(ped->GetClump(), i))); i++) for (int i = 0; ((assoc = RpAnimBlendClumpGetMainPartialAssociation_N(ped->GetClump(), i))); i++)
assoc->SetBlend(0.0f, -1.0f); assoc->SetBlend(0.0f, -1.0f);
for (int i = 0; i < NUM_MAIN_ANIMS_IN_REPLAY; i++) { for (int i = 0; i < NUM_MAIN_ANIMS_IN_REPLAY; i++) {
if (state->aAnimId[i] == NUM_ANIMS) if (state->aAnimId[i] == NUM_STD_ANIMS)
continue; continue;
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(), CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
state->aAnimId[i] > 3 ? (AssocGroupId)state->aGroupId[i] : ped->m_animGroup, state->aAnimId[i] > 3 ? (AssocGroupId)state->aGroupId[i] : ped->m_animGroup,
@ -677,7 +677,7 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt
anim->SetDeleteCallback(FindCBFunction(callback & 0x7F), ped); anim->SetDeleteCallback(FindCBFunction(callback & 0x7F), ped);
} }
for (int i = 0; i < NUM_PARTIAL_ANIMS_IN_REPLAY; i++) { for (int i = 0; i < NUM_PARTIAL_ANIMS_IN_REPLAY; i++) {
if (state->aAnimId2[i] == NUM_ANIMS) if (state->aAnimId2[i] == NUM_STD_ANIMS)
continue; continue;
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(), CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
state->aAnimId2[i] > 3 ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup, state->aAnimId2[i] > 3 ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup,