summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-03 01:14:48 +0100
committerGitHub <noreply@github.com>2021-02-03 01:14:48 +0100
commitb47a23ab794e3520c6ec9d1ee19d3f4e3153494c (patch)
tree411b4fcc6a353de7809816672bf4197785f314fc /src/control
parentMerge pull request #1017 from IlDucci/master (diff)
parentUse original animation names from VCS (diff)
downloadre3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.gz
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.bz2
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.lz
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.xz
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.zst
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Phones.cpp10
-rw-r--r--src/control/Replay.cpp10
-rw-r--r--src/control/Script.cpp4
-rw-r--r--src/control/Script2.cpp2
-rw-r--r--src/control/Script3.cpp2
-rw-r--r--src/control/Script4.cpp6
-rw-r--r--src/control/Script5.cpp8
7 files changed, 21 insertions, 21 deletions
diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp
index f649d435..ef7ecead 100644
--- a/src/control/Phones.cpp
+++ b/src/control/Phones.cpp
@@ -58,9 +58,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 {
@@ -117,7 +117,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;
@@ -442,10 +442,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 2dd66333..d8b15385 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -457,7 +457,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
state->aFunctionCallbackID[i] = 0;
}
}else{
- state->aAnimId[i] = NUM_ANIMS;
+ state->aAnimId[i] = ANIM_STD_NUM;
state->aCurTime[i] = 0;
state->aSpeed[i] = 85;
state->aFunctionCallbackID[i] = 0;
@@ -484,7 +484,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
}
}
else {
- state->aAnimId2[i] = NUM_ANIMS;
+ state->aAnimId2[i] = ANIM_STD_NUM;
state->aCurTime2[i] = 0;
state->aSpeed2[i] = 85;
state->aFunctionCallbackID2[i] = 0;
@@ -558,7 +558,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){
+ if (blend > 0.0f && state->partAnimId != ANIM_STD_IDLE){
CAnimBlendAssociation* anim3 = CAnimManager::BlendAnimation(
(RpClump*)ped->m_rwObject, ASSOCGRP_STD, (AnimationId)state->partAnimId, 1000.0f);
anim3->SetCurrentTime(time);
@@ -578,7 +578,7 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt
assoc->SetBlend(0.0f, -1.0f);
#endif
for (int i = 0; i < NUM_MAIN_ANIMS_IN_REPLAY; i++) {
- if (state->aAnimId[i] == NUM_ANIMS)
+ if (state->aAnimId[i] == ANIM_STD_NUM)
continue;
#ifdef FIX_REPLAY_BUGS
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
@@ -607,7 +607,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] == ANIM_STD_NUM)
continue;
#ifdef FIX_REPLAY_BUGS
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index e70bd508..5598f3c9 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -4266,7 +4266,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
#ifdef FIX_BUGS
AnimationId anim = pVehicle->GetDriverAnim();
#else
- AnimationId anim = pVehicle->bLowVehicle ? ANIM_CAR_LSIT : ANIM_CAR_SIT;
+ AnimationId anim = pVehicle->bLowVehicle ? ANIM_STD_CAR_SIT_LO : ANIM_STD_CAR_SIT;
#endif
pPed->m_pVehicleAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, anim, 100.0f);
pPed->StopNonPartialAnims();
@@ -4309,7 +4309,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, 100.0f);
+ CAnimManager::BlendAnimation(pPlayer->m_pPed->GetClump(), pPlayer->m_pPed->m_animGroup, ANIM_STD_IDLE, 100.0f);
pPlayer->m_pPed->RestartNonPartialAnims();
AudioManager.PlayerJustLeftCar();
pos.z += pPlayer->m_pPed->GetDistanceFromCentreOfMassToBaseOfModel();
diff --git a/src/control/Script2.cpp b/src/control/Script2.cpp
index 9329b3bc..210b9327 100644
--- a/src/control/Script2.cpp
+++ b/src/control/Script2.cpp
@@ -913,7 +913,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
if (strcmp(m_abScriptName, "camera") == 0){
pPlayer->m_pPed->SetMoveSpeed(0.0f, 0.0f, 0.0f);
pPlayer->m_pPed->SetTurnSpeed(0.0f, 0.0f, 0.0f);
- CAnimManager::BlendAnimation((RpClump*)pPlayer->m_pPed->m_rwObject, pPlayer->m_pPed->m_animGroup, ANIM_IDLE_STANCE, 1000.0f);
+ CAnimManager::BlendAnimation((RpClump*)pPlayer->m_pPed->m_rwObject, pPlayer->m_pPed->m_animGroup, ANIM_STD_IDLE, 1000.0f);
}
}
return 0;
diff --git a/src/control/Script3.cpp b/src/control/Script3.cpp
index f49835db..ac88347b 100644
--- a/src/control/Script3.cpp
+++ b/src/control/Script3.cpp
@@ -417,7 +417,7 @@ int8 CRunningScript::ProcessCommands500To599(int32 command)
pPed->FlagToDestroyWhenNextProcessed();
}
else {
- pPed->SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f);
+ pPed->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f);
}
return 0;
}
diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp
index 40f9f2f1..93956ea2 100644
--- a/src/control/Script4.cpp
+++ b/src/control/Script4.cpp
@@ -68,7 +68,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
pPed->ApplyHeadShot(WEAPONTYPE_SNIPERRIFLE, pPed->GetNodePosition(PED_HEAD), true);
}
else {
- pPed->SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f);
+ pPed->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f);
}
return 0;
}
@@ -81,7 +81,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
pPed->ApplyHeadShot(WEAPONTYPE_SNIPERRIFLE, pPed->GetNodePosition(PED_HEAD), true);
}
else {
- pPed->SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f);
+ pPed->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f);
}
return 0;
}
@@ -793,7 +793,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, 100.0f);
+ CAnimManager::BlendAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_STD_IDLE, 100.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 b54d425c..464a77d8 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -2450,10 +2450,10 @@ bool CTheScripts::IsPlayerStopped(CPlayerInfo* pPlayer)
CPed* pPed = pPlayer->m_pPed;
if (pPed->bInVehicle)
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;
}