Merge branch 'miami' into lcs

* miami:
  Fix anim id in replay
This commit is contained in:
Sergeanur 2021-01-26 19:39:54 +02:00
commit 0862c79b21

View File

@ -521,7 +521,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
state->aFunctionCallbackID[i] = 0;
}
}else{
state->aAnimId[i] = NUM_ANIMS;
state->aAnimId[i] = NUM_STD_ANIMS;
state->aCurTime[i] = 0;
state->aSpeed[i] = 85;
state->aFunctionCallbackID[i] = 0;
@ -548,7 +548,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
}
}
else {
state->aAnimId2[i] = NUM_ANIMS;
state->aAnimId2[i] = NUM_STD_ANIMS;
state->aCurTime2[i] = 0;
state->aSpeed2[i] = 85;
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++)
assoc->SetBlend(0.0f, -1.0f);
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;
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
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);
}
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;
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
state->aAnimId2[i] > 3 ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup,