diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-27 17:50:24 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-27 17:50:24 +0100 |
commit | 97351ad2c2a05f9221601b27432aaf7b51507103 (patch) | |
tree | 7ce01d3e594fdf2894199cda0474bbc8f65de33b /src/control | |
parent | Fix anim id in replay (diff) | |
download | re3-97351ad2c2a05f9221601b27432aaf7b51507103.tar re3-97351ad2c2a05f9221601b27432aaf7b51507103.tar.gz re3-97351ad2c2a05f9221601b27432aaf7b51507103.tar.bz2 re3-97351ad2c2a05f9221601b27432aaf7b51507103.tar.lz re3-97351ad2c2a05f9221601b27432aaf7b51507103.tar.xz re3-97351ad2c2a05f9221601b27432aaf7b51507103.tar.zst re3-97351ad2c2a05f9221601b27432aaf7b51507103.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Phones.cpp | 10 | ||||
-rw-r--r-- | src/control/Replay.cpp | 20 | ||||
-rw-r--r-- | src/control/Script.cpp | 2 | ||||
-rw-r--r-- | src/control/Script4.cpp | 4 | ||||
-rw-r--r-- | src/control/Script5.cpp | 8 | ||||
-rw-r--r-- | src/control/Script8.cpp | 4 |
6 files changed, 24 insertions, 24 deletions
diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp index 411dc8c3..9b50a7ec 100644 --- a/src/control/Phones.cpp +++ b/src/control/Phones.cpp @@ -48,9 +48,9 @@ CPhoneInfo::Update(void) TheCamera.SetWideScreenOff(); pPhoneDisplayingMessages = nil; bDisplayingPhoneMessage = false; - CAnimBlendAssociation *talkAssoc = RpAnimBlendClumpGetAssociation(player->GetClump(), ANIM_PHONE_TALK); + CAnimBlendAssociation *talkAssoc = RpAnimBlendClumpGetAssociation(player->GetClump(), ANIM_STD_PHONE_TALK); if (talkAssoc && talkAssoc->blendAmount > 0.5f) { - CAnimBlendAssociation *endAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_PHONE_OUT, 8.0f); + CAnimBlendAssociation *endAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_OUT, 8.0f); endAssoc->flags &= ~ASSOC_DELETEFADEDOUT; endAssoc->SetFinishCallback(PhonePutDownCB, player); } else { @@ -107,7 +107,7 @@ CPhoneInfo::Update(void) CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_PHONE); TheCamera.SetWideScreenOn(); playerInfo->MakePlayerSafe(true); - CAnimBlendAssociation *phonePickAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_PHONE_IN, 4.0f); + CAnimBlendAssociation *phonePickAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_IN, 4.0f); phonePickAssoc->SetFinishCallback(PhonePickUpCB, &m_aPhones[phoneId]); bPickingUpPhone = true; pCallBackPed = player; @@ -363,10 +363,10 @@ PhonePickUpCB(CAnimBlendAssociation *assoc, void *arg) CPed *ped = CPhoneInfo::pCallBackPed; ped->m_nMoveState = PEDMOVE_STILL; - CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_IDLE_STANCE, 8.0f); + CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE, 8.0f); if (assoc->blendAmount > 0.5f && ped) - CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_PHONE_TALK, 8.0f); + CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_TALK, 8.0f); CPhoneInfo::pCallBackPed = nil; } diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 8eae0dc3..cd612d5d 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -521,7 +521,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState state->aFunctionCallbackID[i] = 0; } }else{ - state->aAnimId[i] = NUM_STD_ANIMS; + state->aAnimId[i] = ANIM_STD_NUM; 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_STD_ANIMS; + state->aAnimId2[i] = ANIM_STD_NUM; state->aCurTime2[i] = 0; state->aSpeed2[i] = 85; state->aFunctionCallbackID2[i] = 0; @@ -611,13 +611,13 @@ bool HasAnimGroupLoaded(uint8 group) void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state) { CAnimBlendAssociation* anim1; - if (state->animId <= 3) + if (state->animId <= ANIM_STD_IDLE) anim1 = CAnimManager::BlendAnimation( (RpClump*)ped->m_rwObject, ped->m_animGroup, (AnimationId)state->animId, 100.0f); else if (HasAnimGroupLoaded(state->groupId)) anim1 = CAnimManager::BlendAnimation((RpClump*)ped->m_rwObject, (AssocGroupId)state->groupId, (AnimationId)state->animId, 100.0f); else - anim1 = CAnimManager::BlendAnimation((RpClump*)ped->m_rwObject, ASSOCGRP_STD, ANIM_WALK, 100.0f); + anim1 = CAnimManager::BlendAnimation((RpClump*)ped->m_rwObject, ASSOCGRP_STD, ANIM_STD_WALK, 100.0f); anim1->SetCurrentTime(state->time * 4.0f / 255.0f); anim1->speed = state->speed * 3.0f / 255.0f; @@ -629,7 +629,7 @@ void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state) float blend = state->blendAmount * 2.0f / 255.0f; CAnimBlendAssociation* anim2 = CAnimManager::BlendAnimation( (RpClump*)ped->m_rwObject, - (state->secAnimId > 3) ? (AssocGroupId)state->secGroupId : ped->m_animGroup, + (state->secAnimId > ANIM_STD_IDLE) ? (AssocGroupId)state->secGroupId : ped->m_animGroup, (AnimationId)state->secAnimId, 100.0f); anim2->SetCurrentTime(time); anim2->speed = speed; @@ -641,7 +641,7 @@ void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state) float time = state->partAnimTime * 4.0f / 255.0f; float speed = state->partAnimSpeed * 3.0f / 255.0f; float blend = state->partBlendAmount * 2.0f / 255.0f; - if (blend > 0.0f && state->partAnimId != ANIM_IDLE_STANCE && HasAnimGroupLoaded(state->partGroupId)){ + if (blend > 0.0f && state->partAnimId != ANIM_STD_IDLE && HasAnimGroupLoaded(state->partGroupId)){ CAnimBlendAssociation* anim3 = CAnimManager::BlendAnimation( (RpClump*)ped->m_rwObject, (AssocGroupId)state->partGroupId, (AnimationId)state->partAnimId, 1000.0f); anim3->SetCurrentTime(time); @@ -659,10 +659,10 @@ 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_STD_ANIMS) + if (state->aAnimId[i] == ANIM_STD_NUM) continue; CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(), - state->aAnimId[i] > 3 ? (AssocGroupId)state->aGroupId[i] : ped->m_animGroup, + state->aAnimId[i] > ANIM_STD_IDLE ? (AssocGroupId)state->aGroupId[i] : ped->m_animGroup, (AnimationId)state->aAnimId[i]); anim->SetCurrentTime(state->aCurTime[i] * 4.0f / 255.0f); anim->speed = state->aSpeed[i] * 3.0f / 255.0f; @@ -677,10 +677,10 @@ 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_STD_ANIMS) + if (state->aAnimId2[i] == ANIM_STD_NUM) continue; CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(), - state->aAnimId2[i] > 3 ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup, + state->aAnimId2[i] > ANIM_STD_IDLE ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup, (AnimationId)state->aAnimId2[i]); anim->SetCurrentTime(state->aCurTime2[i] * 4.0f / 255.0f); anim->speed = state->aSpeed2[i] * 3.0f / 255.0f; diff --git a/src/control/Script.cpp b/src/control/Script.cpp index a160fbc1..cb208912 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -4756,7 +4756,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) pPlayer->m_pPed->m_pVehicleAnim->blendDelta = -1000.0f; pPlayer->m_pPed->m_pVehicleAnim = nil; pPlayer->m_pPed->SetMoveState(PEDMOVE_NONE); - CAnimManager::BlendAnimation(pPlayer->m_pPed->GetClump(), pPlayer->m_pPed->m_animGroup, ANIM_IDLE_STANCE, 1000.0f); + CAnimManager::BlendAnimation(pPlayer->m_pPed->GetClump(), pPlayer->m_pPed->m_animGroup, ANIM_STD_IDLE, 1000.0f); pPlayer->m_pPed->RestartNonPartialAnims(); AudioManager.PlayerJustLeftCar(); pos.z += pPlayer->m_pPed->GetDistanceFromCentreOfMassToBaseOfModel(); diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp index 9830f0dc..878278c5 100644 --- a/src/control/Script4.cpp +++ b/src/control/Script4.cpp @@ -822,7 +822,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) } } pPed->m_pMyVehicle->m_nGettingOutFlags &= ~flags; - pPed->m_pMyVehicle->ProcessOpenDoor(pPed->m_vehDoor, NUM_STD_ANIMS, 0.0f); + pPed->m_pMyVehicle->ProcessOpenDoor(pPed->m_vehDoor, ANIM_STD_NUM, 0.0f); } } } @@ -839,7 +839,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) pPed->m_pVehicleAnim = nil; pPed->RestartNonPartialAnims(); pPed->SetMoveState(PEDMOVE_NONE); - CAnimManager::BlendAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_IDLE_STANCE, 1000.0f); + CAnimManager::BlendAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_STD_IDLE, 1000.0f); pos.z += pPed->GetDistanceFromCentreOfMassToBaseOfModel(); pPed->Teleport(pos); CTheScripts::ClearSpaceForMissionEntity(pos, pPed); diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp index cc70a170..1371f2e6 100644 --- a/src/control/Script5.cpp +++ b/src/control/Script5.cpp @@ -2627,10 +2627,10 @@ bool CTheScripts::IsPlayerStopped(CPlayerInfo* pPlayer) CPed* pPed = pPlayer->m_pPed; if (pPed->InVehicle()) return IsVehicleStopped(pPed->m_pMyVehicle); - if (RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_RUN_STOP) || - RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_RUN_STOP_R) || - RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_LAUNCH) || - RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_GLIDE)) + if (RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_RUNSTOP1) || + RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_RUNSTOP2) || + RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_JUMP_LAUNCH) || + RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_JUMP_GLIDE)) return false; return (pPed->m_nMoveState == PEDMOVE_NONE || pPed->m_nMoveState == PEDMOVE_STILL) && !pPed->bIsInTheAir && !pPed->bIsLanding && pPed->bIsStanding && pPed->m_vecAnimMoveDelta.x == 0.0f && pPed->m_vecAnimMoveDelta.y == 0.0f; diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp index 9a8e536e..2d1ccdf4 100644 --- a/src/control/Script8.cpp +++ b/src/control/Script8.cpp @@ -55,7 +55,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) ((CPlayerPed*)pPed)->m_fMoveSpeed = 0.0f; else pPed->m_nStoredMoveState = PEDMOVE_STILL; - CAnimManager::AddAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_IDLE_STANCE); + CAnimManager::AddAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_STD_IDLE); pPed->bIsPedDieAnimPlaying = false; } return 0; @@ -346,7 +346,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) CollectParameters(&m_nIp, 1); CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]); script_assert(pPed); - UpdateCompareFlag(RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_DUCK_DOWN) != nil); + UpdateCompareFlag(RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_DUCK_DOWN) != nil); return 0; } case COMMAND_CREATE_DUST_EFFECT_FOR_CUTSCENE_HELI: |