summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Bike.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-16 17:08:19 +0100
committerSergeanur <s.anureev@yandex.ua>2021-02-16 17:08:19 +0100
commite38467ef3affef25b83daf0c0c3b8a61f04e8a65 (patch)
tree3628aed1314f21147e7a46f3095fa341088d8044 /src/vehicles/Bike.cpp
parentfix mailbox particle (diff)
parentPR rules (diff)
downloadre3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.gz
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.bz2
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.lz
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.xz
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.tar.zst
re3-e38467ef3affef25b83daf0c0c3b8a61f04e8a65.zip
Diffstat (limited to 'src/vehicles/Bike.cpp')
-rw-r--r--src/vehicles/Bike.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp
index f8ef4746..761ea939 100644
--- a/src/vehicles/Bike.cpp
+++ b/src/vehicles/Bike.cpp
@@ -575,7 +575,7 @@ CBike::ProcessControl(void)
// Lean forward speed up
float savedAirResistance = m_fAirResistance;
if(GetStatus() == STATUS_PLAYER && pDriver){
- CAnimBlendAssociation *assoc = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_FWD);
+ CAnimBlendAssociation *assoc = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_LEANF);
if(assoc && assoc->blendAmount > 0.5f &&
assoc->currentTime > 0.06f && assoc->currentTime < 0.14f){
m_fAirResistance *= 0.6f;
@@ -1016,7 +1016,7 @@ CBike::ProcessControl(void)
// Process leaning
float idleAngle = 0.0f;
if(pDriver){
- CAnimBlendAssociation *assoc = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_STILL);
+ CAnimBlendAssociation *assoc = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_READY);
if(assoc)
idleAngle = DEGTORAD(10.0f) * assoc->blendAmount;
}
@@ -2037,35 +2037,35 @@ CBike::DoDriveByShootings(void)
if(lookingLeft || lookingRight || CPad::GetPad(0)->GetCarGunFired()){
if(lookingLeft){
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_LHS);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_RHS);
if(anim)
anim->blendDelta = -1000.0f;
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_FT);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_FORWARD);
if(anim)
anim->blendDelta = -1000.0f;
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_RHS);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_LHS);
if(anim == nil || anim->blendDelta < 0.0f)
- anim = CAnimManager::AddAnimation(pDriver->GetClump(), m_bikeAnimType, ANIM_BIKE_DRIVEBY_RHS);
+ anim = CAnimManager::AddAnimation(pDriver->GetClump(), m_bikeAnimType, ANIM_BIKE_DRIVEBY_LHS);
}else if(lookingRight){
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_RHS);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_LHS);
if(anim)
anim->blendDelta = -1000.0f;
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_FT);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_FORWARD);
if(anim)
anim->blendDelta = -1000.0f;
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_LHS);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_RHS);
if(anim == nil || anim->blendDelta < 0.0f)
- anim = CAnimManager::AddAnimation(pDriver->GetClump(), m_bikeAnimType, ANIM_BIKE_DRIVEBY_LHS);
+ anim = CAnimManager::AddAnimation(pDriver->GetClump(), m_bikeAnimType, ANIM_BIKE_DRIVEBY_RHS);
}else{
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_LHS);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_RHS);
if(anim)
anim->blendDelta = -1000.0f;
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_RHS);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_LHS);
if(anim)
anim->blendDelta = -1000.0f;
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_FT);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_FORWARD);
if(anim == nil || anim->blendDelta < 0.0f)
- anim = CAnimManager::AddAnimation(pDriver->GetClump(), m_bikeAnimType, ANIM_BIKE_DRIVEBY_FT);
+ anim = CAnimManager::AddAnimation(pDriver->GetClump(), m_bikeAnimType, ANIM_BIKE_DRIVEBY_FORWARD);
}
if (!anim || !anim->IsRunning()) {
@@ -2076,13 +2076,13 @@ CBike::DoDriveByShootings(void)
}
}else{
weapon->Reload();
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_RHS);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_LHS);
if(anim)
anim->blendDelta = -1000.0f;
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_LHS);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_RHS);
if(anim)
anim->blendDelta = -1000.0f;
- anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_FT);
+ anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_BIKE_DRIVEBY_FORWARD);
if(anim)
anim->blendDelta = -1000.0f;
}
@@ -2576,7 +2576,7 @@ CBike::PlayCarHorn(void)
void
CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBackOn)
{
- AnimationId anim = ANIM_KO_SHOT_FRONT1;
+ AnimationId anim = ANIM_STD_KO_FRONT;
if(ped == nil)
return;
@@ -2614,7 +2614,7 @@ CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBa
}
ped->SetPedState(PED_IDLE);
- CAnimManager::BlendAnimation(ped->GetClump(), ped->m_animGroup, ANIM_IDLE_STANCE, 100.0f);
+ CAnimManager::BlendAnimation(ped->GetClump(), ped->m_animGroup, ANIM_STD_IDLE, 100.0f);
ped->m_vehDoor = CAR_DOOR_LF;
CPed::PedSetOutCarCB(nil, ped);
ped->SetMoveState(PEDMOVE_STILL);
@@ -2628,14 +2628,14 @@ CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBa
case WEAPONTYPE_UNIDENTIFIED:
ped->m_vecMoveSpeed = m_vecMoveSpeed;
ped->m_pCollidingEntity = this;
- anim = NUM_STD_ANIMS;
+ anim = ANIM_STD_NUM;
break;
case WEAPONTYPE_BASEBALLBAT:
default:
switch(direction){
case 0:
- anim = ANIM_BIKE_FALL_R;
+ anim = ANIM_STD_BIKE_FALLBACK;
ped->m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.1f);
if(m_vecMoveSpeed.MagnitudeSqr() < SQR(0.3f))
ped->ApplyMoveForce(5.0f*GetUp() - 6.0f*GetForward());
@@ -2644,11 +2644,11 @@ CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBa
case 1:
case 2:
if(m_vecMoveSpeed.MagnitudeSqr() > SQR(0.3f)){
- anim = ANIM_KO_SPIN_R;
+ anim = ANIM_STD_HIGHIMPACT_LEFT;
ped->m_vecMoveSpeed = 0.3f*m_vecMoveSpeed;
ped->ApplyMoveForce(5.0f*GetUp() + 6.0f*GetRight());
}else{
- anim = ANIM_KD_LEFT;
+ anim = ANIM_STD_SPINFORWARD_LEFT;
ped->m_vecMoveSpeed = m_vecMoveSpeed;
ped->ApplyMoveForce(4.0f*GetUp() + 8.0f*GetRight());
}
@@ -2657,11 +2657,11 @@ CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBa
break;
case 3:
if(m_vecMoveSpeed.MagnitudeSqr() > SQR(0.3f)){
- anim = ANIM_KO_SPIN_L;
+ anim = ANIM_STD_HIGHIMPACT_RIGHT;
ped->m_vecMoveSpeed = 0.3f*m_vecMoveSpeed;
ped->ApplyMoveForce(5.0f*GetUp() - 6.0f*GetRight());
}else{
- anim = ANIM_KD_RIGHT;
+ anim = ANIM_STD_SPINFORWARD_RIGHT;
ped->m_vecMoveSpeed = m_vecMoveSpeed;
ped->ApplyMoveForce(4.0f*GetUp() - 8.0f*GetRight());
}
@@ -2673,7 +2673,7 @@ CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBa
case WEAPONTYPE_DROWNING:{
RwRGBA color;
- anim = ANIM_FALL_FALL;
+ anim = ANIM_STD_FALL;
ped->m_vecMoveSpeed = m_vecMoveSpeed*0.2f;
ped->m_vecMoveSpeed.z = 0.0f;
ped->m_pCollidingEntity = this;
@@ -2698,10 +2698,10 @@ CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBa
CGeneral::GetRandomNumberInRange(3.0f, 7.0f));
ped->m_pCollidingEntity = this;
switch(direction){
- case 0: anim = ANIM_KO_SKID_BACK; break;
- case 1: anim = ANIM_KD_RIGHT; break;
- case 2: anim = ANIM_BIKE_FALL_R; break;
- case 3: anim = ANIM_KD_LEFT; break;
+ case 0: anim = ANIM_STD_HIGHIMPACT_BACK; break;
+ case 1: anim = ANIM_STD_SPINFORWARD_RIGHT; break;
+ case 2: anim = ANIM_STD_BIKE_FALLBACK; break;
+ case 3: anim = ANIM_STD_SPINFORWARD_LEFT; break;
}
if(m_nWheelsOnGround == 0)
ped->bKnockedOffBike = true;
@@ -2717,10 +2717,10 @@ CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBa
CGeneral::GetRandomNumberInRange(minForceZ, maxForceZ));
ped->m_pCollidingEntity = this;
switch(direction){
- case 0: anim = ANIM_KO_SKID_BACK; break;
- case 1: anim = ANIM_KD_RIGHT; break;
- case 2: anim = ANIM_KO_SKID_FRONT; break;
- case 3: anim = ANIM_KD_LEFT; break;
+ case 0: anim = ANIM_STD_HIGHIMPACT_BACK; break;
+ case 1: anim = ANIM_STD_SPINFORWARD_RIGHT; break;
+ case 2: anim = ANIM_STD_HIGHIMPACT_FRONT; break;
+ case 3: anim = ANIM_STD_SPINFORWARD_LEFT; break;
}
ped->bKnockedOffBike = true;
if(ped->IsPlayer())
@@ -2735,7 +2735,7 @@ CBike::KnockOffRider(eWeaponType weapon, uint8 direction, CPed *ped, bool bGetBa
ped->bIsInTheAir = true;
ped->bIsInWater = true;
ped->bTouchingWater = true;
- CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_FALL_FALL, 4.0f);
+ CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_FALL, 4.0f);
}else if(weapon != WEAPONTYPE_UNARMED){
if(ped->m_fHealth > 0.0f)
ped->SetFall(1000, anim, 0);