summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/CopPed.cpp10
-rw-r--r--src/peds/EmergencyPed.cpp2
-rw-r--r--src/peds/Ped.cpp939
-rw-r--r--src/peds/Ped.h83
-rw-r--r--src/peds/PedAI.cpp545
-rw-r--r--src/peds/PedAttractor.cpp16
-rw-r--r--src/peds/PedDebug.cpp3
-rw-r--r--src/peds/PedFight.cpp432
-rw-r--r--src/peds/PlayerPed.cpp90
-rw-r--r--src/peds/Population.cpp68
10 files changed, 1429 insertions, 759 deletions
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp
index 9d22c98c..1efd7733 100644
--- a/src/peds/CopPed.cpp
+++ b/src/peds/CopPed.cpp
@@ -93,7 +93,7 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
m_nHassleTimer = 0;
field_61C = 0;
field_624 = 0;
- m_pStinger = new CStinger;
+ m_pStinger = new CStinger();
SetWeaponLockOnTarget(nil);
}
@@ -257,9 +257,9 @@ CCopPed::ArrestPlayer(void)
if (suspect && (suspect->m_nPedState == PED_ARRESTED || suspect->DyingOrDead() || suspect->EnteringCar())) {
- CAnimBlendAssociation *arrestAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ARREST_GUN);
+ CAnimBlendAssociation *arrestAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ARREST);
if (!arrestAssoc || arrestAssoc->blendDelta < 0.0f)
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ARREST_GUN, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ARREST, 4.0f);
CVector suspMidPos;
suspect->m_pedIK.GetComponentPosition(suspMidPos, PED_MID);
@@ -555,7 +555,7 @@ CCopPed::CopAI(void)
if (CWorld::GetIsLineOfSightClear(GetPosition(), nearPed->GetPosition(),
true, false, false, false, false, false, false)) {
- Say(SOUND_PED_COP_REACTION);
+ Say(SOUND_PED_COP_ASK_FOR_ID);
SetObjective(OBJECTIVE_HASSLE_CHAR, nearPed);
nearPed->SetObjective(OBJECTIVE_WAIT_ON_FOOT_FOR_COP, this);
m_nHassleTimer = CTimer::GetTimeInMilliseconds() + 100000;
@@ -747,7 +747,7 @@ CCopPed::ProcessControl(void)
}
if (m_pPointGunAt)
- Say(SOUND_PED_COP_UNK_129);
+ Say(SOUND_PED_COP_TARGETING);
if (m_bStopAndShootDisabledZone) {
bool dontShoot = false;
diff --git a/src/peds/EmergencyPed.cpp b/src/peds/EmergencyPed.cpp
index 62b70d7d..954c1c79 100644
--- a/src/peds/EmergencyPed.cpp
+++ b/src/peds/EmergencyPed.cpp
@@ -310,7 +310,7 @@ CEmergencyPed::MedicAI(void)
m_nEmergencyPedState = EMERGENCY_PED_STAND_STILL;
} else {
m_nEmergencyPedState = EMERGENCY_PED_FACE_TO_PATIENT;
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_MEDIC, ANIM_CPR, 4.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_MEDIC, ANIM_MEDIC_CPR, 4.0f);
bIsDucking = true;
}
SetLookTimer(2000);
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 1009a9b4..160b903c 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -53,10 +53,10 @@ bool CPed::bFannyMagnetCheat;
bool CPed::bPedCheat3;
CVector2D CPed::ms_vec2DFleePosition;
-void *CPed::operator new(size_t sz) { return CPools::GetPedPool()->New(); }
-void *CPed::operator new(size_t sz, int handle) { return CPools::GetPedPool()->New(handle); }
-void CPed::operator delete(void *p, size_t sz) { CPools::GetPedPool()->Delete((CPed*)p); }
-void CPed::operator delete(void *p, int handle) { CPools::GetPedPool()->Delete((CPed*)p); }
+void *CPed::operator new(size_t sz) throw() { return CPools::GetPedPool()->New(); }
+void *CPed::operator new(size_t sz, int handle) throw() { return CPools::GetPedPool()->New(handle); }
+void CPed::operator delete(void *p, size_t sz) throw() { CPools::GetPedPool()->Delete((CPed*)p); }
+void CPed::operator delete(void *p, int handle) throw() { CPools::GetPedPool()->Delete((CPed*)p); }
float gfTommyFatness = 1.0f;
@@ -317,7 +317,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
bCanGiveUpSunbathing = true;
m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this);
- DMAudio.SetEntityStatus(m_audioEntityId, true);
+ DMAudio.SetEntityStatus(m_audioEntityId, TRUE);
m_fearFlags = CPedType::GetThreats(m_nPedType);
m_threatEntity = nil;
m_eventOrThreat = CVector2D(0.0f, 0.0f);
@@ -424,7 +424,7 @@ CPed::SetModelIndex(uint32 mi)
SetPedStats(modelInfo->m_pedStatType);
m_headingRate = m_pedStats->m_headingChangeRate;
m_animGroup = (AssocGroupId) modelInfo->m_animGroup;
- CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE);
+ CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE);
if (!CanUseTorsoWhenLooking())
m_pedIK.m_flags |= CPedIK::LOOKAROUND_HEAD_ONLY;
@@ -615,7 +615,7 @@ CPed::SetMoveAnim(void)
CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_BLOCK);
if (!animAssoc) {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE);
if (!animAssoc)
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_MELEE_IDLE_FIGHTMODE);
@@ -623,24 +623,24 @@ CPed::SetMoveAnim(void)
return;
if (animAssoc) {
- CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE);
+ CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE);
if (!idleAssoc || idleAssoc->blendDelta <= 0.0f) {
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_IDLE_STANCE, 8.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_IDLE, 8.0f);
}
}
}
if (!animAssoc) {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED);
if (animAssoc)
if (m_nWaitState == WAITSTATE_STUCK || m_nWaitState == WAITSTATE_FINISH_FLEE)
return;
if (animAssoc) {
- CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE);
+ CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE);
if (!idleAssoc || idleAssoc->blendDelta <= 0.0f) {
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_IDLE_STANCE, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_IDLE, 4.0f);
}
}
}
@@ -662,20 +662,20 @@ CPed::SetMoveAnim(void)
switch (m_nMoveState) {
case PEDMOVE_STILL:
- animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_IDLE_STANCE, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_IDLE, 4.0f);
break;
case PEDMOVE_WALK:
- animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_WALK, 1.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_WALK, 1.0f);
break;
case PEDMOVE_RUN:
if (m_nPedState == PED_FLEE_ENTITY) {
- animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_RUN, 3.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_RUN, 3.0f);
} else {
- animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_RUN, 1.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_RUN, 1.0f);
}
break;
case PEDMOVE_SPRINT:
- animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_SPRINT, 1.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_RUNFAST, 1.0f);
break;
default:
break;
@@ -683,12 +683,12 @@ CPed::SetMoveAnim(void)
if (animAssoc) {
if (m_leader) {
- CAnimBlendAssociation *walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_WALK);
+ CAnimBlendAssociation *walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_STD_WALK);
if (!walkAssoc)
- walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_RUN);
+ walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_STD_RUN);
if (!walkAssoc)
- walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_SPRINT);
+ walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_STD_RUNFAST);
if (walkAssoc) {
animAssoc->speed = walkAssoc->speed;
@@ -1094,7 +1094,7 @@ CPed::MoveHeadToLook(void)
return;
bool handFreeToMove = false;
- AnimationId animToPlay = NUM_STD_ANIMS;
+ AnimationId animToPlay = ANIM_STD_NUM;
if (!GetWeapon()->IsType2Handed() && GetWeapon()->m_eWeaponType != WEAPONTYPE_ROCKETLAUNCHER)
handFreeToMove = true;
@@ -1107,18 +1107,18 @@ CPed::MoveHeadToLook(void)
#else
if (m_pedStats->m_temper < 49 || ((CPed*)m_pLookTarget)->m_nPedType == PEDTYPE_COP)
#endif
- animToPlay = ANIM_FUCKU;
+ animToPlay = ANIM_STD_PARTIAL_FUCKU;
else if(m_pedStats->m_temper < 47)
- animToPlay = ANIM_FIGHT_PPUNCH;
+ animToPlay = ANIM_STD_PARTIAL_PUNCH;
} else {
if (m_pedStats->m_temper > 49 || m_pLookTarget->GetModelIndex() == MI_POLICE)
- animToPlay = ANIM_FUCKU;
+ animToPlay = ANIM_STD_PARTIAL_FUCKU;
}
} else if (handFreeToMove && (CGeneral::GetRandomNumber() & 1)) {
- animToPlay = ANIM_FUCKU;
+ animToPlay = ANIM_STD_PARTIAL_FUCKU;
}
- if (animToPlay != NUM_STD_ANIMS) {
+ if (animToPlay != ANIM_STD_NUM) {
CAnimBlendAssociation *newAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animToPlay, 4.0f);
if (newAssoc) {
@@ -1427,10 +1427,10 @@ CPed::CalculateNewVelocity(void)
m_moved = CVector2D(-Sin(walkAngle), Cos(walkAngle)) * pedSpeed;
}
- CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE);
- CAnimBlendAssociation *fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE);
+ CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE);
+ CAnimBlendAssociation *fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE);
if(!fightAssoc)
- fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED);
+ fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED);
if(!fightAssoc)
fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_MELEE_IDLE_FIGHTMODE);
@@ -1609,7 +1609,7 @@ CPed::ProcessBuoyancy(void)
color.r = (0.5f * CTimeCycle::GetDirectionalRed() + CTimeCycle::GetAmbientRed()) * 127.5f;
color.g = (0.5f * CTimeCycle::GetDirectionalBlue() + CTimeCycle::GetAmbientBlue()) * 127.5f;
color.b = (0.5f * CTimeCycle::GetDirectionalGreen() + CTimeCycle::GetAmbientGreen()) * 127.5f;
- color.a = (CGeneral::GetRandomNumber() % 256 * 48.0f) + 48;
+ color.a = CGeneral::GetRandomNumberInRange(48.0f, 96.0f);
bIsInWater = true;
ApplyMoveForce(buoyancyImpulse);
if (!DyingOrDead()) {
@@ -1914,9 +1914,9 @@ CPed::ProcessControl(void)
} else {
if (m_nPedType != PEDTYPE_COP && neededTurn < DEGTORAD(15.0f) && m_nWaitState == WAITSTATE_FALSE) {
if ((m_nStoredMoveState == PEDMOVE_RUN || m_nStoredMoveState == PEDMOVE_SPRINT) && m_vecDamageNormal.z < 0.3f) {
- CAnimBlendAssociation *runAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN);
+ CAnimBlendAssociation *runAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUN);
if (!runAssoc)
- runAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SPRINT);
+ runAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNFAST);
if (runAssoc && runAssoc->blendAmount > 0.9f && runAssoc->IsRunning()) {
SetWaitState(WAITSTATE_HITWALL, nil);
@@ -2220,7 +2220,7 @@ CPed::ProcessControl(void)
bIsStanding = false;
CVector2D collidingEntMoveDir = -collidingVeh->m_vecMoveSpeed;
int dir = GetLocalDirection(collidingEntMoveDir);
- SetFall(1000, (AnimationId)(dir + ANIM_KO_SKID_FRONT), false);
+ SetFall(1000, (AnimationId)(dir + ANIM_STD_HIGHIMPACT_FRONT), false);
float damage;
if (collidingVeh->m_modelIndex == MI_TRAIN) {
@@ -2336,12 +2336,17 @@ CPed::ProcessControl(void)
}
uint8 flyDir = 0;
float feetZ = GetPosition().z - FEET_OFFSET;
- if ((obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ >= 500.0f) && (obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ <= feetZ)) {
- if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 499.0f)
- flyDir = 2;
- } else {
+#ifdef FIX_BUGS
+ if (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f)
flyDir = 1;
- }
+ else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 500.0f)
+ flyDir = 2;
+#else
+ if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ))
+ flyDir = 1;
+ else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 499.0f)
+ flyDir = 2;
+#endif
if (flyDir != 0 && !bHeadStuckInCollision) {
SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point));
@@ -2358,6 +2363,10 @@ CPed::ProcessControl(void)
forceDir.z = 4.0f;
ApplyMoveForce(forceDir);
+ // What was that for?? It pushes player inside of collision sometimes and kills him.
+#ifdef FIX_BUGS
+ if (!IsPlayer())
+#endif
GetMatrix().GetPosition() += 0.25f * offsetToCheck;
m_fRotationCur = CGeneral::GetRadianAngleBetweenPoints(offsetToCheck.x, offsetToCheck.y, 0.0f, 0.0f);
@@ -2366,14 +2375,14 @@ CPed::ProcessControl(void)
SetHeading(m_fRotationCur);
if (m_nPedState != PED_FALL && !bIsPedDieAnimPlaying) {
- SetFall(1000, ANIM_KO_SKID_BACK, true);
+ SetFall(1000, ANIM_STD_HIGHIMPACT_BACK, true);
}
bIsInTheAir = false;
} else if (m_vecDamageNormal.z > 0.4f) {
if (m_nPedState == PED_JUMP) {
if (m_nWaitTimer <= 2000) {
if (m_nWaitTimer < 1000)
- m_nWaitTimer += CTimer::GetTimeStep() * 0.02f * 1000.0f;
+ m_nWaitTimer += CTimer::GetTimeStepInMilliseconds();
} else {
m_nWaitTimer = 0;
}
@@ -2414,10 +2423,10 @@ CPed::ProcessControl(void)
m_fRotationCur = m_fRotationDest;
SetHeading(m_fRotationCur);
}
- CAnimBlendAssociation *jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_JUMP_GLIDE);
+ CAnimBlendAssociation *jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_JUMP_GLIDE);
if (!jumpAssoc)
- jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_GLIDE);
+ jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_GLIDE);
if (jumpAssoc) {
jumpAssoc->blendDelta = -3.0f;
@@ -2426,10 +2435,10 @@ CPed::ProcessControl(void)
if (m_nPedState == PED_JUMP)
m_nPedState = PED_IDLE;
} else {
- CAnimBlendAssociation *jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_JUMP_GLIDE);
+ CAnimBlendAssociation *jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_JUMP_GLIDE);
if (!jumpAssoc)
- jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_GLIDE);
+ jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_GLIDE);
if (jumpAssoc) {
jumpAssoc->blendDelta = -3.0f;
@@ -2560,27 +2569,27 @@ CPed::ProcessControl(void)
int16 padWalkX = pad->GetPedWalkLeftRight();
int16 padWalkY = pad->GetPedWalkUpDown();
if (Abs(padWalkX) > 0.0f || Abs(padWalkY) > 0.0f) {
- if (vehAnim == ANIM_CAR_OPEN_LHS || vehAnim == ANIM_CAR_OPEN_RHS || vehAnim == ANIM_COACH_OPEN_L || vehAnim == ANIM_COACH_OPEN_R ||
- vehAnim == ANIM_VAN_OPEN_L || vehAnim == ANIM_VAN_OPEN) {
+ if (vehAnim == ANIM_STD_CAR_OPEN_DOOR_LHS || vehAnim == ANIM_STD_CAR_OPEN_DOOR_RHS || vehAnim == ANIM_STD_COACH_OPEN_LHS || vehAnim == ANIM_STD_COACH_OPEN_RHS ||
+ vehAnim == ANIM_STD_VAN_OPEN_DOOR_REAR_LHS || vehAnim == ANIM_STD_VAN_OPEN_DOOR_REAR_RHS) {
if (!m_pMyVehicle->pDriver) {
cancelJack = false;
bCancelEnteringCar = true;
} else
cancelJack = true;
- } else if (vehAnim == ANIM_CAR_QJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f) {
+ } else if (vehAnim == ANIM_STD_QUICKJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f) {
cancelJack = true;
- } else if (vehAnim == ANIM_CAR_PULLOUT_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_RHS || vehAnim == ANIM_CAR_PULLOUT_RHS) {
+ } else if (vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LO_LHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LO_RHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_RHS) {
bCancelEnteringCar = true;
cancelJack = false;
}
}
- if (cancelJack && vehAnim == ANIM_CAR_QJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f && m_pVehicleAnim->GetTimeLeft() < 0.78f) {
+ if (cancelJack && vehAnim == ANIM_STD_QUICKJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f && m_pVehicleAnim->GetTimeLeft() < 0.78f) {
cancelJack = false;
QuitEnteringCar();
RestorePreviousObjective();
}
- if (cancelJack && (vehAnim == ANIM_CAR_PULLOUT_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_RHS || vehAnim == ANIM_CAR_PULLOUT_RHS)) {
+ if (cancelJack && (vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LO_LHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LO_RHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_RHS)) {
cancelJack = false;
bCancelEnteringCar = true;
}
@@ -2771,12 +2780,12 @@ CPed::ProcessControl(void)
break;
case PED_HANDS_UP:
if (m_pedStats->m_flags & STAT_GUN_PANIC) {
- if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HANDSCOWER)) {
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSCOWER);
+ if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HANDSCOWER)) {
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSCOWER);
Say(SOUND_PED_HANDS_COWER);
}
- } else if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HANDSUP)) {
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSUP);
+ } else if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HANDSUP)) {
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSUP);
Say(SOUND_PED_HANDS_UP);
}
break;
@@ -2971,7 +2980,7 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints)
upperSpeedLimit *= 2.0f;
lowerSpeedLimit *= 1.5f;
}
- CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FALL);
+ CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL);
if (!bWasStanding && speed > upperSpeedLimit && (!bPushedAlongByCar || m_vecMoveSpeed.z < lowerSpeedLimit)
&& m_pCollidingEntity != collidingEnt) {
@@ -3126,7 +3135,7 @@ CPed::PlayFootSteps(void)
static float animSections = 15.f;
float moveStart, soundVolume, skateTime;
- if (walkRunAssoc->animId == ANIM_WALK) {
+ if (walkRunAssoc->animId == ANIM_STD_WALK) {
moveStart = 0.0f;
skateTime = 8.f / 15.f;
} else {
@@ -3138,7 +3147,7 @@ CPed::PlayFootSteps(void)
if (CGeneral::GetRandomNumber() % 128) {
m_vecAnimMoveDelta *= 0.5f;
} else {
- SetFall(0, ANIM_KO_SKID_BACK, false);
+ SetFall(0, ANIM_STD_HIGHIMPACT_BACK, false);
}
soundVolume = 0.5f;
break;
@@ -3146,7 +3155,7 @@ CPed::PlayFootSteps(void)
if (CGeneral::GetRandomNumber() % 64) {
m_vecAnimMoveDelta *= 0.2f;
} else {
- SetFall(0, ANIM_KO_SKID_BACK, false);
+ SetFall(0, ANIM_STD_HIGHIMPACT_BACK, false);
}
soundVolume = 0.2f;
break;
@@ -3944,7 +3953,7 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg)
ped->RestorePreviousObjective();
else if (ped->m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE) {
ped->m_fHealth = 0.0f;
- ped->SetDie(ANIM_FLOOR_HIT, 4.0f, 0.5f);
+ ped->SetDie(ANIM_STD_HIT_FLOOR, 4.0f, 0.5f);
}
ped->bInVehicle = false;
@@ -4087,7 +4096,7 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg)
ped->bOnBoat = false;
if (ped->bBusJacked) {
- ped->SetFall(1500, ANIM_KO_SKID_BACK, false);
+ ped->SetFall(1500, ANIM_STD_HIGHIMPACT_BACK, false);
ped->bBusJacked = false;
}
ped->m_nStoredMoveState = PEDMOVE_NONE;
@@ -4113,13 +4122,13 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg)
CPed *ped = (CPed*)arg;
uint8 exitFlags = 0;
- quickJackedAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_CAR_QJACKED);
+ quickJackedAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_STD_QUICKJACKED);
if (dragAssoc && dragAssoc->animId == ANIM_BIKE_HIT && ped->m_pMyVehicle) {
if (ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_RF) {
- CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_BIKE_FALL_OFF, 100.0f);
+ CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_BIKE_FALLOFF, 100.0f);
ped->m_pMyVehicle->m_nGettingOutFlags &= ~(CAR_DOOR_FLAG_RF | CAR_DOOR_FLAG_LF);
} else {
- CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_BIKE_FALL_R, 100.0f);
+ CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_BIKE_FALLBACK, 100.0f);
ped->m_pMyVehicle->m_nGettingOutFlags &= ~(CAR_DOOR_FLAG_RR | CAR_DOOR_FLAG_LR);
}
((CBike*)ped->m_pMyVehicle)->KnockOffRider(WEAPONTYPE_UNIDENTIFIED, 0, ped, true);
@@ -4163,7 +4172,7 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg)
if (ped->m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE) {
dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped);
ped->m_fHealth = 0.0f;
- ped->SetDie(ANIM_FLOOR_HIT, 1000.0f, 0.5f);
+ ped->SetDie(ANIM_STD_HIT_FLOOR, 1000.0f, 0.5f);
return;
}
@@ -4172,7 +4181,7 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg)
} else {
dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped);
if (ped->CanSetPedState())
- CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f);
+ CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_GET_UP, 1000.0f);
}
ped->ReplaceWeaponWhenExitingVehicle();
@@ -4919,7 +4928,7 @@ CPed::PreRender(void)
if (Abs(speed.x) <= 0.05f && Abs(speed.y) <= 0.05f) {
if (!OnGround() && m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT) {
- if (!IsPedHeadAbovePos(0.3f) || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED)) {
+ if (!IsPedHeadAbovePos(0.3f) || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED)) {
doSplashUp = false;
}
} else
@@ -5104,11 +5113,11 @@ CPed::SetFall(int extraTime, AnimationId animId, uint8 evenIfNotInControl)
SetStoredState();
SetPedState(PED_FALL);
CAnimBlendAssociation *fallAssoc = nil;
- if (animId == NUM_STD_ANIMS) {
+ if (animId == ANIM_STD_NUM) {
if (IsPlayer()) {
- fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLOUT_LHS);
+ fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROLLOUT_LHS);
if (!fallAssoc)
- fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLOUT_RHS);
+ fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROLLOUT_RHS);
}
} else {
fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), animId);
@@ -5122,7 +5131,7 @@ CPed::SetFall(int extraTime, AnimationId animId, uint8 evenIfNotInControl)
else {
fallAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animId, 8.0f);
}
- if (animId == ANIM_BIKE_FALL_R)
+ if (animId == ANIM_STD_BIKE_FALLBACK)
fallAssoc->SetCurrentTime(0.4f);
}
@@ -5130,7 +5139,7 @@ CPed::SetFall(int extraTime, AnimationId animId, uint8 evenIfNotInControl)
m_getUpTimer = UINT32_MAX;
} else if (fallAssoc) {
if (IsPlayer()) {
- if (fallAssoc->animId == ANIM_CAR_ROLLOUT_LHS || fallAssoc->animId == ANIM_CAR_ROLLOUT_RHS) {
+ if (fallAssoc->animId == ANIM_STD_ROLLOUT_LHS || fallAssoc->animId == ANIM_STD_ROLLOUT_RHS) {
m_getUpTimer = 1000.0f * fallAssoc->hierarchy->totalLength
+ CTimer::GetTimeInMilliseconds()
- 1000.0f * fallAssoc->currentTime
@@ -5174,19 +5183,19 @@ CPed::Fall(void)
firstPartialAssoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_PARTIAL);
// What???
- if (firstPartialAssoc && (firstPartialAssoc->animId == ANIM_FALL_BACK || firstPartialAssoc->animId == ANIM_FALL_FRONT))
+ if (firstPartialAssoc && (firstPartialAssoc->animId == ANIM_STD_FALL_ONBACK || firstPartialAssoc->animId == ANIM_STD_FALL_ONFRONT))
fallAssoc = firstPartialAssoc;
else
- fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_BACK);
+ fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_ONBACK);
if (!fallAssoc)
- fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FRONT);
+ fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_ONFRONT);
if (!fallAssoc && firstPartialAssoc && 0.8f * firstPartialAssoc->hierarchy->totalLength < firstPartialAssoc->currentTime) {
if (firstPartialAssoc->flags & ASSOC_FRONTAL) {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_FRONT, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_ONFRONT, 8.0f);
} else {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_BACK, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_ONBACK, 8.0f);
}
} else if (fallAssoc && fallAssoc->blendAmount > 0.3f && fallAssoc->blendDelta >= 0.0f) {
float time = fallAssoc->currentTime;
@@ -5197,10 +5206,10 @@ CPed::Fall(void)
}
}
} else if ((bKnockedUpIntoAir || bKnockedOffBike) && bIsStanding && !bWasStanding) {
- fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_BACK);
+ fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_ONBACK);
if (!fallAssoc)
- fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FRONT);
+ fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_ONFRONT);
if (fallAssoc) {
bKnockedUpIntoAir = false;
@@ -5247,7 +5256,7 @@ CPed::SetInTheAir(void)
return;
bIsInTheAir = true;
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_GLIDE, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_GLIDE, 4.0f);
if (m_nPedState == PED_ATTACK) {
ClearAttack();
@@ -5273,9 +5282,9 @@ CPed::InTheAir(void)
if (CWorld::ProcessLineOfSight(ourPos, bitBelow, foundCol, foundEnt, true, true, false, true, false, false, false)) {
if (GetPosition().z - foundCol.point.z < 1.3f || bIsStanding)
SetLanding();
- } else if (m_nPedState != PED_ABSEIL && !RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FALL)) {
+ } else if (m_nPedState != PED_ABSEIL && !RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL)) {
if (m_vecMoveSpeed.z < -0.1f)
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_FALL, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL, 4.0f);
}
}
}
@@ -5287,7 +5296,7 @@ CPed::SetLanding(void)
if (DyingOrDead())
return;
- CAnimBlendAssociation *fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FALL);
+ CAnimBlendAssociation *fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL);
CAnimBlendAssociation *landAssoc;
if (fallAssoc && bIsDrowning)
@@ -5295,7 +5304,7 @@ CPed::SetLanding(void)
RpAnimBlendClumpSetBlendDeltas(GetClump(), ASSOC_PARTIAL, -1000.0f);
if (fallAssoc || m_nPedType == PEDTYPE_COP && bKnockedUpIntoAir) {
- landAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_COLLAPSE);
+ landAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_COLLAPSE);
DMAudio.PlayOneShot(m_audioEntityId, SOUND_FALL_COLLAPSE, 1.0f);
if (IsPlayer())
@@ -5307,7 +5316,7 @@ CPed::SetLanding(void)
}
} else {
- landAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_LAND);
+ landAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_LAND);
DMAudio.PlayOneShot(m_audioEntityId, SOUND_FALL_LAND, 1.0f);
}
@@ -5355,12 +5364,12 @@ CPed::SetGetUp(void)
m_pCollidingEntity = nil;
bKnockedUpIntoAir = false;
bKnockedOffBike = false;
- CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SPRINT);
+ CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNFAST);
if (animAssoc) {
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN)) {
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_RUN, 8.0f);
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUN)) {
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_RUN, 8.0f);
} else {
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 8.0f);
}
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
}
@@ -5370,19 +5379,19 @@ CPed::SetGetUp(void)
// Seemingly they planned to use different getup anims for different conditions, but sadly in final game all getup anims(GETUP1, GETUP2, GETUP3) are same...
if (bFleeWhenStanding && m_threatEx)
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GET_UP, 1000.0f);
else
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GET_UP, 1000.0f);
} else if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL))
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_GETUP_FRONT, 1000.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GET_UP_FRONT, 1000.0f);
else
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GET_UP, 1000.0f);
animAssoc->SetFinishCallback(PedGetupCB, this);
} else {
m_fHealth = 0.0f;
- SetDie(NUM_STD_ANIMS, 4.0f, 0.0f);
+ SetDie(ANIM_STD_NUM, 4.0f, 0.0f);
}
}
@@ -6768,7 +6777,7 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType)
if (neededTurn <= DEGTORAD(90.0f) || veh->GetModelIndex() == MI_RCBANDIT || vehPressedHorn || animType != 0) {
SetLookFlag(veh, true);
if ((CGeneral::GetRandomNumber() & 1) && veh->GetModelIndex() != MI_RCBANDIT && animType == 0) {
- stepAnim = ANIM_IDLE_TAXI;
+ stepAnim = ANIM_STD_HAILTAXI;
} else {
float vehDirection = CGeneral::GetRadianAngleBetweenPoints(
@@ -6791,11 +6800,11 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType)
else
angleToFace = vehDirection + HALFPI;
- stepAnim = NUM_STD_ANIMS;
+ stepAnim = ANIM_STD_NUM;
if (animType == 0 || animType == 1)
- stepAnim = ANIM_EV_STEP;
+ stepAnim = ANIM_STD_EVADE_STEP;
else if (animType == 2)
- stepAnim = ANIM_HANDSCOWER;
+ stepAnim = ANIM_STD_HANDSCOWER;
}
if (!RpAnimBlendClumpGetAssociation(GetClump(), stepAnim)) {
CAnimBlendAssociation *stepAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, stepAnim, 8.0f);
@@ -6904,11 +6913,11 @@ CPed::SetEvasiveDive(CPhysical *reason, uint8 onlyRandomJump)
ClearLookFlag();
ClearAimFlag();
SetLookFlag(reason, true);
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HANDSUP);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HANDSUP);
if (animAssoc)
return;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSUP, 8.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSUP, 8.0f);
animAssoc->flags &= ~ASSOC_DELETEFADEDOUT;
animAssoc->SetFinishCallback(PedEvadeCB, this);
SetStoredState();
@@ -6919,7 +6928,7 @@ CPed::SetEvasiveDive(CPhysical *reason, uint8 onlyRandomJump)
ClearAimFlag();
SetStoredState();
SetPedState(PED_DIVE_AWAY);
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_EV_DIVE, 8.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_EVADE_DIVE, 8.0f);
animAssoc->SetFinishCallback(PedEvadeCB, this);
}
@@ -6942,7 +6951,7 @@ CPed::PedEvadeCB(CAnimBlendAssociation* animAssoc, void* arg)
if (ped->m_nPedState == PED_DIVE_AWAY || ped->m_nPedState == PED_STEP_AWAY)
ped->RestorePreviousState();
- } else if (animAssoc->animId == ANIM_EV_DIVE) {
+ } else if (animAssoc->animId == ANIM_STD_EVADE_DIVE) {
ped->bUpdateAnimHeading = true;
ped->ClearLookFlag();
if (ped->m_nPedState == PED_DIVE_AWAY) {
@@ -7002,7 +7011,7 @@ CPed::SetDie(AnimationId animId, float delta, float speed)
}
SetPedState(PED_DIE);
- if (animId == NUM_STD_ANIMS) {
+ if (animId == ANIM_STD_NUM) {
bIsPedDieAnimPlaying = false;
} else {
dieAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animId, delta);
@@ -7024,7 +7033,7 @@ CPed::SetDie(AnimationId animId, float delta, float speed)
StopNonPartialAnims();
m_bloodyFootprintCountOrDeathTime = CTimer::GetTimeInMilliseconds();
- if (!CGame::nastyGame && animId == ANIM_FLOOR_HIT) {
+ if (!CGame::nastyGame && animId == ANIM_STD_HIT_FLOOR) {
if (dieAssoc) {
dieAssoc->SetCurrentTime(dieAssoc->hierarchy->totalLength - 0.01f);
dieAssoc->SetRun();
@@ -7044,7 +7053,7 @@ CPed::FinishDieAnimCB(CAnimBlendAssociation *animAssoc, void *arg)
void
CPed::SetDead(void)
{
- if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DROWN))
+ if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DROWN))
bUsesCollision = false;
m_fHealth = 0.0f;
@@ -7121,7 +7130,7 @@ CPed::Chat(void)
}
if (bIsTalking) {
if (CGeneral::GetRandomNumber() < 512) {
- CAnimBlendAssociation *chatAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT);
+ CAnimBlendAssociation *chatAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT);
if (chatAssoc) {
chatAssoc->blendDelta = -4.0f;
chatAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -7133,10 +7142,10 @@ CPed::Chat(void)
} else {
if (CGeneral::GetRandomNumber() < 20 && !RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_IDLE)) {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_XPRESS_SCRATCH, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_XPRESS_SCRATCH, 4.0f);
}
if (!bIsTalking && !RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_IDLE)) {
- CAnimBlendAssociation *chatAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_CHAT, 4.0f);
+ CAnimBlendAssociation *chatAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CHAT, 4.0f);
float chatTime = CGeneral::GetRandomNumberInRange(0.0f, 3.0f);
chatAssoc->SetCurrentTime(chatTime);
@@ -7153,7 +7162,7 @@ CPed::Chat(void)
void
CPed::ClearChat(void)
{
- CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT);
+ CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -7233,7 +7242,7 @@ StartTalkingOnMobileCB(CAnimBlendAssociation* assoc, void* arg)
{
CPed* ped = (CPed*)arg;
if (ped->m_nPedState == PED_ANSWER_MOBILE)
- CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_PHONE_TALK, 4.0f);
+ CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_TALK, 4.0f);
}
void
@@ -7254,7 +7263,7 @@ CPed::SetAnswerMobile(void)
if (m_nPedState != PED_ANSWER_MOBILE && !DyingOrDead()) {
SetPedState(PED_ANSWER_MOBILE);
RemoveWeaponAnims(GetWeapon()->m_eWeaponType, -4.0f);
- CAnimBlendAssociation *assoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_PHONE_IN, 4.0f);
+ CAnimBlendAssociation *assoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_IN, 4.0f);
assoc->SetFinishCallback(StartTalkingOnMobileCB, this);
m_lookTimer = INT32_MAX;
if (m_storedWeapon == WEAPONTYPE_UNIDENTIFIED)
@@ -7270,8 +7279,8 @@ CPed::ClearAnswerMobile(void)
if (m_nLastPedState == PED_ANSWER_MOBILE)
m_nLastPedState = PED_NONE;
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_PHONE_TALK)) {
- CAnimBlendAssociation *assoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_PHONE_OUT, 8.0f);
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_PHONE_TALK)) {
+ CAnimBlendAssociation *assoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_OUT, 8.0f);
assoc->SetFinishCallback(FinishTalkingOnMobileCB, this);
} else
FinishTalkingOnMobileCB(nil, this);
@@ -7289,9 +7298,9 @@ CPed::AnswerMobile(void)
if (!IsPedInControl())
return;
- CAnimBlendAssociation *phoneInAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_PHONE_IN);
- CAnimBlendAssociation *phoneOutAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_PHONE_OUT);
- CAnimBlendAssociation *phoneTalkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_PHONE_TALK);
+ CAnimBlendAssociation *phoneInAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_PHONE_IN);
+ CAnimBlendAssociation *phoneOutAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_PHONE_OUT);
+ CAnimBlendAssociation *phoneTalkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_PHONE_TALK);
if (phoneInAssoc || phoneTalkAssoc || phoneOutAssoc) {
if (phoneInAssoc) {
if (phoneInAssoc->currentTime >= 0.85f && !m_pWeaponModel) {
@@ -7311,7 +7320,7 @@ CPed::AnswerMobile(void)
}
}
} else {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_PHONE_TALK, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_TALK, 4.0f);
}
}
@@ -7672,27 +7681,27 @@ CPed::SetPedPositionInCar(void)
if (bChangedSeat) {
if (m_pMyVehicle->IsBike()) {
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_JUMPON_R)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_JUMPON_L)
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_JUMPON_LHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_JUMPON_RHS)
|| RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_KICK)) {
LineUpPedWithCar(LINE_UP_TO_CAR_START);
return;
}
bChangedSeat = false;
} else {
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_GETIN_LHS)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_GETIN_LOW_LHS)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_CLOSEDOOR_LHS)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_CLOSEDOOR_LOW_LHS)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SHUFFLE_RHS)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LSHUFFLE_RHS)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_VAN_CLOSE_L)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_VAN_CLOSE)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_VAN_GETIN_L)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_VAN_GETIN)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_COACH_IN_L)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_COACH_IN_R)
- || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_JUMPIN_LHS)) {
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_GET_IN_LHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_GET_IN_LO_LHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_CLOSE_DOOR_LHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_CLOSE_DOOR_LO_LHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SHUFFLE_RHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SHUFFLE_LO_RHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_VAN_GET_IN_REAR_LHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_VAN_GET_IN_REAR_RHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_COACH_GET_IN_LHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_COACH_GET_IN_RHS)
+ || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_JUMP_IN_LO_LHS)) {
notYet = true;
}
}
@@ -7752,26 +7761,40 @@ CPed::SetPedPositionInCar(void)
} else {
m_fRotationCur = m_pMyVehicle->GetForward().Heading();
}
- GetMatrix() = newMat;
+ SetMatrix(newMat);
}
void
CPed::LookForSexyPeds(void)
{
if ((!IsPedInControl() && m_nPedState != PED_DRIVING)
- || m_lookTimer >= CTimer::GetTimeInMilliseconds() || m_nPedType != PEDTYPE_CIVMALE)
+ || m_lookTimer >= CTimer::GetTimeInMilliseconds() ||
+#ifdef FIX_BUGS
+ (m_nPedType != PEDTYPE_CIVMALE) && !IsFemale() && (m_nPedType != PEDTYPE_CRIMINAL) && !IsGangMember()
+#else
+ m_nPedType != PEDTYPE_CIVMALE
+#endif
+ )
return;
for (int i = 0; i < m_numNearPeds; i++) {
if (CanSeeEntity(m_nearPeds[i])) {
if ((GetPosition() - m_nearPeds[i]->GetPosition()).Magnitude() < 10.0f) {
CPed *nearPed = m_nearPeds[i];
- if ((nearPed->m_pedStats->m_sexiness > m_pedStats->m_sexiness)
- && nearPed->m_nPedType == PEDTYPE_CIVFEMALE) {
+ if((nearPed->m_pedStats->m_sexiness > m_pedStats->m_sexiness)
+#ifdef FIX_BUGS
+ && ((IsFemale() && !nearPed->IsFemale()) || (!IsFemale() && nearPed->IsFemale()))) {
+#else
+ && nearPed->m_nPedType == PEDTYPE_CIVFEMALE) {
+#endif
SetLookFlag(nearPed, true);
m_lookTimer = CTimer::GetTimeInMilliseconds() + 4000;
- Say(SOUND_PED_CHAT_SEXY);
+#ifdef FIX_BUGS
+ Say(IsFemale() ? SOUND_PED_CHAT_SEXY_FEMALE : SOUND_PED_CHAT_SEXY_MALE);
+#else
+ Say(SOUND_PED_CHAT_SEXY_MALE);
+#endif
return;
}
}
@@ -7999,14 +8022,14 @@ CPed::ClearWaitState(void)
case WAITSTATE_USE_ATM:
if (CTimer::GetTimeInMilliseconds() <= m_nWaitTimer) {
if (m_nWaitState == WAITSTATE_USE_ATM) {
- assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATM);
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ATM);
if (assoc)
assoc->blendDelta = -8.0f;
if (m_attractor)
GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
} else if (m_nWaitState == WAITSTATE_PLAYANIM_CHAT) {
- assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT);
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT);
if (assoc)
assoc->blendDelta = -8.0f;
if (m_attractor)
@@ -8015,17 +8038,17 @@ CPed::ClearWaitState(void)
} else if (m_nWaitState == WAITSTATE_SIT_DOWN || m_nWaitState == WAITSTATE_SIT_DOWN_RVRS || m_nWaitState == WAITSTATE_SIT_IDLE || m_nWaitState == WAITSTATE_SIT_UP) {
switch (m_nWaitState) {
case WAITSTATE_SIT_DOWN:
- assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SEAT_DOWN);
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_SEAT_DOWN);
if (assoc)
assoc->blendDelta = -8.0f;
break;
case WAITSTATE_SIT_IDLE:
- assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SEAT_IDLE);
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_SEAT_IDLE);
if (assoc)
assoc->blendDelta = -8.0f;
break;
case WAITSTATE_SIT_UP:
- assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SEAT_UP);
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_SEAT_UP);
if (assoc)
assoc->blendDelta = -8.0f;
break;
@@ -8051,12 +8074,12 @@ CPed::ClearWaitState(void)
break;
}
case WAITSTATE_FAST_FALL:
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_KO_SKID_FRONT))
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HIGHIMPACT_FRONT))
SetGetUp();
break;
case WAITSTATE_BOMBER:
- assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BOMBER);
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DETONATE);
if (assoc)
assoc->blendDelta = -8.0f;
break;
@@ -8074,15 +8097,71 @@ CPed::ClearWaitState(void)
break;
}
case WAITSTATE_LANCESITTING:
- assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SUNBATHE);
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SUNBATHE_IDLE);
if (assoc)
assoc->blendDelta = -8.0f;
break;
case WAITSTATE_PLAYANIM_HANDSUP_SIMPLE:
- assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HANDSUP);
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HANDSUP);
if (assoc)
assoc->blendDelta = -8.0f;
break;
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE:
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP:
+ case WAITSTATE_CS_MISC_IDLE_NO:
+ case WAITSTATE_CS_MISC_IDLE_YES:
+ case WAITSTATE_CS_MISC_IDLE_CHAT2:
+ case WAITSTATE_CS_MISC_IDLE_COUGH:
+ case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE:
+ case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT:
+ case WAITSTATE_DONH2_CAMERA:
+ case WAITSTATE_JDT2_ANXIOUS_TALK:
+ case WAITSTATE_JDT2_SHRUG:
+ case WAITSTATE_JDT4_DILDO_TALK:
+ case WAITSTATE_JDT5_CALM_DOWN:
+ case WAITSTATE_JDT5_POINT:
+ case WAITSTATE_JDT6_PICKUP:
+ case WAITSTATE_MAR1_SKIRT:
+ case WAITSTATE_MAR2_CELL_ANSWER:
+ case WAITSTATE_MAR2_CELL_END:
+ case WAITSTATE_MAR2_CELL_TALK:
+ case WAITSTATE_MAR2_FOOT_TAP:
+ case WAITSTATE_MAR3_HOOCHY:
+ case WAITSTATE_MAR3_NOTE_IDLE:
+ case WAITSTATE_MAR3_NOTE_PICKUP:
+ case WAITSTATE_SAL1_BIREFCASE_DOWN:
+ case WAITSTATE_SAL2_IDLE_SEATED:
+ case WAITSTATE_SAL2_SEAT_TO_STAND:
+ case WAITSTATE_SAL3_SEATED_TALK:
+ case WAITSTATE_SAL3_SEATED_IDLE:
+ case WAITSTATE_SAL4_DUST_DOWN:
+ case WAITSTATE_SAL4_GIRL_RUN:
+ case WAITSTATE_SAL6_ANGRY_SEATED:
+ case WAITSTATE_SAL6_IDLE_SEATED:
+ case WAITSTATE_SAL7_LOOKOUT:
+ case WAITSTATE_VIC2_POINT_ANGRY:
+ case WAITSTATE_VIC3_WAFT:
+ case WAITSTATE_VIC3_PICKUP_ROLL:
+ case WAITSTATE_VIC4_CARRY_BOX:
+ case WAITSTATE_VIC4_CELL_LOOK:
+ case WAITSTATE_VIC4_CRATE_IDLE:
+ case WAITSTATE_VIC6_CELL_ANGRY:
+ case WAITSTATE_TOURIST3:
+ case WAITSTATE_TOURIST2:
+ case WAITSTATE_TOURIST1:
+ case WAITSTATE_MAC2_PLEAD:
+ case WAITSTATE_JDT6_KNOCK:
+ case WAITSTATE_SAL3_SIT_DOWN:
+ case WAITSTATE_VIC7_PROD_WITH_FOOT:
+ assoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_IDLE);
+ if (assoc)
+ assoc->Remove();
+ break;
+ case WAITSTATE_DONH3_HAPPY:
+ assoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DONH3_HAPPY);
+ if (assoc)
+ assoc->blendDelta = -1.0f;
+ break;
default:
break;
}
@@ -8090,10 +8169,10 @@ CPed::ClearWaitState(void)
}
void
-CPed::SetWaitState(eWaitState state, void *time)
+CPed::SetWaitState(eWaitState state, void *time, bool repeat)
{
- AnimationId waitAnim = NUM_STD_ANIMS;
- CAnimBlendAssociation *animAssoc;
+ AnimationId waitAnim = ANIM_STD_NUM;
+ CAnimBlendAssociation *animAssoc = nil;
if (!IsPedInControl())
return;
@@ -8111,10 +8190,10 @@ CPed::SetWaitState(eWaitState state, void *time)
break;
case WAITSTATE_CROSS_ROAD:
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 1000;
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_HBHB, 4.0f);
break;
case WAITSTATE_CROSS_ROAD_LOOK:
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ROAD_CROSS, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROADCROSS, 8.0f);
if (time)
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
@@ -8132,7 +8211,7 @@ CPed::SetWaitState(eWaitState state, void *time)
case WAITSTATE_DOUBLEBACK:
m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 3500;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_HBHB, 4.0f);
#ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif
@@ -8140,7 +8219,7 @@ CPed::SetWaitState(eWaitState state, void *time)
case WAITSTATE_HITWALL:
m_headingRate = 2.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HIT_WALL, 16.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_WALL, 16.0f);
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
animAssoc->flags |= ASSOC_FADEOUTWHENDONE;
animAssoc->SetDeleteCallback(FinishedWaitCB, this);
@@ -8154,13 +8233,13 @@ CPed::SetWaitState(eWaitState state, void *time)
case WAITSTATE_TURN180:
m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_TURN_180, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_TURN180, 4.0f);
animAssoc->SetFinishCallback(FinishedWaitCB, this);
break;
case WAITSTATE_SURPRISE:
m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2000;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HIT_WALL, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_WALL, 4.0f);
animAssoc->SetFinishCallback(FinishedWaitCB, this);
break;
case WAITSTATE_STUCK:
@@ -8168,7 +8247,7 @@ CPed::SetWaitState(eWaitState state, void *time)
SetMoveAnim();
m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 4.0f);
#ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif
@@ -8185,20 +8264,20 @@ CPed::SetWaitState(eWaitState state, void *time)
SetMoveAnim();
m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_HBHB, 4.0f);
#ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif
break;
case WAITSTATE_PLAYANIM_COWER:
- waitAnim = ANIM_HANDSCOWER;
+ waitAnim = ANIM_STD_HANDSCOWER;
case WAITSTATE_PLAYANIM_HANDSUP:
- if (waitAnim == NUM_STD_ANIMS)
- waitAnim = ANIM_HANDSUP;
+ if (waitAnim == ANIM_STD_NUM)
+ waitAnim = ANIM_STD_HANDSUP;
case WAITSTATE_PLAYANIM_HANDSCOWER:
- if (waitAnim == NUM_STD_ANIMS)
- waitAnim = ANIM_HANDSCOWER;
+ if (waitAnim == ANIM_STD_NUM)
+ waitAnim = ANIM_STD_HANDSCOWER;
m_headingRate = 0.0f;
if (time)
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
@@ -8209,13 +8288,13 @@ CPed::SetWaitState(eWaitState state, void *time)
animAssoc->SetDeleteCallback(FinishedWaitCB, this);
break;
case WAITSTATE_PLAYANIM_DUCK:
- waitAnim = ANIM_DUCK_DOWN;
+ waitAnim = ANIM_STD_DUCK_DOWN;
case WAITSTATE_PLAYANIM_TAXI:
- if (waitAnim == NUM_STD_ANIMS)
- waitAnim = ANIM_IDLE_TAXI;
+ if (waitAnim == ANIM_STD_NUM)
+ waitAnim = ANIM_STD_HAILTAXI;
case WAITSTATE_PLAYANIM_CHAT:
- if (waitAnim == NUM_STD_ANIMS)
- waitAnim = ANIM_IDLE_CHAT;
+ if (waitAnim == ANIM_STD_NUM)
+ waitAnim = ANIM_STD_CHAT;
if (time)
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
else
@@ -8231,23 +8310,23 @@ CPed::SetWaitState(eWaitState state, void *time)
SetMoveAnim();
m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2500;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 4.0f);
#ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif
break;
case WAITSTATE_SIT_DOWN:
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_SEAT_DOWN, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_SEAT_DOWN, 4.0f);
animAssoc->SetFinishCallback(FinishedWaitCB, this);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 100000;
break;
case WAITSTATE_SIT_UP:
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_SEAT_UP, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_SEAT_UP, 4.0f);
animAssoc->SetFinishCallback(FinishedWaitCB, this);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 100000;
break;
case WAITSTATE_SIT_IDLE:
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_SEAT_IDLE, 128.f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_SEAT_IDLE, 128.f);
animAssoc->SetFinishCallback(FinishedWaitCB, this);
if (time)
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
@@ -8255,7 +8334,7 @@ CPed::SetWaitState(eWaitState state, void *time)
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(25000, 30000);
break;
case WAITSTATE_USE_ATM:
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ATM, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ATM, 4.0f);
animAssoc->SetFinishCallback(FinishedWaitCB, this);
if (time)
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
@@ -8264,15 +8343,15 @@ CPed::SetWaitState(eWaitState state, void *time)
break;
case WAITSTATE_SUN_BATHE_IDLE:
m_headingRate = 0.0f;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_SUNBATHE, ANIM_SUNBATHE, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_SUNBATHE, ANIM_SUNBATHE_IDLE, 4.0f);
animAssoc->SetDeleteCallback(DeleteSunbatheIdleAnimCB, this);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(50000, 100000);
break;
case WAITSTATE_FAST_FALL:
- SetFall(-1, ANIM_KO_SKID_FRONT, true);
+ SetFall(-1, ANIM_STD_HIGHIMPACT_FRONT, true);
break;
case WAITSTATE_BOMBER:
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_BOMBER, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DETONATE, 4.0f);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
break;
case WAITSTATE_GROUND_ATTACK:
@@ -8291,27 +8370,208 @@ CPed::SetWaitState(eWaitState state, void *time)
break;
}
case WAITSTATE_LANCESITTING:
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_LANCE, ANIM_SUNBATHE, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_LANCE, ANIM_SUNBATHE_IDLE, 4.0f);
break;
case WAITSTATE_PLAYANIM_HANDSUP_SIMPLE:
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSUP, 4.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSUP, 4.0f);
animAssoc->flags &= ~ASSOC_FADEOUTWHENDONE;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
animAssoc->SetDeleteCallback(FinishedWaitCB, this);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time;
break;
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_MPNOTE, ANIM_MULTIPLAYER_CUTSCENE_MPNOTE, 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_MPNOTE, ANIM_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP, 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_CS_MISC_IDLE_NO:
+ case WAITSTATE_CS_MISC_IDLE_YES:
+ case WAITSTATE_CS_MISC_IDLE_CHAT2:
+ case WAITSTATE_CS_MISC_IDLE_COUGH:
+ case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE:
+ case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_CSMISC,
+ (AnimationId)(ANIM_CS_MISC_IDLE_LOOK + (int)(state - WAITSTATE_CS_MISC_IDLE_LOOK)), 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_DONH2_CAMERA:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_DONH2, ANIM_DONH2_CAMERA, 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_DONH3_HAPPY:
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_DONH3, ANIM_DONH3_HAPPY, 1.0f);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT2_ANXIOUS_TALK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT2, ANIM_JDT2_ANXIOUS_TALK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT2_SHRUG:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT2, ANIM_JDT2_SHRUG);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT4_DILDO_TALK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT4, ANIM_JDT4_DILDO_TALK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT5_CALM_DOWN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT5, ANIM_JDT5_CALM_DOWN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT5_POINT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT5, ANIM_JDT5_POINT);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT6_PICKUP:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT6, ANIM_JDT6_PICKUP);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR1_SKIRT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR1, ANIM_MAR1_SKIRT);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR2_CELL_ANSWER:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_ANSWER);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR2_CELL_END:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_END);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR2_CELL_TALK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_CELL_TALK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR2_FOOT_TAP:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR2, ANIM_MAR2_FOOT_TAP);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR3_HOOCHY:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_HOOCHY);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR3_NOTE_IDLE:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_NOTE_IDLE);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAR3_NOTE_PICKUP:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAR3, ANIM_MAR3_NOTE_PICKUP);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL1_BIREFCASE_DOWN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL1, ANIM_SAL1_BIREFCASE_DOWN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL2_IDLE_SEATED:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL2, ANIM_SAL2_IDLE_SEATED);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL2_SEAT_TO_STAND:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL2, ANIM_SAL2_SEAT_TO_STAND);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL3_SEATED_TALK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SEATED_TALK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL3_SEATED_IDLE:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SEATED_IDLE);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL4_DUST_DOWN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL4, ANIM_SAL4_DUST_DOWN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL4_GIRL_RUN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL4, ANIM_SAL4_GIRL_RUN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL6_ANGRY_SEATED:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL6, ANIM_SAL6_ANGRY_SEATED);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL6_IDLE_SEATED:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL6, ANIM_SAL6_IDLE_SEATED);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL7_LOOKOUT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL7, ANIM_SAL7_LOOKOUT);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC2_POINT_ANGRY:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC2, ANIM_VIC2_POINT_ANGRY);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC3_WAFT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC3, ANIM_VIC3_WAFT);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC3_PICKUP_ROLL:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC3, ANIM_VIC3_PICKUP_ROLL);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC4_CARRY_BOX:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CARRY_BOX);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC4_CELL_LOOK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CELL_LOOK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC4_CRATE_IDLE:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC4, ANIM_VIC4_CRATE_IDLE);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC6_CELL_ANGRY:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC6, ANIM_VIC6_CELL_ANGRY);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_TOURIST3:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST3);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_TOURIST2:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST2);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_TOURIST1:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_TOURIST, ANIM_TOURIST1);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_MAC2_PLEAD:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_MAC2, ANIM_MAC2_PLEAD);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_JDT6_KNOCK:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_JDT6, ANIM_JDT6_KNOCK);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_SAL3_SIT_DOWN:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_SAL3, ANIM_SAL3_SIT_DOWN);
+ animAssoc->speed = 1.0f;
+ break;
+ case WAITSTATE_VIC7_PROD_WITH_FOOT:
+ animAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VIC7, ANIM_VIC7_PROD_WITH_FOOT);
+ animAssoc->speed = 1.0f;
+ break;
default:
ClearWaitState();
RestoreHeadingRate();
return;
}
+ bool rep = animAssoc ? repeat : false;
m_nWaitState = state;
+ if (rep)
+ animAssoc->flags |= ASSOC_REPEAT;
}
void
CPed::Wait(void)
{
- AnimationId mustHaveAnim = NUM_STD_ANIMS;
+ AnimationId mustHaveAnim = ANIM_STD_NUM;
CAnimBlendAssociation *animAssoc;
CPed *pedWeLook;
@@ -8339,7 +8599,7 @@ CPed::Wait(void)
else
SetWaitState(WAITSTATE_CROSS_ROAD_LOOK, nil);
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_HBHB);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_HBHB);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -8350,7 +8610,7 @@ CPed::Wait(void)
case WAITSTATE_CROSS_ROAD_LOOK:
if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) {
ClearWaitState();
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -8363,7 +8623,7 @@ CPed::Wait(void)
uint32 timeLeft = m_nWaitTimer - CTimer::GetTimeInMilliseconds();
if (timeLeft < 2500 && timeLeft > 2000) {
m_nWaitTimer -= 500;
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_XPRESS_SCRATCH, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_XPRESS_SCRATCH, 4.0f);
}
} else {
ClearWaitState();
@@ -8396,8 +8656,8 @@ CPed::Wait(void)
case WAITSTATE_SURPRISE:
if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) {
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HIT_WALL)) {
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_XPRESS_SCRATCH, 4.0f);
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HIT_WALL)) {
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_XPRESS_SCRATCH, 4.0f);
animAssoc->SetFinishCallback(FinishedWaitCB, this);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000;
} else {
@@ -8410,14 +8670,14 @@ CPed::Wait(void)
if (CTimer::GetTimeInMilliseconds() <= m_nWaitTimer)
break;
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_TURN_180);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_TURN180);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_XPRESS_SCRATCH);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_XPRESS_SCRATCH);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS);
if (animAssoc) {
if (animAssoc->IsPartial()) {
@@ -8425,10 +8685,10 @@ CPed::Wait(void)
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
} else {
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f);
}
- if (animAssoc->animId == ANIM_TURN_180) {
+ if (animAssoc->animId == ANIM_STD_TURN180) {
m_fRotationCur = CGeneral::LimitRadianAngle(PI + m_fRotationCur);
ClearWaitState();
SetMoveState(PEDMOVE_WALK);
@@ -8442,16 +8702,16 @@ CPed::Wait(void)
switch (CGeneral::GetRandomNumber() & 3) {
case 0:
- animToPlay = ANIM_ROAD_CROSS;
+ animToPlay = ANIM_STD_ROADCROSS;
break;
case 1:
- animToPlay = ANIM_IDLE_TIRED;
+ animToPlay = ANIM_STD_IDLE_TIRED;
break;
case 2:
- animToPlay = ANIM_XPRESS_SCRATCH;
+ animToPlay = ANIM_STD_XPRESS_SCRATCH;
break;
case 3:
- animToPlay = ANIM_TURN_180;
+ animToPlay = ANIM_STD_TURN180;
break;
default:
break;
@@ -8459,7 +8719,7 @@ CPed::Wait(void)
animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animToPlay, 4.0f);
- if (animToPlay == ANIM_TURN_180)
+ if (animToPlay == ANIM_STD_TURN180)
animAssoc->SetFinishCallback(FinishedWaitCB, this);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(1500, 5000);
@@ -8468,7 +8728,7 @@ CPed::Wait(void)
case WAITSTATE_LOOK_ABOUT:
if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) {
ClearWaitState();
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_HBHB);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_HBHB);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -8477,11 +8737,11 @@ CPed::Wait(void)
break;
case WAITSTATE_PLAYANIM_HANDSUP:
- mustHaveAnim = ANIM_HANDSUP;
+ mustHaveAnim = ANIM_STD_HANDSUP;
case WAITSTATE_PLAYANIM_HANDSCOWER:
- if (mustHaveAnim == NUM_STD_ANIMS)
- mustHaveAnim = ANIM_HANDSCOWER;
+ if (mustHaveAnim == ANIM_STD_NUM)
+ mustHaveAnim = ANIM_STD_HANDSCOWER;
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), mustHaveAnim);
pedWeLook = (CPed*) m_pLookTarget;
@@ -8549,19 +8809,19 @@ CPed::Wait(void)
}
break;
case WAITSTATE_PLAYANIM_COWER:
- mustHaveAnim = ANIM_HANDSCOWER;
+ mustHaveAnim = ANIM_STD_HANDSCOWER;
case WAITSTATE_PLAYANIM_DUCK:
- if (mustHaveAnim == NUM_STD_ANIMS)
- mustHaveAnim = ANIM_DUCK_DOWN;
+ if (mustHaveAnim == ANIM_STD_NUM)
+ mustHaveAnim = ANIM_STD_DUCK_DOWN;
case WAITSTATE_PLAYANIM_TAXI:
- if (mustHaveAnim == NUM_STD_ANIMS)
- mustHaveAnim = ANIM_IDLE_TAXI;
+ if (mustHaveAnim == ANIM_STD_NUM)
+ mustHaveAnim = ANIM_STD_HAILTAXI;
case WAITSTATE_PLAYANIM_CHAT:
- if (mustHaveAnim == NUM_STD_ANIMS)
- mustHaveAnim = ANIM_IDLE_CHAT;
+ if (mustHaveAnim == ANIM_STD_NUM)
+ mustHaveAnim = ANIM_STD_CHAT;
if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) {
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), mustHaveAnim);
@@ -8589,11 +8849,11 @@ CPed::Wait(void)
break;
case WAITSTATE_FINISH_FLEE:
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED);
if (animAssoc) {
if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) {
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f);
int timer = 2000;
ClearWaitState();
SetWaitState(WAITSTATE_CROSS_ROAD_LOOK, &timer);
@@ -8716,7 +8976,7 @@ CPed::Wait(void)
break;
}
- PlayRandomAnimationsFromAnimBlock(this, ASSOCGRP_RIOT, ANIM_RIOT_ANGRY, ANIM_RIOT_FUKU - ANIM_RIOT_ANGRY + 1);
+ PlayRandomAnimationsFromAnimBlock(this, ASSOCGRP_RIOT, ANIM_RIOT_ANGRY, ANIM_RIOT_FUCKYOU - ANIM_RIOT_ANGRY + 1);
if (IsPedInControl() && CGeneral::GetRandomNumberInRange(0.f,1.f) < 0.25f
&& CPopulation::CanJeerAtStripper(m_modelIndex)) {
for (int i = 0; i < m_numNearPeds; ++i) {
@@ -8725,7 +8985,7 @@ CPed::Wait(void)
if ((GetPosition() - nearPed->GetPosition()).MagnitudeSqr() < sq(10.f)) {
for (int anim = ANIM_STRIP_A; anim <= ANIM_STRIP_G; anim++) {
if (RpAnimBlendClumpGetAssociation(nearPed->GetClump(), anim))
- Say(SOUND_PED_149);
+ Say(SOUND_PED_JEER);
}
}
}
@@ -8832,7 +9092,7 @@ CPed::SetSolicit(uint32 time)
m_chatTimer = CTimer::GetTimeInMilliseconds() + time;
if(!m_carInObjective->bIsVan && !m_carInObjective->bIsBus)
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_HOOKERTALK, 4.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_HOOKERTALK, 4.0f);
SetPedState(PED_SOLICIT);
}
@@ -8863,7 +9123,7 @@ CPed::Solicit(void)
if ((GetPosition() - doorPos).MagnitudeSqr() <= 1.0f)
return;
- CAnimBlendAssociation *talkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_HOOKERTALK);
+ CAnimBlendAssociation *talkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_HOOKERTALK);
if (talkAssoc) {
talkAssoc->blendDelta = -1000.0f;
talkAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -9093,12 +9353,12 @@ CPed::CanPedJumpThis(CEntity *unused, CVector *damageNormal)
void
CPed::SetJump(void)
{
- if (!bInVehicle && m_nPedState != PED_JUMP && !RpAnimBlendClumpGetAssociation(GetClump(), ANIM_JUMP_LAUNCH) &&
+ if (!bInVehicle && m_nPedState != PED_JUMP && !RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_JUMP_LAUNCH) &&
(m_nSurfaceTouched != SURFACE_STEEP_CLIFF || DotProduct(GetForward(), m_vecDamageNormal) >= 0.0f)) {
SetStoredState();
SetPedState(PED_JUMP);
- CAnimBlendAssociation *jumpAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_JUMP_LAUNCH, 8.0f);
+ CAnimBlendAssociation *jumpAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_JUMP_LAUNCH, 8.0f);
jumpAssoc->SetFinishCallback(FinishLaunchCB, this);
m_fRotationDest = m_fRotationCur;
}
@@ -9128,7 +9388,7 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg)
if (obstacle) {
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
- CAnimBlendAssociation *handsCoverAssoc = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_HIT_WALL, 8.0f);
+ CAnimBlendAssociation *handsCoverAssoc = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_WALL, 8.0f);
handsCoverAssoc->flags &= ~ASSOC_FADEOUTWHENDONE;
handsCoverAssoc->SetFinishCallback(FinishHitHeadCB, ped);
ped->bIsLanding = true;
@@ -9136,12 +9396,12 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg)
}
float velocityFromAnim = 0.1f;
- CAnimBlendAssociation *sprintAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_SPRINT);
+ CAnimBlendAssociation *sprintAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_STD_RUNFAST);
if (sprintAssoc) {
velocityFromAnim = 0.05f * sprintAssoc->blendAmount + 0.17f;
} else {
- CAnimBlendAssociation *runAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_RUN);
+ CAnimBlendAssociation *runAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_STD_RUN);
if (runAssoc) {
velocityFromAnim = 0.07f * runAssoc->blendAmount + 0.1f;
}
@@ -9176,7 +9436,7 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg)
ped->bIsStanding = false;
ped->bIsInTheAir = true;
animAssoc->blendDelta = -1000.0f;
- CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_JUMP_GLIDE);
+ CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_JUMP_GLIDE);
if (ped->bDoBloodyFootprints) {
CVector bloodPos(0.0f, 0.0f, 0.0f);
@@ -9464,7 +9724,7 @@ CPed::AttachPedToEntity(CEntity *ent, CVector offset, uint16 type, float rot, eW
}
SetStoredState();
SetPedState(PED_IDLE);
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 1000.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 1000.0f);
if (m_storedWeapon == WEAPONTYPE_UNIDENTIFIED) {
m_storedWeapon = GetWeapon()->m_eWeaponType;
@@ -9499,7 +9759,7 @@ CPed::DettachPedFromEntity(void)
bIsStanding = false;
} else if (m_nPedState != PED_DEAD) {
RestorePreviousState();
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 1000.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 1000.0f);
bUsesCollision = true;
if (m_storedWeapon != WEAPONTYPE_UNIDENTIFIED) {
GetWeapon()->m_nAmmoInClip = 0;
@@ -9566,7 +9826,7 @@ void
CPed::Undress(const char* name)
{
int mi = GetModelIndex();
- CAnimBlendAssociation* pAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_PHONE_OUT);
+ CAnimBlendAssociation* pAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_PHONE_OUT);
if (pAnim)
FinishTalkingOnMobileCB(pAnim, this);
@@ -9601,6 +9861,247 @@ CPed::Say(uint16 audio, int32 time)
}
}
+void
+CPed::LoadNonStandardPedAnim(eWaitState waitState)
+{
+ switch(waitState) {
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE:
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("MPNote"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_CS_MISC_IDLE_LOOK:
+ case WAITSTATE_CS_MISC_IDLE_NO:
+ case WAITSTATE_CS_MISC_IDLE_YES:
+ case WAITSTATE_CS_MISC_IDLE_CHAT2:
+ case WAITSTATE_CS_MISC_IDLE_COUGH:
+ case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE:
+ case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT:
+ case WAITSTATE_CS_MISC_IDLE_CELL_TALK:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("cs_misc"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_DONH2_CAMERA:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("donh2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_DONH3_HAPPY:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("donh3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_JDT2_ANXIOUS_TALK:
+ case WAITSTATE_JDT2_SHRUG:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_JDT4_DILDO_TALK:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_JDT5_CALM_DOWN:
+ case WAITSTATE_JDT5_POINT:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt5"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_JDT6_PICKUP:
+ case WAITSTATE_JDT6_KNOCK:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("jdt6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_MAR1_SKIRT:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar1"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_MAR2_CELL_ANSWER:
+ case WAITSTATE_MAR2_CELL_END:
+ case WAITSTATE_MAR2_CELL_TALK:
+ case WAITSTATE_MAR2_FOOT_TAP:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_MAR3_HOOCHY:
+ case WAITSTATE_MAR3_NOTE_IDLE:
+ case WAITSTATE_MAR3_NOTE_PICKUP:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mar3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL1_BIREFCASE_DOWN:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal1"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL2_IDLE_SEATED:
+ case WAITSTATE_SAL2_SEAT_TO_STAND:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL3_SEATED_TALK:
+ case WAITSTATE_SAL3_SEATED_IDLE:
+ case WAITSTATE_SAL3_SIT_DOWN:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL4_DUST_DOWN:
+ case WAITSTATE_SAL4_GIRL_RUN:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL6_ANGRY_SEATED:
+ case WAITSTATE_SAL6_IDLE_SEATED:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_SAL7_LOOKOUT:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("sal7"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC2_POINT_ANGRY:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC3_WAFT:
+ case WAITSTATE_VIC3_PICKUP_ROLL:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic3"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC4_CARRY_BOX:
+ case WAITSTATE_VIC4_CELL_LOOK:
+ case WAITSTATE_VIC4_CRATE_IDLE:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic4"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC6_CELL_ANGRY:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic6"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_TOURIST3:
+ case WAITSTATE_TOURIST2:
+ case WAITSTATE_TOURIST1:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("tourist"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_MAC2_PLEAD:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("mac2"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ case WAITSTATE_VIC7_PROD_WITH_FOOT:
+ CStreaming::RequestAnim(CAnimManager::GetAnimationBlockIndex("vic7"), STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ default:
+ CStreaming::RequestAnim(0, STREAMFLAGS_DEPENDENCY | STREAMFLAGS_SCRIPTOWNED);
+ break;
+ }
+ CStreaming::LoadAllRequestedModels(false);
+}
+
+void
+CPed::UnloadNonStandardPedAnim(eWaitState waitState)
+{
+ switch(waitState) {
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE:
+ case WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP:
+ if(CAnimManager::GetAnimationBlock("MPNote"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("MPNote"));
+ break;
+ case WAITSTATE_CS_MISC_IDLE_LOOK:
+ case WAITSTATE_CS_MISC_IDLE_NO:
+ case WAITSTATE_CS_MISC_IDLE_YES:
+ case WAITSTATE_CS_MISC_IDLE_CHAT2:
+ case WAITSTATE_CS_MISC_IDLE_COUGH:
+ case WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE:
+ case WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT:
+ case WAITSTATE_CS_MISC_IDLE_CELL_TALK:
+ if(CAnimManager::GetAnimationBlock("cs_misc"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("cs_misc"));
+ break;
+ case WAITSTATE_DONH2_CAMERA:
+ if(CAnimManager::GetAnimationBlock("donh2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("donh2"));
+ break;
+ case WAITSTATE_DONH3_HAPPY:
+ if(CAnimManager::GetAnimationBlock("donh3"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("donh3"));
+ break;
+ case WAITSTATE_JDT2_ANXIOUS_TALK:
+ case WAITSTATE_JDT2_SHRUG:
+ if(CAnimManager::GetAnimationBlock("cs_misc"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("cs_misc"));
+ break;
+ case WAITSTATE_JDT4_DILDO_TALK:
+ if(CAnimManager::GetAnimationBlock("jdt4"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt4"));
+ break;
+ case WAITSTATE_JDT5_CALM_DOWN:
+ case WAITSTATE_JDT5_POINT:
+ if(CAnimManager::GetAnimationBlock("jdt5"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt5"));
+ break;
+ case WAITSTATE_JDT6_PICKUP:
+ case WAITSTATE_JDT6_KNOCK:
+ if(CAnimManager::GetAnimationBlock("jdt6"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("jdt6"));
+ break;
+ case WAITSTATE_MAR1_SKIRT:
+ if(CAnimManager::GetAnimationBlock("mar1"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar1"));
+ break;
+ case WAITSTATE_MAR2_CELL_ANSWER:
+ case WAITSTATE_MAR2_CELL_END:
+ case WAITSTATE_MAR2_CELL_TALK:
+ case WAITSTATE_MAR2_FOOT_TAP:
+ if(CAnimManager::GetAnimationBlock("mar2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar2"));
+ break;
+ case WAITSTATE_MAR3_HOOCHY:
+ case WAITSTATE_MAR3_NOTE_IDLE:
+ case WAITSTATE_MAR3_NOTE_PICKUP:
+ if(CAnimManager::GetAnimationBlock("mar3"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mar3"));
+ break;
+ case WAITSTATE_SAL1_BIREFCASE_DOWN:
+ if(CAnimManager::GetAnimationBlock("sal1"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal1"));
+ break;
+ case WAITSTATE_SAL2_IDLE_SEATED:
+ case WAITSTATE_SAL2_SEAT_TO_STAND:
+ if(CAnimManager::GetAnimationBlock("sal2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal2"));
+ break;
+ case WAITSTATE_SAL3_SEATED_TALK:
+ case WAITSTATE_SAL3_SEATED_IDLE:
+ case WAITSTATE_SAL3_SIT_DOWN:
+ if(CAnimManager::GetAnimationBlock("sal3"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal3"));
+ break;
+ case WAITSTATE_SAL4_DUST_DOWN:
+ case WAITSTATE_SAL4_GIRL_RUN:
+ if(CAnimManager::GetAnimationBlock("sal4"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal4"));
+ break;
+ case WAITSTATE_SAL6_ANGRY_SEATED:
+ case WAITSTATE_SAL6_IDLE_SEATED:
+ if(CAnimManager::GetAnimationBlock("sal6"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal6"));
+ break;
+ case WAITSTATE_SAL7_LOOKOUT:
+ if(CAnimManager::GetAnimationBlock("sal7"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("sal7"));
+ break;
+ case WAITSTATE_VIC2_POINT_ANGRY:
+ if(CAnimManager::GetAnimationBlock("vic2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic2"));
+ break;
+ case WAITSTATE_VIC3_WAFT:
+ case WAITSTATE_VIC3_PICKUP_ROLL:
+ if(CAnimManager::GetAnimationBlock("vic3"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic3"));
+ break;
+ case WAITSTATE_VIC4_CARRY_BOX:
+ case WAITSTATE_VIC4_CELL_LOOK:
+ case WAITSTATE_VIC4_CRATE_IDLE:
+ if(CAnimManager::GetAnimationBlock("vic4"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic4"));
+ break;
+ case WAITSTATE_VIC6_CELL_ANGRY:
+ if(CAnimManager::GetAnimationBlock("vic6"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic6"));
+ break;
+ case WAITSTATE_TOURIST3:
+ case WAITSTATE_TOURIST2:
+ case WAITSTATE_TOURIST1:
+ if(CAnimManager::GetAnimationBlock("tourist"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("tourist"));
+ break;
+ case WAITSTATE_MAC2_PLEAD:
+ if(CAnimManager::GetAnimationBlock("mac2"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("mac2"));
+ break;
+ case WAITSTATE_VIC7_PROD_WITH_FOOT:
+ if(CAnimManager::GetAnimationBlock("vic7"))
+ CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex("vic7"));
+ break;
+ default:
+ break;
+ }
+}
+
+
#ifdef COMPATIBLE_SAVES
#define CopyFromBuf(buf, data) memcpy(&data, buf, sizeof(data)); SkipSaveBuf(buf, sizeof(data));
#define CopyToBuf(buf, data) memcpy(buf, &data, sizeof(data)); SkipSaveBuf(buf, sizeof(data));
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index f3271861..107ad1a2 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -216,6 +216,56 @@ enum eWaitState {
WAITSTATE_GROUND_ATTACK,
WAITSTATE_LANCESITTING,
WAITSTATE_PLAYANIM_HANDSUP_SIMPLE,
+ WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE,
+ WAITSTATE_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP,
+ WAITSTATE_CS_MISC_IDLE_LOOK,
+ WAITSTATE_CS_MISC_IDLE_NO,
+ WAITSTATE_CS_MISC_IDLE_YES,
+ WAITSTATE_CS_MISC_IDLE_CHAT2,
+ WAITSTATE_CS_MISC_IDLE_COUGH,
+ WAITSTATE_CS_MISC_IDLE_GIGGLE_FEMALE,
+ WAITSTATE_CS_MISC_IDLE_TOUGH_CHAT,
+ WAITSTATE_CS_MISC_IDLE_CELL_TALK,
+ WAITSTATE_DONH2_CAMERA,
+ WAITSTATE_DONH3_HAPPY,
+ WAITSTATE_JDT2_ANXIOUS_TALK,
+ WAITSTATE_JDT2_SHRUG,
+ WAITSTATE_JDT4_DILDO_TALK,
+ WAITSTATE_JDT5_CALM_DOWN,
+ WAITSTATE_JDT5_POINT,
+ WAITSTATE_JDT6_PICKUP,
+ WAITSTATE_MAR1_SKIRT,
+ WAITSTATE_MAR2_CELL_ANSWER,
+ WAITSTATE_MAR2_CELL_END,
+ WAITSTATE_MAR2_CELL_TALK,
+ WAITSTATE_MAR2_FOOT_TAP,
+ WAITSTATE_MAR3_HOOCHY,
+ WAITSTATE_MAR3_NOTE_IDLE,
+ WAITSTATE_MAR3_NOTE_PICKUP,
+ WAITSTATE_SAL1_BIREFCASE_DOWN,
+ WAITSTATE_SAL2_IDLE_SEATED,
+ WAITSTATE_SAL2_SEAT_TO_STAND,
+ WAITSTATE_SAL3_SEATED_TALK,
+ WAITSTATE_SAL3_SEATED_IDLE,
+ WAITSTATE_SAL4_DUST_DOWN,
+ WAITSTATE_SAL4_GIRL_RUN,
+ WAITSTATE_SAL6_ANGRY_SEATED,
+ WAITSTATE_SAL6_IDLE_SEATED,
+ WAITSTATE_SAL7_LOOKOUT,
+ WAITSTATE_VIC2_POINT_ANGRY,
+ WAITSTATE_VIC3_WAFT,
+ WAITSTATE_VIC3_PICKUP_ROLL,
+ WAITSTATE_VIC4_CARRY_BOX,
+ WAITSTATE_VIC4_CELL_LOOK,
+ WAITSTATE_VIC4_CRATE_IDLE,
+ WAITSTATE_VIC6_CELL_ANGRY,
+ WAITSTATE_TOURIST3,
+ WAITSTATE_TOURIST2,
+ WAITSTATE_TOURIST1,
+ WAITSTATE_MAC2_PLEAD,
+ WAITSTATE_JDT6_KNOCK,
+ WAITSTATE_SAL3_SIT_DOWN,
+ WAITSTATE_VIC7_PROD_WITH_FOOT
};
enum eObjective {
@@ -696,7 +746,7 @@ public:
uint32 m_threatFlags;
uint32 m_threatCheckTimer;
uint32 m_threatCheckInterval;
- uint32 m_delayedSoundID;
+ int32 m_delayedSoundID;
uint32 m_delayedSoundTimer;
uint32 m_lastSoundStart;
uint32 m_soundStart;
@@ -708,10 +758,10 @@ public:
float m_radiusToGuard;
float m_fMaxHealth;
- static void *operator new(size_t);
- static void *operator new(size_t, int);
- static void operator delete(void*, size_t);
- static void operator delete(void*, int);
+ static void *operator new(size_t) throw();
+ static void *operator new(size_t, int) throw();
+ static void operator delete(void*, size_t) throw();
+ static void operator delete(void*, int) throw();
CPed(uint32 pedType);
~CPed(void);
@@ -737,7 +787,7 @@ public:
void SetLookFlag(CEntity* target, bool keepTryingToLook, bool cancelPrevious = false);
void SetLookFlag(float direction, bool keepTryingToLook, bool cancelPrevious = false);
void SetLookTimer(int time);
- void SetDie(AnimationId anim = ANIM_KO_SHOT_FRONT1, float arg1 = 4.0f, float arg2 = 0.0f);
+ void SetDie(AnimationId anim = ANIM_STD_KO_FRONT, float arg1 = 4.0f, float arg2 = 0.0f);
void SetDead(void);
void ApplyHeadShot(eWeaponType weaponType, CVector pos, bool evenOnPlayer);
void RemoveBodyPart(PedNode nodeId, int8 direction);
@@ -826,7 +876,7 @@ public:
void SetEvasiveDive(CPhysical*, uint8);
void SetAttack(CEntity*);
void StartFightAttack(uint8);
- void SetWaitState(eWaitState, void*);
+ void SetWaitState(eWaitState, void*, bool repeat = false);
bool FightStrike(CVector&, bool);
void FightHitPed(CPed*, CVector&, CVector&, int16);
int32 ChooseAttackPlayer(uint8, bool);
@@ -1092,39 +1142,39 @@ public:
static AnimationId GetFireAnimGround(CWeaponInfo* weapon, bool kickFloorIfNone = true) {
if (weapon->IsFlagSet(WEAPONFLAG_GROUND_2ND))
- return ANIM_WEAPON_CROUCHFIRE;
+ return ANIM_ATTACK_2;
else if (weapon->IsFlagSet(WEAPONFLAG_GROUND_3RD))
return ANIM_WEAPON_FIRE_3RD;
else if (kickFloorIfNone)
- return ANIM_KICK_FLOOR;
+ return ANIM_STD_KICKGROUND;
else
return (AnimationId)0;
}
static AnimationId GetPrimaryFireAnim(CWeaponInfo* weapon) {
if (weapon->IsFlagSet(WEAPONFLAG_ANIMDETONATE))
- return ANIM_BOMBER;
+ return ANIM_STD_DETONATE;
else
- return ANIM_WEAPON_FIRE;
+ return ANIM_ATTACK_1;
}
static AnimationId GetCrouchReloadAnim(CWeaponInfo* weapon) {
if (weapon->IsFlagSet(WEAPONFLAG_RELOAD))
- return ANIM_WEAPON_CROUCHRELOAD;
+ return ANIM_ATTACK_EXTRA2;
else
return (AnimationId)0;
}
static AnimationId GetCrouchFireAnim(CWeaponInfo* weapon) {
if (weapon->IsFlagSet(WEAPONFLAG_CROUCHFIRE))
- return ANIM_WEAPON_CROUCHFIRE;
+ return ANIM_ATTACK_2;
else
return (AnimationId)0;
}
static AnimationId GetReloadAnim(CWeaponInfo* weapon) {
if (weapon->IsFlagSet(WEAPONFLAG_RELOAD))
- return ANIM_WEAPON_RELOAD;
+ return ANIM_ATTACK_EXTRA1;
else
return (AnimationId)0;
}
@@ -1145,7 +1195,7 @@ public:
static AnimationId GetSecondFireAnim(CWeaponInfo* weapon) {
if (weapon->IsFlagSet(WEAPONFLAG_USE_2ND))
- return ANIM_WEAPON_FIRE_2ND; // or ANIM_MELEE_ATTACK_2ND
+ return ANIM_WEAPON_FIRE_2ND;
else
return (AnimationId)0;
}
@@ -1225,6 +1275,9 @@ public:
static bool bPedCheat3;
static CVector2D ms_vec2DFleePosition;
+ static void LoadNonStandardPedAnim(eWaitState waitState);
+ static void UnloadNonStandardPedAnim(eWaitState waitState);
+
#ifndef MASTER
// Mobile things
void DebugDrawPedDestination(CPed *, int, int);
diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp
index cf566aba..73522fe3 100644
--- a/src/peds/PedAI.cpp
+++ b/src/peds/PedAI.cpp
@@ -1121,8 +1121,8 @@ CPed::ProcessObjective(void)
SetMoveState(PEDMOVE_STILL);
if (m_objective == OBJECTIVE_HASSLE_CHAR) {
- Say(SOUND_PED_COP_REACTION);
- m_pedInObjective->Say(SOUND_PED_UNK_126);
+ Say(SOUND_PED_COP_ASK_FOR_ID);
+ m_pedInObjective->Say(SOUND_PED_INNOCENT);
m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 3000;
m_pedInObjective->m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 3000;
SetObjective(OBJECTIVE_WANDER);
@@ -1500,9 +1500,9 @@ CPed::ProcessObjective(void)
}
break;
case OBJECTIVE_HAIL_TAXI:
- if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TAXI) && CTimer::GetTimeInMilliseconds() > m_nWaitTimer) {
+ if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HAILTAXI) && CTimer::GetTimeInMilliseconds() > m_nWaitTimer) {
Say(SOUND_PED_TAXI_WAIT);
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TAXI, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HAILTAXI, 4.0f);
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2000;
}
break;
@@ -1607,7 +1607,7 @@ CPed::ProcessObjective(void)
float distWithTargetScSqr = distWithTarget.MagnitudeSqr();
if (distWithTargetScSqr <= sq(10.0f)) {
if (distWithTargetScSqr <= sq(1.4f)) {
- CAnimBlendAssociation *reloadAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FUCKU);
+ CAnimBlendAssociation *reloadAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_PARTIAL_FUCKU);
m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(
m_pedInObjective->GetPosition().x, m_pedInObjective->GetPosition().y,
GetPosition().x, GetPosition().y);
@@ -1615,7 +1615,7 @@ CPed::ProcessObjective(void)
if (reloadAssoc || !m_pedInObjective->IsPedShootable()) {
if (reloadAssoc &&
(!reloadAssoc->IsRunning() || reloadAssoc->GetProgress() > 0.8f)) {
- CAnimBlendAssociation *punchAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_PPUNCH, 8.0f);
+ CAnimBlendAssociation *punchAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PARTIAL_PUNCH, 8.0f);
punchAssoc->flags |= ASSOC_DELETEFADEDOUT;
punchAssoc->flags |= ASSOC_FADEOUTWHENDONE;
CVector2D offset(distWithTarget.x, distWithTarget.y);
@@ -1644,13 +1644,13 @@ CPed::ProcessObjective(void)
if (weaponType != WEAPONTYPE_UNARMED && weaponType != WEAPONTYPE_BASEBALLBAT)
SetCurrentWeapon(WEAPONTYPE_UNARMED);
- CAnimBlendAssociation *newReloadAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FUCKU, 8.0f);
+ CAnimBlendAssociation *newReloadAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PARTIAL_FUCKU, 8.0f);
newReloadAssoc->flags |= ASSOC_DELETEFADEDOUT;
newReloadAssoc->flags |= ASSOC_FADEOUTWHENDONE;
}
} else {
SetSeek(m_pedInObjective, 1.0f);
- CAnimBlendAssociation *walkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK);
+ CAnimBlendAssociation *walkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_WALK);
if (walkAssoc)
walkAssoc->speed = 1.3f;
@@ -2279,7 +2279,7 @@ CPed::ReactToAttack(CEntity *attacker)
if (m_nPedType == PEDTYPE_GANG7 && attacker->IsPed() && ((CPed*)attacker)->IsPlayer()) {
if (m_nPedState != PED_FALL) {
- SetFall(15000, (AnimationId)(ANIM_KO_SHOT_FRONT1 + CGeneral::GetRandomNumberInRange(0, 5)), 0);
+ SetFall(15000, (AnimationId)(ANIM_STD_KO_FRONT + CGeneral::GetRandomNumberInRange(0, 5)), 0);
}
} else if (m_nPedState == PED_DRIVING && InVehicle()
@@ -2402,21 +2402,21 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
} else if (veh->GetRight().z >= 0.5f || veh->GetRight().z <= -0.5f || veh->GetUp().z <= 0.0f) {
if (enterDoor == DOOR_FRONT_LEFT || enterDoor == DOOR_REAR_LEFT) {
if (veh->GetRight().z > 0.0f)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_BIKE_PICKUP_R);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_BIKE_PICKUP_LHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_BIKE_PULLUP_R);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_BIKE_PULLUP_LHS);
} else {
if (veh->GetRight().z < 0.0f)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_BIKE_PICKUP_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_BIKE_PICKUP_RHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_BIKE_PULLUP_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_BIKE_PULLUP_RHS);
}
ped->m_pVehicleAnim->SetFinishCallback(PedAnimDoorOpenCB, ped);
} else {
ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType,
- enterDoor == DOOR_FRONT_LEFT || enterDoor == DOOR_REAR_LEFT ? ANIM_BIKE_JUMPON_R : ANIM_BIKE_JUMPON_L);
+ enterDoor == DOOR_FRONT_LEFT || enterDoor == DOOR_REAR_LEFT ? ANIM_BIKE_JUMPON_LHS : ANIM_BIKE_JUMPON_RHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
((CBike*)veh)->bIsBeingPickedUp = true;
}
@@ -2434,20 +2434,20 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
if (veh->pDriver) {
if (veh->m_vecMoveSpeed.Magnitude() > 0.2f) {
ped->QuitEnteringCar();
- ped->SetFall(1000, ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_LR ? ANIM_KO_SPIN_L : ANIM_KO_SPIN_R, false);
+ ped->SetFall(1000, ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_LR ? ANIM_STD_HIGHIMPACT_RIGHT : ANIM_STD_HIGHIMPACT_LEFT, false);
return;
}
if (veh->pDriver->m_nPedState != PED_DRIVING || veh->pDriver->bDontDragMeOutCar) {
ped->QuitEnteringCar();
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, enterDoor == DOOR_FRONT_LEFT ? ANIM_BIKE_ELBOW_R : ANIM_BIKE_ELBOW_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, enterDoor == DOOR_FRONT_LEFT ? ANIM_STD_BIKE_ELBOW_LHS : ANIM_STD_BIKE_ELBOW_RHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimPullPedOutCB, ped);
pedToDragOut = veh->pDriver;
}
((CBike*)veh)->bIsBeingPickedUp = true;
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, enterDoor == DOOR_FRONT_LEFT ? ANIM_BIKE_JUMPON_R : ANIM_BIKE_JUMPON_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, enterDoor == DOOR_FRONT_LEFT ? ANIM_BIKE_JUMPON_LHS : ANIM_BIKE_JUMPON_RHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
((CBike*)veh)->bIsBeingPickedUp = true;
}
@@ -2455,14 +2455,14 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
if (veh->pPassengers[0]) {
if (veh->m_vecMoveSpeed.Magnitude() > 0.2f) {
ped->QuitEnteringCar();
- ped->SetFall(1000, ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_LR ? ANIM_KO_SPIN_L : ANIM_KO_SPIN_R, false);
+ ped->SetFall(1000, ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_LR ? ANIM_STD_HIGHIMPACT_RIGHT : ANIM_STD_HIGHIMPACT_LEFT, false);
return;
}
if (veh->pPassengers[0]->m_nPedState != PED_DRIVING || veh->pPassengers[0]->bDontDragMeOutCar) {
ped->QuitEnteringCar();
} else {
ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD,
- enterDoor == DOOR_REAR_LEFT ? ANIM_BIKE_ELBOW_R : ANIM_BIKE_ELBOW_L);
+ enterDoor == DOOR_REAR_LEFT ? ANIM_STD_BIKE_ELBOW_LHS : ANIM_STD_BIKE_ELBOW_RHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimPullPedOutCB, ped);
pedToDragOut = veh->pPassengers[0];
}
@@ -2470,7 +2470,7 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
} else {
ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(),
- ((CBike*)veh)->m_bikeAnimType, enterDoor == DOOR_REAR_LEFT ? ANIM_BIKE_JUMPON_R : ANIM_BIKE_JUMPON_L);
+ ((CBike*)veh)->m_bikeAnimType, enterDoor == DOOR_REAR_LEFT ? ANIM_BIKE_JUMPON_LHS : ANIM_BIKE_JUMPON_RHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
((CBike*)veh)->bIsBeingPickedUp = true;
}
@@ -2502,22 +2502,22 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
}
if (enterDoor != DOOR_FRONT_LEFT && enterDoor != DOOR_REAR_LEFT) {
if (itsVan) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_VAN_GETIN);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_GET_IN_REAR_RHS);
} else if (itsBus) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_COACH_IN_R);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_STD_COACH_GET_IN_RHS);
} else if (itsLow) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_RHS);
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_RHS);
}
} else if (itsVan) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_VAN_GETIN_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_GET_IN_REAR_LHS);
} else if (itsBus) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_COACH_IN_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_STD_COACH_GET_IN_LHS);
} else if (itsLow) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_LHS);
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LHS);
}
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
@@ -2526,16 +2526,16 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
veh->AutoPilot.m_nCruiseSpeed = 0;
if (enterDoor != DOOR_FRONT_LEFT && enterDoor != DOOR_REAR_LEFT) {
if (itsVan) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_VAN_OPEN);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_OPEN_DOOR_REAR_RHS);
} else if (itsBus) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_COACH_OPEN_R);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_STD_COACH_OPEN_RHS);
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_OPEN_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_OPEN_DOOR_RHS);
}
} else if (itsVan) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_VAN_OPEN_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_OPEN_DOOR_REAR_LHS);
} else if (itsBus) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_COACH_OPEN_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_STD_COACH_OPEN_LHS);
} else {
if (ped->m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER && veh->pDriver) {
@@ -2544,7 +2544,7 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
&& veh->pDriver->CharCreatedBy != MISSION_CHAR
&& veh->pDriver->m_nPedState == PED_DRIVING) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_QJACK);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_QUICKJACK);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
CPlayerPed *player = nil;
@@ -2564,19 +2564,19 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
}
}
if (veh->IsOpenTopCar() && !veh->pDriver && ped->m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_JUMPIN_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_JUMP_IN_LO_LHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
return;
}
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_OPEN_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_OPEN_DOOR_LHS);
}
ped->m_pVehicleAnim->SetFinishCallback(PedAnimDoorOpenCB, ped);
} else {
if (enterDoor != DOOR_FRONT_LEFT && enterDoor != DOOR_REAR_LEFT)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_DOORLOCKED_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CARDOOR_LOCKED_RHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_DOORLOCKED_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CARDOOR_LOCKED_LHS);
ped->bCancelEnteringCar = true;
ped->m_pVehicleAnim->SetFinishCallback(PedAnimDoorOpenCB, ped);
@@ -2664,13 +2664,13 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg)
veh->IsCar() && veh->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI && ((CAutomobile*)veh)->m_nWheelsOnGround == 0) {
ped->QuitEnteringCar();
if (ped->m_vehDoor != CAR_DOOR_LF && ped->m_vehDoor != CAR_DOOR_LR)
- ped->SetFall(1000, ANIM_KO_SPIN_R, false);
+ ped->SetFall(1000, ANIM_STD_HIGHIMPACT_LEFT, false);
else
- ped->SetFall(1000, ANIM_KO_SPIN_L, false);
+ ped->SetFall(1000, ANIM_STD_HIGHIMPACT_RIGHT, false);
return;
}
- veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_OPEN_LHS, 1.0f);
+ veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_STD_CAR_OPEN_DOOR_LHS, 1.0f);
if (ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_RF)
isVan = false;
@@ -2679,27 +2679,27 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg)
if (ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_LR) {
if (veh->IsBike()) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, ANIM_BIKE_JUMPON_R);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, ANIM_BIKE_JUMPON_LHS);
} else if (isVan) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_VAN_GETIN_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_GET_IN_REAR_LHS);
} else if (isBus) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_COACH_IN_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_STD_COACH_GET_IN_LHS);
} else if (isLow) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_LHS);
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LHS);
}
} else {
if (veh->IsBike()) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, ANIM_BIKE_JUMPON_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, ANIM_BIKE_JUMPON_RHS);
} else if (isVan) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_VAN_GETIN);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_GET_IN_REAR_RHS);
} else if (isBus) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_COACH_IN_R);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_COACH, ANIM_STD_COACH_GET_IN_RHS);
} else if (isLow) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_RHS);
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_RHS);
}
if (ped->m_vehDoor == CAR_DOOR_RF && pedInSeat && veh->IsCar())
@@ -2731,9 +2731,9 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg)
pedToDragOut = nil;
} else {
if (isLow)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_PULLOUT_LOW_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_PULL_OUT_PED_LO_RHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_PULLOUT_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_PULL_OUT_PED_RHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimPullPedOutCB, ped);
}
@@ -2754,9 +2754,9 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg)
}
} else {
if (isLow)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_RHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_RHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
}
@@ -2767,17 +2767,17 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg)
pedToDragOut = nil;
} else {
if (isLow)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_PULLOUT_LOW_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_PULL_OUT_PED_LO_LHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_PULLOUT_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_PULL_OUT_PED_LHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimPullPedOutCB, ped);
}
} else {
if (isLow)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_LHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LHS);
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
}
@@ -2865,18 +2865,18 @@ CPed::PedAnimPullPedOutCB(CAnimBlendAssociation* animAssoc, void* arg)
if (ped->m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER) {
if (ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_LR) {
if (veh->IsBike())
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, ANIM_BIKE_JUMPON_R);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, ANIM_BIKE_JUMPON_LHS);
else if (isLow)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_LHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LHS);
} else {
if (veh->IsBike())
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, ANIM_BIKE_JUMPON_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ((CBike*)veh)->m_bikeAnimType, ANIM_BIKE_JUMPON_RHS);
else if (isLow)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_RHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_RHS);
}
ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped);
} else {
@@ -2923,7 +2923,7 @@ CPed::PedAnimGetInCB(CAnimBlendAssociation *animAssoc, void *arg)
&& (Pads[0].GetAccelerate() >= 255.0f || Pads[0].GetBrake() >= 255.0f)
&& veh->IsCar() && !veh->pDriver) {
- if (!animAssoc || animAssoc->animId != ANIM_CAR_JUMPIN_LHS)
+ if (!animAssoc || animAssoc->animId != ANIM_STD_CAR_JUMP_IN_LO_LHS)
if (((CAutomobile*)veh)->Damage.GetDoorStatus(DOOR_FRONT_LEFT) != DOOR_STATUS_MISSING)
((CAutomobile*)veh)->Damage.SetDoorStatus(DOOR_FRONT_LEFT, DOOR_STATUS_SWINGING);
@@ -3019,18 +3019,18 @@ CPed::PedAnimGetInCB(CAnimBlendAssociation *animAssoc, void *arg)
} else {
if (enterDoor != DOOR_FRONT_LEFT && enterDoor != DOOR_REAR_LEFT) {
if (isVan) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_VAN_CLOSE);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS);
} else if (isLow) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSEDOOR_LOW_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_DOOR_LO_RHS);
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSEDOOR_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_DOOR_RHS);
}
} else if (isVan) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_VAN_CLOSE_L);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS);
} else if (isLow) {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSEDOOR_LOW_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_DOOR_LO_LHS);
} else {
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSEDOOR_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_DOOR_LHS);
}
ped->m_pVehicleAnim->SetFinishCallback(PedAnimDoorCloseCB, ped);
}
@@ -3042,7 +3042,7 @@ CPed::PedShuffle(void)
if (m_pMyVehicle->pPassengers[0] == this) {
CPed *driver = m_pMyVehicle->pDriver;
if (!driver || driver->m_objective == OBJECTIVE_LEAVE_CAR) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, m_pMyVehicle->bLowVehicle ? ANIM_CAR_LSHUFFLE_RHS : ANIM_CAR_SHUFFLE_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, m_pMyVehicle->bLowVehicle ? ANIM_STD_CAR_SHUFFLE_LO_RHS : ANIM_STD_CAR_SHUFFLE_RHS);
m_objective = OBJECTIVE_ENTER_CAR_AS_DRIVER;
m_pMyVehicle->RemovePassenger(this);
bInVehicle = false;
@@ -3065,7 +3065,7 @@ CPed::PedAnimDoorCloseCB(CAnimBlendAssociation *animAssoc, void *arg)
bool isLow = !!veh->bLowVehicle;
if (!veh->bIsBus)
- veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_CLOSEDOOR_LHS, 1.0f);
+ veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_STD_CAR_CLOSE_DOOR_LHS, 1.0f);
eDoors door;
switch (ped->m_vehDoor) {
@@ -3106,9 +3106,9 @@ CPed::PedAnimDoorCloseCB(CAnimBlendAssociation *animAssoc, void *arg)
animAssoc->blendDelta = -1000.0f;
if (isLow)
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_LSHUFFLE_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SHUFFLE_LO_RHS);
else
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_SHUFFLE_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SHUFFLE_RHS);
ped->m_pVehicleAnim->SetFinishCallback(PedSetInCarCB, ped);
}
@@ -3206,7 +3206,7 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg)
CVehicle* veh = ped->m_pMyVehicle;
if (animAssoc) {
- if ((animAssoc->animId == ANIM_CAR_ROLLOUT_LHS || animAssoc->animId == ANIM_CAR_ROLLOUT_RHS) && ped && ped->m_nPedState == PED_FALL) {
+ if ((animAssoc->animId == ANIM_STD_ROLLOUT_LHS || animAssoc->animId == ANIM_STD_ROLLOUT_RHS) && ped && ped->m_nPedState == PED_FALL) {
ped->RestoreHeadingRate();
return;
}
@@ -3230,7 +3230,7 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg)
veh->m_vecMoveSpeed += CVector(0.001f, 0.001f, 0.001f);
veh->m_vecTurnSpeed += CVector(0.001f, 0.001f, 0.001f);
if (!veh->bIsBus)
- veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_GETOUT_LHS, 1.0f);
+ veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_STD_GETOUT_LHS, 1.0f);
/*
// Duplicate and only in PC for some reason
@@ -3317,16 +3317,16 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg)
} else {
switch (door) {
case DOOR_FRONT_LEFT:
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSE_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_LHS);
break;
case DOOR_FRONT_RIGHT:
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSE_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_RHS);
break;
case DOOR_REAR_LEFT:
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSE_LHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_LHS);
break;
case DOOR_REAR_RIGHT:
- ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSE_RHS);
+ ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_RHS);
break;
default:
break;
@@ -3355,24 +3355,24 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
if (!bChangedSeat && phase != LINE_UP_TO_CAR_2) {
if (m_pMyVehicle->IsBike()) {
if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_RIDE) ||
- RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_PASSENGER)) {
+ RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_RIDE_P)) {
SetPedPositionInCar();
return;
}
} else {
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SIT)) {
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT)) {
SetPedPositionInCar();
return;
}
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LSIT)) {
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_LO)) {
SetPedPositionInCar();
return;
}
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SITP)) {
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_P)) {
SetPedPositionInCar();
return;
}
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SITPLO)) {
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_P_LO)) {
SetPedPositionInCar();
return;
}
@@ -3383,7 +3383,7 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
SetPedPositionInCar();
autoZPos = GetPosition();
CPedPlacement::FindZCoorForPed(&autoZPos);
- if (m_pVehicleAnim && (m_pVehicleAnim->animId == ANIM_CAR_ROLLOUT_LHS || m_pVehicleAnim->animId == ANIM_CAR_ROLLOUT_RHS)
+ if (m_pVehicleAnim && (m_pVehicleAnim->animId == ANIM_STD_ROLLOUT_LHS || m_pVehicleAnim->animId == ANIM_STD_ROLLOUT_RHS)
&& autoZPos.z > GetPosition().z) {
m_matrix.GetPosition().z = autoZPos.z;
}
@@ -3446,21 +3446,21 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
vehAnim = m_pVehicleAnim->animId;
switch (vehAnim) {
- case ANIM_CAR_JACKED_RHS:
- case ANIM_CAR_LJACKED_RHS:
- case ANIM_CAR_JACKED_LHS:
- case ANIM_CAR_LJACKED_LHS:
- case ANIM_VAN_GETIN_L:
- case ANIM_VAN_GETIN:
+ case ANIM_STD_JACKEDCAR_RHS:
+ case ANIM_STD_JACKEDCAR_LO_RHS:
+ case ANIM_STD_JACKEDCAR_LHS:
+ case ANIM_STD_JACKEDCAR_LO_LHS:
+ case ANIM_STD_VAN_GET_IN_REAR_LHS:
+ case ANIM_STD_VAN_GET_IN_REAR_RHS:
multExtractedFromAnim = true;
zBlend = Max(m_pVehicleAnim->GetProgress() - 0.3f, 0.0f) / (1.0f - 0.3f);
// fall through
- case ANIM_CAR_QJACKED:
- case ANIM_CAR_GETOUT_LHS:
- case ANIM_CAR_GETOUT_LOW_LHS:
- case ANIM_CAR_GETOUT_RHS:
- case ANIM_CAR_GETOUT_LOW_RHS:
+ case ANIM_STD_QUICKJACKED:
+ case ANIM_STD_GETOUT_LHS:
+ case ANIM_STD_GETOUT_LO_LHS:
+ case ANIM_STD_GETOUT_RHS:
+ case ANIM_STD_GETOUT_LO_RHS:
if (!multExtractedFromAnim) {
multExtractedFromAnim = true;
@@ -3468,49 +3468,49 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
}
// fall through
- case ANIM_CAR_CRAWLOUT_RHS:
- case ANIM_CAR_CRAWLOUT_RHS2:
- case ANIM_VAN_GETOUT_L:
- case ANIM_VAN_GETOUT:
- case ANIM_BIKE_GETOFF_RHS:
+ case ANIM_STD_CRAWLOUT_LHS:
+ case ANIM_STD_CRAWLOUT_RHS:
+ case ANIM_STD_VAN_GET_OUT_REAR_LHS:
+ case ANIM_STD_VAN_GET_OUT_REAR_RHS:
case ANIM_BIKE_GETOFF_LHS:
+ case ANIM_BIKE_GETOFF_RHS:
seatPosMult = m_pVehicleAnim->GetProgress();
break;
- case ANIM_CAR_GETIN_RHS:
- case ANIM_CAR_GETIN_LHS:
+ case ANIM_STD_CAR_GET_IN_RHS:
+ case ANIM_STD_CAR_GET_IN_LHS:
if (veh && veh->IsCar() && veh->bIsBus) {
multExtractedFromAnimBus = true;
zBlend = Min(m_pVehicleAnim->GetProgress(), 0.5f) / 0.5f;
}
// fall through
- case ANIM_CAR_QJACK:
- case ANIM_CAR_GETIN_LOW_LHS:
- case ANIM_CAR_GETIN_LOW_RHS:
- case ANIM_DRIVE_BOAT:
+ case ANIM_STD_QUICKJACK:
+ case ANIM_STD_CAR_GET_IN_LO_LHS:
+ case ANIM_STD_CAR_GET_IN_LO_RHS:
+ case ANIM_STD_BOAT_DRIVE:
seatPosMult = m_pVehicleAnim->GetTimeLeft() / m_pVehicleAnim->hierarchy->totalLength;
break;
- case ANIM_CAR_CLOSEDOOR_LHS:
- case ANIM_CAR_CLOSEDOOR_LOW_LHS:
- case ANIM_CAR_CLOSEDOOR_RHS:
- case ANIM_CAR_CLOSEDOOR_LOW_RHS:
- case ANIM_CAR_SHUFFLE_RHS:
- case ANIM_CAR_LSHUFFLE_RHS:
+ case ANIM_STD_CAR_CLOSE_DOOR_LHS:
+ case ANIM_STD_CAR_CLOSE_DOOR_LO_LHS:
+ case ANIM_STD_CAR_CLOSE_DOOR_RHS:
+ case ANIM_STD_CAR_CLOSE_DOOR_LO_RHS:
+ case ANIM_STD_CAR_SHUFFLE_RHS:
+ case ANIM_STD_CAR_SHUFFLE_LO_RHS:
seatPosMult = 0.0f;
break;
- case ANIM_CAR_JUMPIN_LHS:
+ case ANIM_STD_CAR_JUMP_IN_LO_LHS:
{
float animLength = m_pVehicleAnim->hierarchy->totalLength;
seatPosMult = Max(0.0f, 0.5f * animLength - m_pVehicleAnim->currentTime) / animLength;
break;
}
- case ANIM_CAR_CLOSE_LHS:
- case ANIM_CAR_CLOSE_RHS:
- case ANIM_COACH_OPEN_L:
- case ANIM_COACH_OPEN_R:
- case ANIM_COACH_IN_L:
- case ANIM_COACH_IN_R:
- case ANIM_COACH_OUT_L:
+ case ANIM_STD_CAR_CLOSE_LHS:
+ case ANIM_STD_CAR_CLOSE_RHS:
+ case ANIM_STD_COACH_OPEN_LHS:
+ case ANIM_STD_COACH_OPEN_RHS:
+ case ANIM_STD_COACH_GET_IN_LHS:
+ case ANIM_STD_COACH_GET_IN_RHS:
+ case ANIM_STD_COACH_GET_OUT_LHS:
seatPosMult = 1.0f;
break;
default:
@@ -3576,8 +3576,8 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
vehAnim = m_pVehicleAnim->animId;
if (veh->IsBike() && (m_pVehicleAnim && vehAnim != ANIM_BIKE_KICK)) {
float zBlend;
- if (vehAnim != ANIM_BIKE_GETOFF_RHS && vehAnim != ANIM_BIKE_GETOFF_LHS) {
- if (vehAnim != ANIM_BIKE_JUMPON_R && vehAnim != ANIM_BIKE_JUMPON_L) {
+ if (vehAnim != ANIM_BIKE_GETOFF_LHS && vehAnim != ANIM_BIKE_GETOFF_RHS) {
+ if (vehAnim != ANIM_BIKE_JUMPON_LHS && vehAnim != ANIM_BIKE_JUMPON_RHS) {
zBlend = 0.0f;
} else {
float animLength = m_pVehicleAnim->hierarchy->totalLength;
@@ -3592,10 +3592,10 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
neededPos.z += (autoZPos.z - neededPos.z) * zBlend;
} else {
currentZ = GetPosition().z;
- if (m_pVehicleAnim && vehAnim != ANIM_VAN_GETIN_L && vehAnim != ANIM_VAN_CLOSE_L && vehAnim != ANIM_VAN_CLOSE && vehAnim != ANIM_VAN_GETIN) {
+ if (m_pVehicleAnim && vehAnim != ANIM_STD_VAN_GET_IN_REAR_LHS && vehAnim != ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS && vehAnim != ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS && vehAnim != ANIM_STD_VAN_GET_IN_REAR_RHS) {
neededPos.z = autoZPos.z;
m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
- } else if (neededPos.z < currentZ && m_pVehicleAnim && vehAnim != ANIM_VAN_CLOSE_L && vehAnim != ANIM_VAN_CLOSE) {
+ } else if (neededPos.z < currentZ && m_pVehicleAnim && vehAnim != ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS && vehAnim != ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS) {
adjustedTimeStep = Max(m_pVehicleAnim->timeStep, 0.1f);
// Smoothly change ped position
@@ -3612,8 +3612,8 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
neededPos.z = (neededPos.z - currentZ) * zBlend + currentZ;
} else {
if (m_pVehicleAnim &&
- (vehAnim == ANIM_CAR_GETIN_RHS || vehAnim == ANIM_CAR_GETIN_LOW_RHS || vehAnim == ANIM_CAR_GETIN_LHS || vehAnim == ANIM_CAR_GETIN_LOW_LHS
- || vehAnim == ANIM_CAR_QJACK || vehAnim == ANIM_VAN_GETIN_L || vehAnim == ANIM_VAN_GETIN)) {
+ (vehAnim == ANIM_STD_CAR_GET_IN_RHS || vehAnim == ANIM_STD_CAR_GET_IN_LO_RHS || vehAnim == ANIM_STD_CAR_GET_IN_LHS || vehAnim == ANIM_STD_CAR_GET_IN_LO_LHS
+ || vehAnim == ANIM_STD_QUICKJACK || vehAnim == ANIM_STD_VAN_GET_IN_REAR_LHS || vehAnim == ANIM_STD_VAN_GET_IN_REAR_RHS)) {
adjustedTimeStep = Max(m_pVehicleAnim->timeStep, 0.1f);
// Smoothly change ped position
@@ -3790,9 +3790,9 @@ CPed::SetCarJack_AllClear(CVehicle* car, uint32 doorNode, uint32 doorFlag)
bUsesCollision = false;
if (m_vehDoor == CAR_DOOR_LF || m_vehDoor == CAR_DOOR_LR)
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_CAR_ALIGNHI_LHS : ANIM_CAR_ALIGN_LHS, 4.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_STD_CAR_ALIGNHI_DOOR_LHS : ANIM_STD_CAR_ALIGN_DOOR_LHS, 4.0f);
else
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_CAR_ALIGNHI_RHS : ANIM_CAR_ALIGN_RHS, 4.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_STD_CAR_ALIGNHI_DOOR_RHS : ANIM_STD_CAR_ALIGN_DOOR_RHS, 4.0f);
m_pVehicleAnim->SetFinishCallback(PedAnimAlignCB, this);
}
@@ -3853,7 +3853,7 @@ CPed::BeingDraggedFromCar(void)
bool dontRunAnim = false;
if (!m_pVehicleAnim) {
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 1000.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 1000.0f);
AssocGroupId assocGroup;
if (m_pMyVehicle && m_pMyVehicle->IsBike()) {
@@ -3863,17 +3863,17 @@ CPed::BeingDraggedFromCar(void)
} else {
if (m_vehDoor == CAR_DOOR_LF || m_vehDoor == CAR_DOOR_LR) {
if (bWillBeQuickJacked && m_vehDoor == CAR_DOOR_LF) {
- enterAnim = ANIM_CAR_QJACKED;
+ enterAnim = ANIM_STD_QUICKJACKED;
} else if (m_pMyVehicle->bLowVehicle) {
- enterAnim = ANIM_CAR_LJACKED_LHS;
+ enterAnim = ANIM_STD_JACKEDCAR_LO_LHS;
} else {
- enterAnim = ANIM_CAR_JACKED_LHS;
+ enterAnim = ANIM_STD_JACKEDCAR_LHS;
}
} else if (m_vehDoor == CAR_DOOR_RF || m_vehDoor == CAR_DOOR_RR) {
if (m_pMyVehicle->bLowVehicle)
- enterAnim = ANIM_CAR_LJACKED_RHS;
+ enterAnim = ANIM_STD_JACKEDCAR_LO_RHS;
else
- enterAnim = ANIM_CAR_JACKED_RHS;
+ enterAnim = ANIM_STD_JACKEDCAR_RHS;
} else
dontRunAnim = true;
@@ -3906,7 +3906,7 @@ CPed::BeingDraggedFromCar(void)
static float mult = 5.f;
if (m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE) {
if (m_pMyVehicle) {
- m_pMyVehicle->ProcessOpenDoor(m_vehDoor, NUM_STD_ANIMS, m_pVehicleAnim->currentTime * mult);
+ m_pMyVehicle->ProcessOpenDoor(m_vehDoor, ANIM_STD_NUM, m_pVehicleAnim->currentTime * mult);
}
}
}
@@ -4019,9 +4019,9 @@ CPed::SetEnterCar_AllClear(CVehicle *car, uint32 doorNode, uint32 doorFlag)
if (car->IsBoat()) {
if (car->pHandling->Flags & HANDLING_SIT_IN_BOAT)
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT, 100.0f);
else
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE, 100.0f);
PedSetInCarCB(nil, this);
bVehExitWillBeInstant = true;
@@ -4032,9 +4032,9 @@ CPed::SetEnterCar_AllClear(CVehicle *car, uint32 doorNode, uint32 doorFlag)
} else {
if (m_vehDoor == CAR_DOOR_LF || m_vehDoor == CAR_DOOR_LR)
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_CAR_ALIGNHI_RHS : ANIM_CAR_ALIGN_RHS, 4.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_STD_CAR_ALIGNHI_DOOR_RHS : ANIM_STD_CAR_ALIGN_DOOR_RHS, 4.0f);
else
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_CAR_ALIGNHI_LHS : ANIM_CAR_ALIGN_LHS, 4.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_STD_CAR_ALIGNHI_DOOR_LHS : ANIM_STD_CAR_ALIGN_DOOR_LHS, 4.0f);
m_pVehicleAnim->SetFinishCallback(PedAnimAlignCB, this);
}
}
@@ -4061,16 +4061,16 @@ CPed::EnterCar(void)
int anim = m_pVehicleAnim->animId;
// One is pickup and other one is pullup, not same :p
- if ((anim == ANIM_BIKE_PICKUP_R || anim == ANIM_BIKE_PICKUP_L) && m_pVehicleAnim->currentTime > 0.4667f)
+ if ((anim == ANIM_STD_BIKE_PICKUP_LHS || anim == ANIM_STD_BIKE_PICKUP_RHS) && m_pVehicleAnim->currentTime > 0.4667f)
bike->bIsBeingPickedUp = true;
- else if ((anim == ANIM_BIKE_PULLUP_R || anim == ANIM_BIKE_PULLUP_L) && m_pVehicleAnim->currentTime > 0.4667f)
+ else if ((anim == ANIM_STD_BIKE_PULLUP_LHS || anim == ANIM_STD_BIKE_PULLUP_RHS) && m_pVehicleAnim->currentTime > 0.4667f)
bike->bIsBeingPickedUp = true;
} else if (m_nPedState == PED_CARJACK && m_pVehicleAnim) {
if (m_pVehicleAnim->currentTime > 0.4f && m_pVehicleAnim->currentTime - m_pVehicleAnim->timeStep <= 0.4f) {
int anim = m_pVehicleAnim->animId;
if (anim == ANIM_BIKE_KICK) {
DMAudio.PlayOneShot(m_audioEntityId, SOUND_187, 3.0f);
- } else if (anim == ANIM_BIKE_ELBOW_R || anim == ANIM_BIKE_ELBOW_L) {
+ } else if (anim == ANIM_STD_BIKE_ELBOW_LHS || anim == ANIM_STD_BIKE_ELBOW_RHS) {
DMAudio.PlayOneShot(m_audioEntityId, SOUND_186, 3.0f);
}
}
@@ -4091,8 +4091,8 @@ CPed::QuitEnteringCar(void)
RestartNonPartialAnims();
- if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE))
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 100.0f);
+ if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE))
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 100.0f);
if (veh) {
if (m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER || m_nPedState == PED_CARJACK)
@@ -4442,7 +4442,7 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode)
m_pVehicleAnim->blendDelta = -1000.0f;
RemoveInCarAnims();
SetMoveState(PEDMOVE_NONE);
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 100.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 100.0f);
veh->AutoPilot.m_nCruiseSpeed = 0;
if (teleportNeeded) {
@@ -4450,9 +4450,9 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode)
} else {
if (veh->GetUp().z <= -0.8f && !veh->IsBike()) {
if (m_vehDoor == CAR_DOOR_RF || m_vehDoor == CAR_DOOR_RR) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_CRAWLOUT_RHS2);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CRAWLOUT_RHS);
} else if (m_vehDoor == CAR_DOOR_LF || m_vehDoor == CAR_DOOR_LR) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_CRAWLOUT_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CRAWLOUT_LHS);
}
m_pVehicleAnim->SetFinishCallback(PedSetOutCarCB, this);
@@ -4465,11 +4465,11 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode)
break;
case CAR_DOOR_RF:
case CAR_DOOR_RR:
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_GETOFF_LHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_GETOFF_RHS);
break;
case CAR_DOOR_LF:
case CAR_DOOR_LR:
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_GETOFF_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_GETOFF_LHS);
break;
default:
break;
@@ -4504,48 +4504,48 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode)
switch (m_vehDoor) {
case CAR_DOOR_RF:
if (canJumpOut) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ROLLOUT_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROLLOUT_RHS);
} else if (veh->bIsBus) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_COACH, ANIM_COACH_OUT_L);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_COACH, ANIM_STD_COACH_GET_OUT_LHS);
} else {
if (isLow)
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LOW_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LO_RHS);
else
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_RHS);
}
break;
case CAR_DOOR_RR:
if (canJumpOut) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ROLLOUT_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROLLOUT_RHS);
} else if (veh->bIsVan) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VAN, ANIM_VAN_GETOUT);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_GET_OUT_REAR_RHS);
} else if (isLow) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LOW_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LO_RHS);
} else {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_RHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_RHS);
}
break;
case CAR_DOOR_LF:
if (canJumpOut) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ROLLOUT_LHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROLLOUT_LHS);
} else if (veh->bIsBus) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_COACH, ANIM_COACH_OUT_L);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_COACH, ANIM_STD_COACH_GET_OUT_LHS);
} else {
if (isLow)
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LOW_LHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LO_LHS);
else
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LHS);
}
break;
case CAR_DOOR_LR:
if (canJumpOut) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ROLLOUT_LHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROLLOUT_LHS);
} else if (veh->bIsVan) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VAN, ANIM_VAN_GETOUT_L);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_VAN, ANIM_STD_VAN_GET_OUT_REAR_LHS);
} else if (isLow) {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LOW_LHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LO_LHS);
} else {
- m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LHS);
+ m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LHS);
}
break;
default:
@@ -4581,9 +4581,9 @@ CPed::ExitCar(void)
((CBike*)m_pMyVehicle)->KnockOffRider(WEAPONTYPE_UNARMED, 0, this, false);
}
} else if (m_pMyVehicle->IsCar()) {
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLOUT_LHS)) {
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROLLOUT_LHS)) {
((CAutomobile*)m_pMyVehicle)->KnockPedOutCar(WEAPONTYPE_UNIDENTIFIED, CAR_DOOR_LF, this);
- } else if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLOUT_RHS)) {
+ } else if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROLLOUT_RHS)) {
((CAutomobile*)m_pMyVehicle)->KnockPedOutCar(WEAPONTYPE_UNIDENTIFIED, CAR_DOOR_RF, this);
}
}
@@ -4600,9 +4600,9 @@ CPed::ExitCar(void)
else
LineUpPedWithCar(LINE_UP_TO_CAR_FALL);
- } else if (exitAnim == ANIM_CAR_ROLLOUT_LHS || exitAnim == ANIM_CAR_ROLLOUT_RHS) {
+ } else if (exitAnim == ANIM_STD_ROLLOUT_LHS || exitAnim == ANIM_STD_ROLLOUT_RHS) {
if (animTime > 0.07f && m_pMyVehicle && m_pMyVehicle->IsCar()) {
- if (exitAnim == ANIM_CAR_ROLLOUT_LHS) {
+ if (exitAnim == ANIM_STD_ROLLOUT_LHS) {
((CAutomobile*)m_pMyVehicle)->KnockPedOutCar(WEAPONTYPE_UNIDENTIFIED, CAR_DOOR_LF, this);
} else {
((CAutomobile*)m_pMyVehicle)->KnockPedOutCar(WEAPONTYPE_UNIDENTIFIED, CAR_DOOR_RF, this);
@@ -4616,7 +4616,7 @@ CPed::ExitCar(void)
if (m_pSeekTarget) {
// Car is upside down
if (m_pMyVehicle->GetUp().z > -0.8f) {
- if (exitAnim == ANIM_CAR_CLOSE_RHS || exitAnim == ANIM_CAR_CLOSE_LHS || animTime > 0.3f)
+ if (exitAnim == ANIM_STD_CAR_CLOSE_RHS || exitAnim == ANIM_STD_CAR_CLOSE_LHS || animTime > 0.3f)
LineUpPedWithCar(LINE_UP_TO_CAR_END);
else
LineUpPedWithCar((m_pMyVehicle->GetModelIndex() == MI_DODO ? LINE_UP_TO_CAR_END : LINE_UP_TO_CAR_START));
@@ -4637,7 +4637,7 @@ CPed::ExitCar(void)
}
if(foundPed && (!foundPed->IsPlayer() || m_nPedType == PEDTYPE_COP || m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT || m_objective == OBJECTIVE_KILL_CHAR_ANY_MEANS))
if (animTime > 0.4f && foundPed->IsPedInControl())
- foundPed->SetFall(1000, ANIM_KO_SKID_FRONT, 1);
+ foundPed->SetFall(1000, ANIM_STD_HIGHIMPACT_FRONT, 1);
}
}
}
@@ -4645,13 +4645,97 @@ CPed::ExitCar(void)
CVector
CPed::GetPositionToOpenCarDoor(CVehicle *veh, uint32 component)
{
- CVector vehDoorPos = GetPositionToOpenCarDoor(veh, component, 1.0f);
+ CVector doorPos;
+ CVector vehDoorOffset;
+ CVehicleModelInfo* vehModel = veh->GetModelInfo();
-/*
- // Unused
- vehDoorPosWithoutOffset = veh->GetMatrix() * localVehDoorPos;
-*/
- return vehDoorPos;
+ if (veh->IsBike()) {
+ CBike* bike = (CBike*)veh;
+
+ if (component == CAR_WINDSCREEN) {
+ doorPos = vehModel->GetFrontSeatPosn();
+ return bike->GetMatrix() * (doorPos +
+ CVector(-vecPedBikeKickAnimOffset.x, vecPedBikeKickAnimOffset.y, -vecPedBikeKickAnimOffset.z));
+ } else {
+ switch (bike->m_bikeAnimType) {
+ case ASSOCGRP_BIKE_VESPA:
+ vehDoorOffset = vecPedVespaBikeJumpRhsAnimOffset;
+ break;
+ case ASSOCGRP_BIKE_HARLEY:
+ vehDoorOffset = vecPedHarleyBikeJumpRhsAnimOffset;
+ break;
+ case ASSOCGRP_BIKE_DIRT:
+ vehDoorOffset = vecPedDirtBikeJumpRhsAnimOffset;
+ break;
+ default:
+ vehDoorOffset = vecPedStdBikeJumpRhsAnimOffset;
+ break;
+ }
+ }
+
+ doorPos = vehModel->GetFrontSeatPosn();
+ if (component == CAR_DOOR_LR || component == CAR_DOOR_RR) {
+ doorPos = vehModel->m_positions[CAR_POS_BACKSEAT];
+ }
+
+ if (component == CAR_DOOR_LR || component == CAR_DOOR_LF) {
+ vehDoorOffset.x *= -1.f;
+ }
+
+ CVector correctedPos;
+ bike->GetCorrectedWorldDoorPosition(correctedPos, vehDoorOffset, doorPos);
+ return correctedPos;
+ } else {
+ float seatOffset;
+ if (veh->bIsVan && (component == CAR_DOOR_LR || component == CAR_DOOR_RR)) {
+ seatOffset = 0.0f;
+ vehDoorOffset = vecPedVanRearDoorAnimOffset;
+ } else {
+ seatOffset = veh->pHandling->fSeatOffsetDistance;
+ if (veh->bLowVehicle) {
+ vehDoorOffset = vecPedCarDoorLoAnimOffset;
+ } else {
+ vehDoorOffset = vecPedCarDoorAnimOffset;
+ }
+ }
+
+ switch (component) {
+ case CAR_DOOR_RF:
+ doorPos = vehModel->GetFrontSeatPosn();
+ doorPos.x += seatOffset;
+ vehDoorOffset.x = -vehDoorOffset.x;
+ break;
+
+ case CAR_DOOR_RR:
+ doorPos = vehModel->m_positions[CAR_POS_BACKSEAT];
+ doorPos.x += seatOffset;
+ vehDoorOffset.x = -vehDoorOffset.x;
+ break;
+
+ case CAR_DOOR_LF:
+ doorPos = vehModel->GetFrontSeatPosn();
+ doorPos.x += seatOffset;
+ doorPos.x = -doorPos.x;
+ break;
+
+ case CAR_DOOR_LR:
+ doorPos = vehModel->m_positions[CAR_POS_BACKSEAT];
+ doorPos.x += seatOffset;
+ doorPos.x = -doorPos.x;
+ break;
+
+ default:
+ doorPos = vehModel->GetFrontSeatPosn();
+ vehDoorOffset = CVector(0.0f, 0.0f, 0.0f);
+ break;
+ }
+
+ CVector diffVec = doorPos - vehDoorOffset;
+ return Multiply3x3(veh->GetMatrix(), diffVec) + veh->GetPosition();
+
+ //unused
+ //doorPos = Multiply3x3(veh->GetMatrix(), doorPos) + veh->GetMatrix();
+ }
}
void
@@ -4849,7 +4933,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
CAnimManager::AddAnimBlockRef(bikehBlock);
CAnimManager::AddAnimBlockRef(bikedBlock);
- CAnimBlendHierarchy *enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_CAR_JACKED_LHS)->hierarchy;
+ CAnimBlendHierarchy *enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_JACKEDCAR_LHS)->hierarchy;
CAnimBlendSequence *seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4861,7 +4945,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_CAR_GETIN_LHS)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LHS)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4873,7 +4957,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_LHS)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_LHS)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4885,7 +4969,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_CAR_QJACKED)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_QUICKJACKED)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4897,7 +4981,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_VAN, ANIM_VAN_GETIN_L)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_VAN, ANIM_STD_VAN_GET_IN_REAR_LHS)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4909,7 +4993,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_TRAIN_GETOUT)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_TRAIN_GETOUT)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4921,7 +5005,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_BIKE_STANDARD, ANIM_BIKE_JUMPON_R)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_BIKE_STANDARD, ANIM_BIKE_JUMPON_LHS)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4933,7 +5017,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_BIKE_VESPA, ANIM_BIKE_JUMPON_R)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_BIKE_VESPA, ANIM_BIKE_JUMPON_LHS)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4945,7 +5029,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_BIKE_HARLEY, ANIM_BIKE_JUMPON_R)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_BIKE_HARLEY, ANIM_BIKE_JUMPON_LHS)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -4957,7 +5041,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void)
}
}
- enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_BIKE_DIRT, ANIM_BIKE_JUMPON_R)->hierarchy;
+ enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_BIKE_DIRT, ANIM_BIKE_JUMPON_LHS)->hierarchy;
seq = enterAssoc->sequences;
CAnimManager::UncompressAnimation(enterAssoc);
if (seq->numFrames > 0) {
@@ -5103,7 +5187,7 @@ CPed::PedSetDraggedOutCarPositionCB(CAnimBlendAssociation* animAssoc, void* arg)
break;
}
} else {
- draggedOutOffset = vecPedDraggedOutCarAnimOffset;
+ draggedOutOffset = CVector(vecPedDraggedOutCarAnimOffset.x, vecPedDraggedOutCarAnimOffset.y, 0.0f);
}
if (ped->m_vehDoor == CAR_DOOR_RF || ped->m_vehDoor == CAR_DOOR_RR)
draggedOutOffset.x = -draggedOutOffset.x;
@@ -5114,7 +5198,7 @@ CPed::PedSetDraggedOutCarPositionCB(CAnimBlendAssociation* animAssoc, void* arg)
ped->m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
ped->SetPosition(posAfterBeingDragged);
- if (ped->m_pMyVehicle && !ped->m_pMyVehicle->IsBike() && !ped->m_pMyVehicle->IsRoomForPedToLeaveCar(ped->m_vehDoor, &vecPedDraggedOutCarAnimOffset)) {
+ if (ped->m_pMyVehicle && !ped->m_pMyVehicle->IsBike() && !ped->m_pMyVehicle->IsRoomForPedToLeaveCar(ped->m_vehDoor, &draggedOutOffset)) {
ped->PositionPedOutOfCollision();
}
@@ -5280,7 +5364,7 @@ CPed::SetEnterTrain(CVehicle *train, uint32 unused)
m_pMyVehicle->RegisterReference((CEntity **) &m_pMyVehicle);
SetPedState(PED_ENTER_TRAIN);
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_TRAIN_GETIN, 4.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_TRAIN_GETIN, 4.0f);
m_pVehicleAnim->SetFinishCallback(PedSetInTrainCB, this);
bUsesCollision = false;
LineUpPedWithTrain();
@@ -5354,7 +5438,7 @@ CPed::SetExitTrain(CVehicle* train)
GetNearestTrainPedPosition(train, exitPos);
*/
SetPedState(PED_EXIT_TRAIN);
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_TRAIN_GETOUT, 4.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_TRAIN_GETOUT, 4.0f);
m_pVehicleAnim->SetFinishCallback(PedSetOutTrainCB, this);
bUsesCollision = false;
LineUpPedWithTrain();
@@ -5729,7 +5813,12 @@ CPed::GetPositionToOpenCarDoor(CVehicle *veh, uint32 component, float offset)
doorPos = vehModel->GetFrontSeatPosn();
if (component == CAR_WINDSCREEN) {
+#ifdef FIX_BUGS
+ return bike->GetMatrix() * (doorPos +
+ CVector(-vecPedBikeKickAnimOffset.x, vecPedBikeKickAnimOffset.y, -vecPedBikeKickAnimOffset.z));
+#else
return bike->GetMatrix() * (doorPos + vecPedBikeKickAnimOffset);
+#endif
} else {
switch (bike->m_bikeAnimType) {
case ASSOCGRP_BIKE_VESPA:
@@ -5860,14 +5949,14 @@ CPed::SetDuck(uint32 time, bool sth)
CAnimBlendAssociation *duckAssoc;
if (bCrouchWhenShooting) {
- duckAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_WEAPON_CROUCH, 4.0f);
+ duckAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DUCK_WEAPON, 4.0f);
duckAssoc->flags &= ~ASSOC_FADEOUTWHENDONE;
bIsDucking = true;
m_duckTimer = CTimer::GetTimeInMilliseconds() + time;
} else {
- CAnimBlendAssociation *duckAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
+ CAnimBlendAssociation *duckAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN);
if (!duckAssoc || duckAssoc->blendDelta < 0.0f) {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DUCK_DOWN, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DUCK_DOWN, 4.0f);
bIsDucking = true;
m_duckTimer = CTimer::GetTimeInMilliseconds() + time;
}
@@ -5881,7 +5970,7 @@ CPed::Duck(void)
ClearDuck();
else if (bIsDucking && bCrouchWhenShooting) {
CWeaponInfo *weapon = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
- CAnimBlendAssociation *crouchAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH);
+ CAnimBlendAssociation *crouchAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_WEAPON);
if (!crouchAnim) {
if(GetCrouchFireAnim(weapon))
crouchAnim = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(weapon));
@@ -5903,12 +5992,12 @@ CPed::Duck(void)
void
CPed::ClearDuck(bool clearTimer)
{
- CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
+ CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN);
if (!animAssoc) {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_LOW);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_LOW);
}
if (!animAssoc) {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_WEAPON);
}
if (animAssoc) {
@@ -5967,9 +6056,9 @@ CPed::PedAnimDoorCloseRollingCB(CAnimBlendAssociation* animAssoc, void* arg)
animAssoc->blendDelta = -1000.0f;
if (veh->bLowVehicle) {
- veh->ProcessOpenDoor(CAR_DOOR_LF, ANIM_CAR_ROLLDOOR_LOW, 1.0f);
+ veh->ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS, 1.0f);
} else {
- veh->ProcessOpenDoor(CAR_DOOR_LF, ANIM_CAR_ROLLDOOR, 1.0f);
+ veh->ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, 1.0f);
}
veh->m_nGettingOutFlags &= ~CAR_DOOR_FLAG_LF;
@@ -6042,28 +6131,28 @@ CPed::AddInCarAnims(CVehicle* car, bool isDriver)
{
if (car->IsBoat()) {
if (car->pHandling->Flags & HANDLING_SIT_IN_BOAT) {
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT, 100.0f);
} else {
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE, 100.0f);
}
} else if (car->IsBike()) {
if (isDriver) {
m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ((CBike*)car)->m_bikeAnimType, ANIM_BIKE_RIDE, 100.0f);
} else {
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ((CBike*)car)->m_bikeAnimType, ANIM_BIKE_PASSENGER, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ((CBike*)car)->m_bikeAnimType, ANIM_BIKE_RIDE_P, 100.0f);
}
} else {
if (isDriver) {
if (car->bLowVehicle) {
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_LSIT, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT_LO, 100.0f);
} else {
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT, 100.0f);
}
} else {
if (car->bLowVehicle) {
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SITPLO, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT_P_LO, 100.0f);
} else {
- m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SITP, 100.0f);
+ m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT_P, 100.0f);
}
}
}
@@ -6076,24 +6165,24 @@ CPed::RemoveDrivebyAnims()
{
CAnimBlendAssociation *animAssoc;
- AnimationId LeftAnim = ANIM_DRIVEBY_L;
- AnimationId RightAnim = ANIM_DRIVEBY_R;
+ AnimationId LeftAnim = ANIM_STD_CAR_DRIVEBY_LEFT;
+ AnimationId RightAnim = ANIM_STD_CAR_DRIVEBY_RIGHT;
if (m_pMyVehicle->pHandling->Flags & HANDLING_IS_BIKE) {
- LeftAnim = ANIM_BIKE_DRIVEBY_LHS;
- RightAnim = ANIM_BIKE_DRIVEBY_RHS;
+ LeftAnim = ANIM_BIKE_DRIVEBY_RHS;
+ RightAnim = ANIM_BIKE_DRIVEBY_LHS;
} else if (m_pMyVehicle->bLowVehicle) {
- LeftAnim = ANIM_DRIVEBY_LOW_L;
- RightAnim = ANIM_DRIVEBY_LOW_R;
+ LeftAnim = ANIM_STD_CAR_DRIVEBY_LEFT_LO;
+ RightAnim = ANIM_STD_CAR_DRIVEBY_RIGHT_LO;
}
- animAssoc = RpAnimBlendClumpGetAssociation((RpClump*)m_rwObject, ANIM_BIKE_DRIVEBY_LHS);
+ animAssoc = RpAnimBlendClumpGetAssociation((RpClump*)m_rwObject, ANIM_BIKE_DRIVEBY_RHS);
if (animAssoc)
animAssoc->blendDelta = -1000.0f;
- animAssoc = RpAnimBlendClumpGetAssociation((RpClump*)m_rwObject, ANIM_BIKE_DRIVEBY_RHS);
+ animAssoc = RpAnimBlendClumpGetAssociation((RpClump*)m_rwObject, ANIM_BIKE_DRIVEBY_LHS);
if (animAssoc)
animAssoc->blendDelta = -1000.0f;
- animAssoc = RpAnimBlendClumpGetAssociation((RpClump*)m_rwObject, ANIM_BIKE_DRIVEBY_FT);
+ animAssoc = RpAnimBlendClumpGetAssociation((RpClump*)m_rwObject, ANIM_BIKE_DRIVEBY_FORWARD);
if (animAssoc)
animAssoc->blendDelta = -1000.0f;
}
@@ -6357,7 +6446,7 @@ CPed::WarpPedToNearEntityOffScreen(CEntity *warpTo)
if (Abs(zCorrectedPos.z - warpToPos.z) < 3.0f || Abs(zCorrectedPos.z - appropriatePos.z) < 3.0f) {
appropriatePos.z = zCorrectedPos.z;
- if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f, &TheCamera.GetCameraMatrix())
+ if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f)
&& CWorld::GetIsLineOfSightClear(appropriatePos, warpToPos, true, true, false, true, false, false, false)
&& !CWorld::TestSphereAgainstWorld(appropriatePos, 0.6f, this, true, true, false, true, false, false)) {
teleported = true;
@@ -6563,11 +6652,11 @@ CPed::KillCharOnFootArmed(CVector &ourPos, CVector &targetPos, CVector &distWith
&& distWithTargetSc < wepRange && m_pedInObjective->m_nPedState != PED_GETUP && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) {
if (bIsDucking && !bCrouchWhenShooting) {
- CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
+ CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN);
if (!duckAnim)
- duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_LOW);
+ duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_LOW);
if (!duckAnim)
- duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH);
+ duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_WEAPON);
if (duckAnim) {
duckAnim->flags |= ASSOC_DELETEFADEDOUT;
@@ -6822,7 +6911,7 @@ CPed::KillCharOnFootMelee(CVector &ourPos, CVector &targetPos, CVector &distWith
}
if (goForward) {
m_curFightMove = FIGHTMOVE_SHUFFLE_F;
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_SH_BACK, 16.f)->SetFinishCallback(FinishFightMoveCB,this);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_SHUFFLE_B, 16.f)->SetFinishCallback(FinishFightMoveCB,this);
m_fightState = FIGHTSTATE_NO_MOVE;
m_fightButtonPressure = 0;
m_takeAStepAfterAttack = false;
@@ -6850,11 +6939,11 @@ CPed::KillCharOnFootMelee(CVector &ourPos, CVector &targetPos, CVector &distWith
&& distWithTargetSc < wepRange && m_pedInObjective->m_nPedState != PED_GETUP && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) {
if (bIsDucking) {
- CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
+ CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN);
if (!duckAnim)
- duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_LOW);
+ duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_LOW);
if (!duckAnim)
- duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH);
+ duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_WEAPON);
if (duckAnim) {
duckAnim->flags |= ASSOC_DELETEFADEDOUT;
diff --git a/src/peds/PedAttractor.cpp b/src/peds/PedAttractor.cpp
index de587270..91139def 100644
--- a/src/peds/PedAttractor.cpp
+++ b/src/peds/PedAttractor.cpp
@@ -113,7 +113,11 @@ const C2dEffect* CPedAttractorManager::GetEffectForIceCreamVan(CVehicle* pVehicl
CVehicleToEffect effect(pVehicle);
vVehicleToEffect.push_back(effect);
POP_MEMID();
+#ifdef FIX_BUGS
+ return vVehicleToEffect.back().ChooseEffect(pos);
+#else
return effect.ChooseEffect(pos);
+#endif
}
CVehicle* CPedAttractorManager::GetIceCreamVanForEffect(C2dEffect* pEffect)
@@ -658,12 +662,12 @@ CPedAttractor* CPedAttractorManager::RegisterPed(CPed* pPed, C2dEffect* pEffect,
}
PUSH_MEMID(MEMID_PED_ATTR);
switch (pEffect->pedattr.type) {
- case ATTRACTOR_ATM: vecAttractors.push_back(new CPedAtmAttractor(pEffect, matrix, gcMaxSizeOfAtmQueue, 1.0f, 30000.0f, 3000.0f, 0.2f, 0.15f, 0.1f, 0.1f)); break;
- case ATTRACTOR_SEAT: vecAttractors.push_back(new CPedSeatAttractor(pEffect, matrix, gcMaxSizeOfSeatQueue, 1.0f, 30000.0f, 3000.0f, 0.125f, 0.1f, 0.1f, 0.1f)); break;
- case ATTRACTOR_STOP: vecAttractors.push_back(new CPedStopAttractor(pEffect, matrix, gcMaxSizeOfStopQueue, 1.0f, 30000.0f, 3000.0f, 0.2f, 0.1f, 0.1f, 0.1f)); break;
- case ATTRACTOR_PIZZA: vecAttractors.push_back(new CPedPizzaAttractor(pEffect, matrix, gcMaxSizeOfPizzaQueue, 1.0f, 30000.0f, 3000.0f, 0.2f, 0.1f, 0.1f, 0.1f)); break;
- case ATTRACTOR_SHELTER: vecAttractors.push_back(new CPedShelterAttractor(pEffect, matrix, gcMaxSizeOfShelterQueue, 1.0f, 30000.0f, 3000.0f, 0.5f, 6.28f, 0.1f, 0.1f)); break;
- case ATTRACTOR_ICECREAM: vecAttractors.push_back(new CPedIceCreamAttractor(pEffect, matrix, gcMaxSizeOfIceCreamQueue, 1.0f, 30000.0f, 3000.0f, 0.2f, 0.3f, 0.1f, 0.1f)); break;
+ case ATTRACTOR_ATM: pRegisteredAttractor = new CPedAtmAttractor(pEffect, matrix, gcMaxSizeOfAtmQueue, 1.0f, 30000.0f, 3000.0f, 0.2f, 0.15f, 0.1f, 0.1f); vecAttractors.push_back(pRegisteredAttractor); break;
+ case ATTRACTOR_SEAT: pRegisteredAttractor = new CPedSeatAttractor(pEffect, matrix, gcMaxSizeOfSeatQueue, 1.0f, 30000.0f, 3000.0f, 0.125f, 0.1f, 0.1f, 0.1f); vecAttractors.push_back(pRegisteredAttractor); break;
+ case ATTRACTOR_STOP: pRegisteredAttractor = new CPedStopAttractor(pEffect, matrix, gcMaxSizeOfStopQueue, 1.0f, 30000.0f, 3000.0f, 0.2f, 0.1f, 0.1f, 0.1f); vecAttractors.push_back(pRegisteredAttractor); break;
+ case ATTRACTOR_PIZZA: pRegisteredAttractor = new CPedPizzaAttractor(pEffect, matrix, gcMaxSizeOfPizzaQueue, 1.0f, 30000.0f, 3000.0f, 0.2f, 0.1f, 0.1f, 0.1f); vecAttractors.push_back(pRegisteredAttractor); break;
+ case ATTRACTOR_SHELTER: pRegisteredAttractor = new CPedShelterAttractor(pEffect, matrix, gcMaxSizeOfShelterQueue, 1.0f, 30000.0f, 3000.0f, 0.5f, 6.28f, 0.1f, 0.1f); vecAttractors.push_back(pRegisteredAttractor); break;
+ case ATTRACTOR_ICECREAM: pRegisteredAttractor = new CPedIceCreamAttractor(pEffect, matrix, gcMaxSizeOfIceCreamQueue, 1.0f, 30000.0f, 3000.0f, 0.2f, 0.3f, 0.1f, 0.1f); vecAttractors.push_back(pRegisteredAttractor); break;
}
POP_MEMID();
if (pRegisteredAttractor)
diff --git a/src/peds/PedDebug.cpp b/src/peds/PedDebug.cpp
index aed11357..0dbabb58 100644
--- a/src/peds/PedDebug.cpp
+++ b/src/peds/PedDebug.cpp
@@ -157,6 +157,9 @@ static char PersonalityTypeText[][18] = {
"Old Girl",
"Tough Girl",
"Tramp",
+#ifdef FIX_BUGS // there's male and female ones
+ "Tramp",
+#endif
"Tourist",
"Prostitute",
"Criminal",
diff --git a/src/peds/PedFight.cpp b/src/peds/PedFight.cpp
index 6c691d2d..a94dc9bd 100644
--- a/src/peds/PedFight.cpp
+++ b/src/peds/PedFight.cpp
@@ -32,38 +32,38 @@ RpClump* flyingClumpTemp;
FightMove tFightMoves[NUM_FIGHTMOVES] =
{
/*
- { NUM_STD_ANIMS, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_PUNCH_R, 0.2f, 8.f/30.f, 0.0f, 0.3f, 1.0f, HITLEVEL_HIGH, 1, 0 },
- { ANIM_FIGHT_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_FIGHT_SH_F, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_FIGHT_KNEE, 4.f/30.f, 0.2f, 0.0f, 0.6f, 1.0f, HITLEVEL_LOW, 2, 0 },
- { ANIM_FIGHT_LHOOK, 8.f/30.f, 10.f/30.f, 0.0f, 0.4f, 1.0f, HITLEVEL_HIGH, 3, 0 },
- { ANIM_FIGHT_JAB, 4.f/30.f, 0.2f, 0.0f, 0.7f, 1.0f, HITLEVEL_HIGH, 3, 0 },
- { ANIM_FIGHT_PUNCH, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
- { ANIM_FIGHT_LONGKICK, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_MEDIUM, 4, 0 },
- { ANIM_FIGHT_ROUNDHOUSE, 8.f/30.f, 10.f/30.f, 0.0f, 0.6f, 1.0f, HITLEVEL_MEDIUM, 4, 0 },
- { ANIM_FIGHT_KICK, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_HIGH, 2, 0 },
- { ANIM_FIGHT_HEAD, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_MEDIUM, 2, 0 },
- { ANIM_FIGHT_BKICK_L, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_LOW, 2, 0 },
- { ANIM_FIGHT_BKICK_L, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_LOW, 2, 0 },
- { ANIM_FIGHT_ELBOW_L, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_MEDIUM, 2, 0 },
- { ANIM_FIGHT_BKICK_R, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_MEDIUM, 2, 0 },
- { ANIM_FIGHT_ELBOW_R, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_HIGH, 2, 0 },
- { ANIM_KICK_FLOOR, 10.f/30.f, 14.f/30.f, 0.0f, 0.4f, 1.0f, HITLEVEL_GROUND, 1, 0 },
- { ANIM_HIT_FRONT, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_HIT_BACK, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_HIT_RIGHT, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_HIT_LEFT, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_HIT_BODYBLOW, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_HIT_CHEST, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_HIT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_HIT_WALK, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_FLOOR_HIT, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_HIT_BEHIND, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
- { ANIM_WEAPON_FIRE, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
- { ANIM_WEAPON_CROUCHFIRE, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
- { ANIM_WEAPON_SPECIAL, 4.f / 30.f, 7.f / 30.f, 10.f / 30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
- { ANIM_FIGHT2_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 }
+ { ANIM_STD_NUM, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_PUNCH, 0.2f, 8.f/30.f, 0.0f, 0.3f, 1.0f, HITLEVEL_HIGH, 1, 0 },
+ { ANIM_STD_FIGHT_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_FIGHT_SHUFFLE_F, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_FIGHT_KNEE, 4.f/30.f, 0.2f, 0.0f, 0.6f, 1.0f, HITLEVEL_LOW, 2, 0 },
+ { ANIM_STD_FIGHT_LHOOK, 8.f/30.f, 10.f/30.f, 0.0f, 0.4f, 1.0f, HITLEVEL_HIGH, 3, 0 },
+ { ANIM_STD_FIGHT_JAB, 4.f/30.f, 0.2f, 0.0f, 0.7f, 1.0f, HITLEVEL_HIGH, 3, 0 },
+ { ANIM_STD_FIGHT_PUNCH, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
+ { ANIM_STD_FIGHT_LONGKICK, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_MEDIUM, 4, 0 },
+ { ANIM_STD_FIGHT_ROUNDHOUSE, 8.f/30.f, 10.f/30.f, 0.0f, 0.6f, 1.0f, HITLEVEL_MEDIUM, 4, 0 },
+ { ANIM_STD_FIGHT_KICK, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_HIGH, 2, 0 },
+ { ANIM_STD_FIGHT_HEAD, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_MEDIUM, 2, 0 },
+ { ANIM_STD_FIGHT_BKICK_L, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_LOW, 2, 0 },
+ { ANIM_STD_FIGHT_BKICK_L, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_LOW, 2, 0 },
+ { ANIM_STD_FIGHT_ELBOW_L, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_MEDIUM, 2, 0 },
+ { ANIM_STD_FIGHT_BKICK_R, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_MEDIUM, 2, 0 },
+ { ANIM_STD_FIGHT_ELBOW_R, 8.f/30.f, 10.f/30.f, 0.0f, 0.5f, 1.0f, HITLEVEL_HIGH, 2, 0 },
+ { ANIM_STD_KICKGROUND, 10.f/30.f, 14.f/30.f, 0.0f, 0.4f, 1.0f, HITLEVEL_GROUND, 1, 0 },
+ { ANIM_STD_HIT_FRONT, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_BACK, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_RIGHT, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_LEFT, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_BODYBLOW, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_CHEST, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_WALK, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_FLOOR, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_STD_HIT_BEHIND, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
+ { ANIM_ATTACK_1, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
+ { ANIM_ATTACK_2, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
+ { ANIM_ATTACK_3, 4.f / 30.f, 7.f / 30.f, 10.f / 30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
+ { ANIM_STD_FIGHT_2IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 }
*/
};
@@ -184,14 +184,14 @@ CPed::SetPointGunAt(CEntity *to)
if (bCrouchWhenShooting && bIsDucking && GetCrouchFireAnim(curWeapon)) {
aimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(curWeapon));
} else {
- aimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE);
+ aimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_1);
}
if (!aimAssoc || aimAssoc->blendDelta < 0.0f) {
if (bCrouchWhenShooting && bIsDucking && GetCrouchFireAnim(curWeapon)) {
aimAssoc = CAnimManager::BlendAnimation(GetClump(), curWeapon->m_AnimToPlay, GetCrouchFireAnim(curWeapon), 4.0f);
} else {
- aimAssoc = CAnimManager::AddAnimation(GetClump(), curWeapon->m_AnimToPlay, ANIM_WEAPON_FIRE);
+ aimAssoc = CAnimManager::AddAnimation(GetClump(), curWeapon->m_AnimToPlay, ANIM_ATTACK_1);
}
aimAssoc->blendAmount = 0.0f;
@@ -206,7 +206,7 @@ CPed::PointGunAt(void)
{
CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
float animLoopStart = weaponInfo->m_fAnimLoopStart;
- CAnimBlendAssociation *weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE);
+ CAnimBlendAssociation *weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_1);
if (!weaponAssoc || weaponAssoc->blendDelta < 0.0f) {
if (weaponInfo->IsFlagSet(WEAPONFLAG_CROUCHFIRE)) {
weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(weaponInfo));
@@ -242,7 +242,7 @@ CPed::ClearPointGunAt(void)
RestorePreviousState();
}
weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_1);
if (!animAssoc || animAssoc->blendDelta < 0.0f) {
if (weaponInfo->IsFlagSet(WEAPONFLAG_CROUCHFIRE)) {
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetCrouchFireAnim(weaponInfo));
@@ -505,7 +505,7 @@ CPed::FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg)
}
if (GetCrouchFireAnim(currentWeapon) && attackAssoc) {
if (attackAssoc->animId == GetCrouchFireAnim(currentWeapon) && !reloadAnimAssoc) {
- newAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_WEAPON_CROUCH, 8.0f);
+ newAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_DUCK_WEAPON, 8.0f);
newAnim->SetCurrentTime(newAnim->hierarchy->totalLength);
newAnim->flags &= ~ASSOC_RUNNING;
}
@@ -527,7 +527,7 @@ CPed::FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg)
}
if (GetCrouchFireAnim(currentWeapon) && attackAssoc) {
if (attackAssoc->animId == GetCrouchFireAnim(currentWeapon) && !reloadAnimAssoc) {
- newAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_WEAPON_CROUCH, 8.0f);
+ newAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_DUCK_WEAPON, 8.0f);
newAnim->SetCurrentTime(newAnim->hierarchy->totalLength);
newAnim->flags &= ~ASSOC_RUNNING;
}
@@ -586,7 +586,7 @@ CPed::FinishedReloadCB(CAnimBlendAssociation *reloadAssoc, void *arg)
}
if (weapon->IsFlagSet(WEAPONFLAG_RELOAD) && reloadAssoc) {
if (reloadAssoc->animId == GetCrouchReloadAnim(weapon) && !crouchFireAssoc) {
- CAnimBlendAssociation *crouchAssoc = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_WEAPON_CROUCH, 8.0f);
+ CAnimBlendAssociation *crouchAssoc = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_DUCK_WEAPON, 8.0f);
crouchAssoc->SetCurrentTime(crouchAssoc->hierarchy->totalLength);
crouchAssoc->flags &= ~ASSOC_RUNNING;
}
@@ -823,7 +823,7 @@ CPed::Attack(void)
|| weaponAnimAssoc->currentTime - weaponAnimAssoc->timeStep > delayBetweenAnimAndFire) {
if (GetWeapon()->m_eWeaponType == WEAPONTYPE_CHAINSAW) {
- DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_ATTACK, 0.0f);
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_IDLE, 0.0f);
} else if (weaponAnimTime <= delayBetweenAnimAndFire || weaponAnimTime - weaponAnimAssoc->timeStep > delayBetweenAnimAndFire || !weaponAnimAssoc->IsRunning()) {
if (weaponAnimAssoc->speed < 1.0f)
weaponAnimAssoc->speed = 1.0f;
@@ -899,7 +899,7 @@ CPed::Attack(void)
CPad::GetPad(0)->StartShake(240, 180);
}
} else {
- DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_IDLE, 0.0f);
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_ATTACK, 0.0f);
if (IsPlayer()) {
CPad::GetPad(0)->StartShake(240, 90);
}
@@ -992,13 +992,13 @@ CPed::Attack(void)
if (GetFireAnimGround(ourWeapon, false)) {
weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, fireAnim, 8.0f);
} else {
- weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_KICK_FLOOR, 8.0f);
+ weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_KICKGROUND, 8.0f);
}
}
weaponAnimAssoc->SetFinishCallback(FinishedAttackCB, this);
} else if (GetSecondFireAnim(ourWeapon)) {
if (weaponAnimAssoc->animId == GetSecondFireAnim(ourWeapon)) {
- weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, ANIM_WEAPON_FIRE, 8.0f);
+ weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, ANIM_ATTACK_1, 8.0f);
} else {
weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, GetSecondFireAnim(ourWeapon), 8.0f);
}
@@ -1052,9 +1052,9 @@ CPed::StartFightAttack(uint8 buttonPressure)
RestoreHeadingRate();
}
- CAnimBlendAssociation* animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP);
+ CAnimBlendAssociation* animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP1);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP2);
if (animAssoc) {
RestoreHeadingRate();
@@ -1070,10 +1070,10 @@ CPed::StartFightAttack(uint8 buttonPressure)
fightIdleAssoc = CAnimManager::BlendAnimation(GetClump(), weaponInfo->m_AnimToPlay, GetFightIdleWithMeleeAnim(weaponInfo), 1000.0f);
fightWithWeapon = true;
} else {
- fightIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE, 1000.0f);
+ fightIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_IDLE, 1000.0f);
}
} else {
- fightIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE, 1000.0f);
+ fightIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_IDLE, 1000.0f);
}
m_lastFightMove = FIGHTMOVE_IDLE;
m_curFightMove = IsPlayer() ? ChooseAttackPlayer(buttonPressure, fightWithWeapon) : ChooseAttackAI(buttonPressure, fightWithWeapon);
@@ -1130,7 +1130,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
if (hitLevel == HITLEVEL_GROUND) {
CAnimBlendAssociation *floorHitAssoc;
if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL)) {
- floorHitAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT_F, 8.0f);
+ floorHitAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR_FRONT, 8.0f);
} else {
floorHitAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[FIGHTMOVE_HITONFLOOR].animId, 8.0f);
}
@@ -1152,8 +1152,8 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
} else if (m_nPedState == PED_FALL) {
if (hitLevel == HITLEVEL_GROUND && !IsPedHeadAbovePos(-0.3f)) {
CAnimBlendAssociation *floorHitAssoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL) ?
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT_F, 8.0f) :
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR_FRONT, 8.0f) :
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR, 8.0f);
if (floorHitAssoc) {
floorHitAssoc->flags &= ~ASSOC_FADEOUTWHENDONE;
floorHitAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -1168,16 +1168,16 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
AnimationId shotAnim;
switch (direction) {
case 1:
- shotAnim = ANIM_SHOT_LEFT_PARTIAL;
+ shotAnim = ANIM_STD_HITBYGUN_LEFT;
break;
case 2:
- shotAnim = ANIM_SHOT_BACK_PARTIAL;
+ shotAnim = ANIM_STD_HITBYGUN_BACK;
break;
case 3:
- shotAnim = ANIM_SHOT_RIGHT_PARTIAL;
+ shotAnim = ANIM_STD_HITBYGUN_RIGHT;
break;
default:
- shotAnim = ANIM_SHOT_FRONT_PARTIAL;
+ shotAnim = ANIM_STD_HITBYGUN_FRONT;
break;
}
CAnimBlendAssociation *shotAssoc = RpAnimBlendClumpGetAssociation(GetClump(), shotAnim);
@@ -1196,32 +1196,32 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
AnimationId hitAnim;
switch (direction) {
case 1:
- hitAnim = ANIM_KO_SPIN_R;
+ hitAnim = ANIM_STD_HIGHIMPACT_LEFT;
break;
case 2:
if (CGeneral::GetRandomNumber() & 1) {
fall = false;
- hitAnim = ANIM_HIT_BACK;
+ hitAnim = ANIM_STD_HIT_BACK;
} else {
- hitAnim = ANIM_KO_SKID_BACK;
+ hitAnim = ANIM_STD_HIGHIMPACT_BACK;
}
break;
case 3:
- hitAnim = ANIM_KO_SPIN_L;
+ hitAnim = ANIM_STD_HIGHIMPACT_RIGHT;
break;
default:
if (hitLevel == HITLEVEL_LOW) {
- hitAnim = ANIM_KO_SHOT_STOM;
+ hitAnim = ANIM_STD_KO_SHOT_STOMACH;
/* LCS: removed
} else if (CGeneral::GetRandomNumber() & 1) {
fall = false;
- hitAnim = ANIM_HIT_WALK;
+ hitAnim = ANIM_STD_HIT_WALK;
} else if (CGeneral::GetRandomNumber() & 1) {
fall = false;
- hitAnim = ANIM_HIT_HEAD;
+ hitAnim = ANIM_STD_HIT_HEAD;
*/
} else {
- hitAnim = ANIM_KO_SHOT_FACE;
+ hitAnim = ANIM_STD_KO_SHOT_FACE;
}
break;
}
@@ -1246,11 +1246,11 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
break;
case HITLEVEL_LOW:
if (direction == 2 && (!IsPlayer() || ((CGeneral::GetRandomNumber() & 1) && m_fHealth < 30.0f))) {
- SetFall(1000, ANIM_KO_SKID_BACK, false);
+ SetFall(1000, ANIM_STD_HIGHIMPACT_BACK, false);
Say(SOUND_PED_DEFEND);
return;
} else if (direction != 2 && !IsPlayer() && (CGeneral::GetRandomNumber() & 1) && m_fHealth < 30.0f) {
- SetFall(1000, ANIM_KO_SHOT_STOM, false);
+ SetFall(1000, ANIM_STD_KO_SHOT_STOMACH, false);
Say(SOUND_PED_DEFEND);
return;
}
@@ -1330,14 +1330,14 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
m_fightButtonPressure = 0;
m_lastFightMove = FIGHTMOVE_IDLE;
RpAnimBlendClumpRemoveAssociations(GetClump(), ASSOC_REPEAT);
- CAnimBlendAssociation *walkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK_START);
+ CAnimBlendAssociation *walkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_STARTWALK);
if (walkStartAssoc) {
walkStartAssoc->flags |= ASSOC_DELETEFADEDOUT;
walkStartAssoc->blendDelta = -1000.0f;
}
- CAnimBlendAssociation *walkStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP);
+ CAnimBlendAssociation *walkStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP1);
if (!walkStopAssoc)
- walkStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R);
+ walkStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP2);
if (walkStopAssoc) {
walkStopAssoc->flags |= ASSOC_DELETEFADEDOUT;
walkStopAssoc->blendDelta = -1000.0f;
@@ -1352,10 +1352,10 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
if (GetFightIdleWithMeleeAnim(weaponInfo)) {
fightIdleAssoc = CAnimManager::AddAnimation(GetClump(), weaponInfo->m_AnimToPlay, GetFightIdleWithMeleeAnim(weaponInfo));
} else {
- fightIdleAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE);
+ fightIdleAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_IDLE);
}
} else {
- fightIdleAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE);
+ fightIdleAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_IDLE);
}
fightIdleAssoc->blendAmount = 1.0f;
CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_curFightMove].animId, 8.0f);
@@ -1409,7 +1409,7 @@ CPed::Fight(void)
}
if (m_curFightMove == FIGHTMOVE_SHUFFLE_F && !currentAssoc)
- currentAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_SH_BACK);
+ currentAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_SHUFFLE_B);
if (IsPlayer() && currentAssoc && weapon == WEAPONTYPE_KATANA) {
if (m_curFightMove == FIGHTMOVE_MELEE1 || m_curFightMove == FIGHTMOVE_MELEE2) {
@@ -1938,7 +1938,7 @@ CPed::EndFight(uint8 endType)
m_curFightMove = FIGHTMOVE_NULL;
RestorePreviousState();
- CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE);
+ CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE);
if (!animAssoc)
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_MELEE_IDLE_FIGHTMODE);
@@ -1947,16 +1947,16 @@ CPed::EndFight(uint8 endType)
switch (endType) {
case ENDFIGHT_NORMAL:
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 8.0f);
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT2_IDLE, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_2IDLE, 8.0f);
break;
case ENDFIGHT_WITH_A_STEP:
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 1.0f);
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_WALK_START, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 1.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_STARTWALK, 8.0f);
break;
case ENDFIGHT_FAST:
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 8.0f);
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT2_IDLE, 8.0f)->speed = 2.0f;
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 8.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_2IDLE, 8.0f)->speed = 2.0f;
break;
default:
break;
@@ -2243,7 +2243,7 @@ CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dir, int16 piece)
|| weaponType != WEAPONTYPE_UNARMED && weaponType != WEAPONTYPE_BRASSKNUCKLE && IsPlayer()
|| victim->m_pedStats->m_flags & STAT_ONE_HIT_KNOCKDOWN || brassKnucklePunch)) {
- victim->SetFall(0, (AnimationId)(direction + ANIM_KO_SKID_FRONT), 0);
+ victim->SetFall(0, (AnimationId)(direction + ANIM_STD_HIGHIMPACT_FRONT), 0);
if (victim->m_nPedState == PED_FALL)
victim->bIsStanding = false;
}
@@ -2378,7 +2378,7 @@ CPed::LoadFightData(void)
animAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, animName);
tFightMoves[moveId].animId = (AnimationId)animAssoc->animId;
} else {
- tFightMoves[moveId].animId = ANIM_WALK;
+ tFightMoves[moveId].animId = ANIM_STD_WALK;
}
}
moveId++;
@@ -2403,7 +2403,7 @@ CPed::SetInvestigateEvent(eEventType event, CVector2D pos, float distanceToCount
if (m_eventType >= EVENT_ICECREAM)
m_lookTimer = 0;
else
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSCOWER, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSCOWER, 4.0f);
}
@@ -2443,7 +2443,7 @@ CPed::InvestigateEvent(void)
case EVENT_HIT_AND_RUN_COP:
if (CTimer::GetTimeInMilliseconds() > m_lookTimer) {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
@@ -2455,7 +2455,7 @@ CPed::InvestigateEvent(void)
} else if (CGeneral::GetRandomNumber() & 3) {
ClearLookFlag();
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ROAD_CROSS, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROADCROSS, 4.0f);
SetLookTimer(CGeneral::GetRandomNumberInRange(1000, 2500));
Say(SOUND_PED_CHAT_EVENT);
@@ -2469,16 +2469,16 @@ CPed::InvestigateEvent(void)
case EVENT_EXPLOSION:
if (bHasACamera && CTimer::GetTimeInMilliseconds() > m_lookTimer) {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CAM);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_CAM);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE);
- if (animAssoc && animAssoc->animId == ANIM_IDLE_CAM) {
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f);
+ if (animAssoc && animAssoc->animId == ANIM_STD_IDLE_CAM) {
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f);
SetLookTimer(CGeneral::GetRandomNumberInRange(1000, 2500));
} else if (CGeneral::GetRandomNumber() & 3) {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_CAM, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_CAM, 4.0f);
SetLookTimer(CGeneral::GetRandomNumberInRange(2500, 5000));
if (!CGame::germanGame)
Say(SOUND_PED_CHAT_EVENT);
@@ -2488,30 +2488,30 @@ CPed::InvestigateEvent(void)
}
} else if (CTimer::GetTimeInMilliseconds() > m_lookTimer) {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_HBHB);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_HBHB);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_XPRESS_SCRATCH);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_XPRESS_SCRATCH);
- if (animAssoc && animAssoc->animId == ANIM_IDLE_STANCE) {
+ if (animAssoc && animAssoc->animId == ANIM_STD_IDLE) {
if (CGeneral::GetRandomNumber() & 1)
- animToPlay = ANIM_IDLE_HBHB;
+ animToPlay = ANIM_STD_IDLE_HBHB;
else
- animToPlay = ANIM_XPRESS_SCRATCH;
+ animToPlay = ANIM_STD_XPRESS_SCRATCH;
CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animToPlay, 4.0f);
SetLookTimer(CGeneral::GetRandomNumberInRange(1500, 4000));
- } else if (animAssoc && animAssoc->animId == ANIM_IDLE_HBHB) {
+ } else if (animAssoc && animAssoc->animId == ANIM_STD_IDLE_HBHB) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
if (CGeneral::GetRandomNumber() & 1) {
- animToPlay = ANIM_IDLE_STANCE;
+ animToPlay = ANIM_STD_IDLE;
animGroup = m_animGroup;
} else {
- animToPlay = ANIM_XPRESS_SCRATCH;
+ animToPlay = ANIM_STD_XPRESS_SCRATCH;
animGroup = ASSOCGRP_STD;
}
@@ -2520,10 +2520,10 @@ CPed::InvestigateEvent(void)
} else {
if (CGeneral::GetRandomNumber() & 1) {
- animToPlay = ANIM_IDLE_STANCE;
+ animToPlay = ANIM_STD_IDLE;
animGroup = m_animGroup;
} else {
- animToPlay = ANIM_IDLE_HBHB;
+ animToPlay = ANIM_STD_IDLE_HBHB;
animGroup = ASSOCGRP_STD;
}
@@ -2541,26 +2541,26 @@ CPed::InvestigateEvent(void)
if (CTimer::GetTimeInMilliseconds() > m_lookTimer) {
if (m_lookTimer) {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
if (m_eventType == EVENT_ICECREAM)
- animToPlay = ANIM_IDLE_CHAT;
+ animToPlay = ANIM_STD_CHAT;
else
- animToPlay = ANIM_XPRESS_SCRATCH;
+ animToPlay = ANIM_STD_XPRESS_SCRATCH;
CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animToPlay,4.0f);
SetLookTimer(CGeneral::GetRandomNumberInRange(2000, 5000));
} else {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
ClearInvestigateEvent();
} else {
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_XPRESS_SCRATCH);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_XPRESS_SCRATCH);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -2569,7 +2569,7 @@ CPed::InvestigateEvent(void)
}
}
} else {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ROAD_CROSS, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROADCROSS, 4.0f);
SetLookTimer(CGeneral::GetRandomNumberInRange(1000, 2500));
}
}
@@ -2615,13 +2615,13 @@ CPed::InvestigateEvent(void)
void
CPed::ClearInvestigateEvent(void)
{
- CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS);
+ CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_XPRESS_SCRATCH);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_XPRESS_SCRATCH);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_HBHB);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_HBHB);
if (!animAssoc)
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT);
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT);
if (animAssoc) {
animAssoc->blendDelta = -8.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -2643,7 +2643,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
CPlayerPed *player = FindPlayerPed();
float dieDelta = 4.0f;
float dieSpeed = 0.0f;
- AnimationId dieAnim = ANIM_KO_SHOT_FRONT1;
+ AnimationId dieAnim = ANIM_STD_KO_FRONT;
bool headShot = false;
bool willLinger = false;
int random;
@@ -2691,9 +2691,9 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (m_nPedState == PED_GETUP) {
if (!IsPedHeadAbovePos(-0.3f)) {
if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL))
- dieAnim = ANIM_FLOOR_HIT_F;
+ dieAnim = ANIM_STD_HIT_FLOOR_FRONT;
else
- dieAnim = ANIM_FLOOR_HIT;
+ dieAnim = ANIM_STD_HIT_FLOOR;
dieDelta *= 2.0f;
dieSpeed = 0.5f;
detectDieAnim = false;
@@ -2702,14 +2702,14 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
CAnimBlendAssociation *fallAssoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_PARTIAL);
if (!fallAssoc || fallAssoc->IsRunning()) {
if (fallAssoc && fallAssoc->blendDelta >= 0.0f)
- dieAnim = NUM_STD_ANIMS;
+ dieAnim = ANIM_STD_NUM;
else
- dieAnim = ANIM_KO_SHOT_FRONT1;
+ dieAnim = ANIM_STD_KO_FRONT;
} else {
if (fallAssoc->flags & ASSOC_FRONTAL)
- dieAnim = ANIM_FLOOR_HIT_F;
+ dieAnim = ANIM_STD_HIT_FLOOR_FRONT;
else
- dieAnim = ANIM_FLOOR_HIT;
+ dieAnim = ANIM_STD_HIT_FLOOR;
dieDelta *= 2.0f;
dieSpeed = 0.5f;
@@ -2726,28 +2726,28 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (m_nPedState == PED_FALL) {
if (IsPedHeadAbovePos(-0.3f)) {
- dieAnim = NUM_STD_ANIMS;
+ dieAnim = ANIM_STD_NUM;
} else {
if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL))
- dieAnim = ANIM_FLOOR_HIT_F;
+ dieAnim = ANIM_STD_HIT_FLOOR_FRONT;
else
- dieAnim = ANIM_FLOOR_HIT;
+ dieAnim = ANIM_STD_HIT_FLOOR;
dieDelta = dieDelta * 2.0f;
dieSpeed = 0.5f;
}
} else {
switch (direction) {
case 0:
- dieAnim = ANIM_KO_SKID_FRONT;
+ dieAnim = ANIM_STD_HIGHIMPACT_FRONT;
break;
case 1:
- dieAnim = ANIM_KO_SPIN_R;
+ dieAnim = ANIM_STD_HIGHIMPACT_LEFT;
break;
case 2:
- dieAnim = ANIM_KO_SKID_BACK;
+ dieAnim = ANIM_STD_HIGHIMPACT_BACK;
break;
case 3:
- dieAnim = ANIM_KO_SPIN_L;
+ dieAnim = ANIM_STD_HIGHIMPACT_RIGHT;
break;
default:
break;
@@ -2775,12 +2775,12 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (m_nPedState == PED_FALL) {
if (IsPedHeadAbovePos(-0.3f)) {
- dieAnim = NUM_STD_ANIMS;
+ dieAnim = ANIM_STD_NUM;
} else {
if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL))
- dieAnim = ANIM_FLOOR_HIT_F;
+ dieAnim = ANIM_STD_HIT_FLOOR_FRONT;
else
- dieAnim = ANIM_FLOOR_HIT;
+ dieAnim = ANIM_STD_HIT_FLOOR;
dieDelta = dieDelta * 2.0f;
dieSpeed = 0.5f;
}
@@ -2788,28 +2788,28 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (damagedBy != FindPlayerPed() || FindPlayerPed()->m_curFightMove != FIGHTMOVE_MELEE3) {
switch (direction) {
case 0:
- dieAnim = ANIM_KO_SKID_FRONT;
+ dieAnim = ANIM_STD_HIGHIMPACT_FRONT;
break;
case 1:
- dieAnim = ANIM_KO_SPIN_R;
+ dieAnim = ANIM_STD_HIGHIMPACT_LEFT;
break;
case 2:
- dieAnim = ANIM_KO_SKID_BACK;
+ dieAnim = ANIM_STD_HIGHIMPACT_BACK;
break;
case 3:
- dieAnim = ANIM_KO_SPIN_L;
+ dieAnim = ANIM_STD_HIGHIMPACT_RIGHT;
break;
default:
break;
}
} else {
- dieAnim = ANIM_KO_SHOT_STOM;
+ dieAnim = ANIM_STD_KO_SHOT_STOMACH;
}
} else {
- dieAnim = ANIM_KO_SHOT_FACE;
+ dieAnim = ANIM_STD_KO_SHOT_FACE;
}
} else {
- dieAnim = ANIM_KO_SHOT_FACE;
+ dieAnim = ANIM_STD_KO_SHOT_FACE;
RemoveBodyPart(PED_HEAD, direction);
headShot = true;
willLinger = true;
@@ -2850,56 +2850,56 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (method == WEAPONTYPE_SHOTGUN) {
switch (direction) {
case 0:
- dieAnim = ANIM_KO_SKID_FRONT;
+ dieAnim = ANIM_STD_HIGHIMPACT_FRONT;
break;
case 1:
- dieAnim = ANIM_KO_SPIN_R;
+ dieAnim = ANIM_STD_HIGHIMPACT_LEFT;
break;
case 2:
- dieAnim = ANIM_KO_SKID_BACK;
+ dieAnim = ANIM_STD_HIGHIMPACT_BACK;
break;
case 3:
- dieAnim = ANIM_KO_SPIN_L;
+ dieAnim = ANIM_STD_HIGHIMPACT_RIGHT;
break;
default:
break;
}
} else
- dieAnim = ANIM_KO_SHOT_FRONT1;
+ dieAnim = ANIM_STD_KO_FRONT;
willLinger = false;
} else {
switch (pedPiece) {
case PEDPIECE_TORSO:
willLinger = false;
- dieAnim = ANIM_KO_SHOT_FRONT1;
+ dieAnim = ANIM_STD_KO_FRONT;
break;
case PEDPIECE_MID:
willLinger = false;
- dieAnim = ANIM_KO_SHOT_STOM;
+ dieAnim = ANIM_STD_KO_SHOT_STOMACH;
break;
case PEDPIECE_LEFTARM:
- dieAnim = ANIM_KO_SHOT_ARML;
+ dieAnim = ANIM_STD_KO_SHOT_ARM_L;
RemoveBodyPart(PED_UPPERARML, direction);
willLinger = true;
break;
case PEDPIECE_RIGHTARM:
- dieAnim = ANIM_KO_SHOT_ARMR;
+ dieAnim = ANIM_STD_KO_SHOT_ARM_R;
RemoveBodyPart(PED_UPPERARMR, direction);
willLinger = true;
break;
case PEDPIECE_LEFTLEG:
- dieAnim = ANIM_KO_SHOT_LEGL;
+ dieAnim = ANIM_STD_KO_SHOT_LEG_L;
RemoveBodyPart(PED_UPPERLEGL, direction);
willLinger = true;
break;
case PEDPIECE_RIGHTLEG:
- dieAnim = ANIM_KO_SHOT_LEGR;
+ dieAnim = ANIM_STD_KO_SHOT_LEG_R;
RemoveBodyPart(PED_UPPERLEGR, direction);
willLinger = true;
break;
case PEDPIECE_HEAD:
- dieAnim = ANIM_KO_SHOT_FACE;
+ dieAnim = ANIM_STD_KO_SHOT_FACE;
RemoveBodyPart(PED_HEAD, direction);
headShot = true;
willLinger = true;
@@ -2939,16 +2939,16 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
switch (direction) {
case 0:
- dieAnim = ANIM_KO_SKID_FRONT;
+ dieAnim = ANIM_STD_HIGHIMPACT_FRONT;
break;
case 1:
- dieAnim = ANIM_KO_SPIN_R;
+ dieAnim = ANIM_STD_HIGHIMPACT_LEFT;
break;
case 2:
- dieAnim = ANIM_KO_SKID_BACK;
+ dieAnim = ANIM_STD_HIGHIMPACT_BACK;
break;
case 3:
- dieAnim = ANIM_KO_SPIN_L;
+ dieAnim = ANIM_STD_HIGHIMPACT_RIGHT;
break;
default:
break;
@@ -2958,7 +2958,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (bFireProof)
return false;
- dieAnim = ANIM_KO_SHOT_FRONT1;
+ dieAnim = ANIM_STD_KO_FRONT;
break;
case WEAPONTYPE_RAMMEDBYCAR:
case WEAPONTYPE_RUNOVERBYCAR:
@@ -2973,36 +2973,36 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (pedPiece == PEDPIECE_RIGHTARM && random > 1
|| pedPiece == PEDPIECE_MID && random == 2)
- dieAnim = ANIM_KO_SPIN_L;
+ dieAnim = ANIM_STD_HIGHIMPACT_RIGHT;
else
- dieAnim = ANIM_KO_SKID_FRONT;
+ dieAnim = ANIM_STD_HIGHIMPACT_FRONT;
} else
- dieAnim = ANIM_KO_SPIN_R;
+ dieAnim = ANIM_STD_HIGHIMPACT_LEFT;
break;
case 1:
if (m_nPedState == PED_DIVE_AWAY)
- dieAnim = ANIM_KD_LEFT;
+ dieAnim = ANIM_STD_SPINFORWARD_LEFT;
else
- dieAnim = ANIM_KO_SPIN_R;
+ dieAnim = ANIM_STD_HIGHIMPACT_LEFT;
break;
case 2:
if ((pedPiece != PEDPIECE_LEFTARM || random <= 1)
&& (pedPiece != PEDPIECE_MID || random != 1)) {
if ((pedPiece != PEDPIECE_RIGHTARM || random <= 1)
&& (pedPiece != PEDPIECE_MID || random != 2)) {
- dieAnim = ANIM_KO_SKID_BACK;
+ dieAnim = ANIM_STD_HIGHIMPACT_BACK;
} else {
- dieAnim = ANIM_KD_RIGHT;
+ dieAnim = ANIM_STD_SPINFORWARD_RIGHT;
}
} else
- dieAnim = ANIM_KD_LEFT;
+ dieAnim = ANIM_STD_SPINFORWARD_LEFT;
break;
case 3:
if (m_nPedState == PED_DIVE_AWAY)
- dieAnim = ANIM_KD_RIGHT;
+ dieAnim = ANIM_STD_SPINFORWARD_RIGHT;
else
- dieAnim = ANIM_KO_SPIN_L;
+ dieAnim = ANIM_STD_HIGHIMPACT_RIGHT;
break;
default:
break;
@@ -3020,7 +3020,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
}
break;
case WEAPONTYPE_DROWNING:
- dieAnim = ANIM_DROWN;
+ dieAnim = ANIM_STD_DROWN;
break;
case WEAPONTYPE_FALL:
if (bCollisionProof)
@@ -3028,16 +3028,16 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
switch (direction) {
case 0:
- dieAnim = ANIM_KO_SKID_FRONT;
+ dieAnim = ANIM_STD_HIGHIMPACT_FRONT;
break;
case 1:
- dieAnim = ANIM_KO_SPIN_R;
+ dieAnim = ANIM_STD_HIGHIMPACT_LEFT;
break;
case 2:
- dieAnim = ANIM_KO_SKID_BACK;
+ dieAnim = ANIM_STD_HIGHIMPACT_BACK;
break;
case 3:
- dieAnim = ANIM_KO_SPIN_L;
+ dieAnim = ANIM_STD_HIGHIMPACT_RIGHT;
break;
default:
break;
@@ -3070,7 +3070,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
}
if (method == WEAPONTYPE_FALL) {
- if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLOUT_LHS)) {
+ if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROLLOUT_LHS)) {
if (m_fHealth >= 1.0 && m_fHealth - healthImpact < 5.0f) {
m_fHealth = Min(m_fHealth, 5.0f);
return false;
@@ -3147,7 +3147,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (player == this)
m_pMyVehicle->SetStatus(STATUS_PLAYER_DISABLED);
- SetDie(NUM_STD_ANIMS, 4.0f, 0.0f);
+ SetDie(ANIM_STD_NUM, 4.0f, 0.0f);
return true;
} else {
m_fHealth = 0.0f;
@@ -3500,7 +3500,7 @@ CPed::CollideWithPed(CPed *collideWith)
} else {
SetLookFlag(collideWith, false);
TurnBody();
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_PPUNCH, 8.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PARTIAL_PUNCH, 8.0f);
animAssoc->flags |= ASSOC_FADEOUTWHENDONE;
m_nPedStateTimer = CTimer::GetTimeInMilliseconds() + 2000;
if (!heIsMissionChar) {
@@ -3521,22 +3521,22 @@ CPed::CollideWithPed(CPed *collideWith)
moveForce.z += 0.1f;
ApplyMoveForce(moveForce);
if (collideWith->m_nMoveState != PEDMOVE_RUN && collideWith->m_nMoveState != PEDMOVE_SPRINT)
- animToPlay = ANIM_HIT_LEFT;
+ animToPlay = ANIM_STD_HIT_LEFT;
else
- animToPlay = ANIM_SHOT_LEFT_PARTIAL;
+ animToPlay = ANIM_STD_HITBYGUN_LEFT;
} else if (heLooksToUs) {
CVector moveForce = GetRight() * -1.0f;
moveForce.z += 0.1f;
ApplyMoveForce(moveForce);
if (collideWith->m_nMoveState != PEDMOVE_RUN && collideWith->m_nMoveState != PEDMOVE_SPRINT)
- animToPlay = ANIM_HIT_RIGHT;
+ animToPlay = ANIM_STD_HIT_RIGHT;
else
- animToPlay = ANIM_SHOT_RIGHT_PARTIAL;
+ animToPlay = ANIM_STD_HITBYGUN_RIGHT;
} else {
if (collideWith->m_nMoveState != PEDMOVE_RUN && collideWith->m_nMoveState != PEDMOVE_SPRINT)
- animToPlay = ANIM_HIT_BACK;
+ animToPlay = ANIM_STD_HIT_BACK;
else
- animToPlay = ANIM_SHOT_BACK_PARTIAL;
+ animToPlay = ANIM_STD_HITBYGUN_BACK;
}
if (collideWith->IsPedInControl() && CTimer::GetTimeInMilliseconds() > collideWith->m_nPedStateTimer) {
@@ -3553,17 +3553,17 @@ CPed::CollideWithPed(CPed *collideWith)
moveForce.z += 0.1f;
ApplyMoveForce(moveForce);
if (heLooksToUs)
- animToPlay = ANIM_KO_SPIN_L;
+ animToPlay = ANIM_STD_HIGHIMPACT_RIGHT;
else
- animToPlay = ANIM_KD_RIGHT;
+ animToPlay = ANIM_STD_SPINFORWARD_RIGHT;
} else {
CVector moveForce = GetRight();
moveForce.z += 0.1f;
ApplyMoveForce(moveForce);
if (heLooksToUs)
- animToPlay = ANIM_KO_SPIN_R;
+ animToPlay = ANIM_STD_HIGHIMPACT_LEFT;
else
- animToPlay = ANIM_KD_LEFT;
+ animToPlay = ANIM_STD_SPINFORWARD_LEFT;
}
if (m_nPedState == PED_ATTACK && collideWith->IsPedInControl())
@@ -3816,7 +3816,7 @@ CPed::KillPedWithCar(CVehicle *car, float impulse)
damage = 30.0f;
InflictDamage(car, WEAPONTYPE_RAMMEDBYCAR, damage, PEDPIECE_TORSO, fallDirection);
- SetFall(1000, (AnimationId)(fallDirection + ANIM_KO_SKID_FRONT), true);
+ SetFall(1000, (AnimationId)(fallDirection + ANIM_STD_HIGHIMPACT_FRONT), true);
if (OnGround() && !m_pCollidingEntity &&
(!IsPlayer() || bHasHitWall || car->GetModelIndex() == MI_TRAIN || m_vecDamageNormal.z < -0.8f)) {
@@ -3860,18 +3860,18 @@ CPed::DriveVehicle(void)
float targetUDLean = 0.0f;
CAnimBlendAssociation *leftAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_LEFT);
CAnimBlendAssociation *rightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_RIGHT);
- CAnimBlendAssociation *stillAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_STILL);
+ CAnimBlendAssociation *stillAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_READY);
CAnimBlendAssociation *fwdAssoc, *backAssoc;
if (IsPlayer()) {
- fwdAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_FWD);
- backAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_BACK);
+ fwdAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_LEANF);
+ backAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_LEANB);
}
- CAnimBlendAssociation *walkbackAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_PUSHES);
- CAnimBlendAssociation *drivebyAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_DRIVEBY_RHS);
+ CAnimBlendAssociation *walkbackAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_WALKBACK);
+ CAnimBlendAssociation *drivebyAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_DRIVEBY_LHS);
if (!drivebyAssoc)
- drivebyAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_DRIVEBY_LHS);
+ drivebyAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_DRIVEBY_RHS);
if (!drivebyAssoc)
- drivebyAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_DRIVEBY_FT);
+ drivebyAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BIKE_DRIVEBY_FORWARD);
float velocityFwdDotProd = DotProduct(bike->m_vecMoveSpeed, bike->GetForward());
if (m_vecTurnSpeed.MagnitudeSqr() > 0.09f) {
@@ -3882,7 +3882,7 @@ CPed::DriveVehicle(void)
}
if (!drivebyAssoc && Abs(velocityFwdDotProd) < 0.02f) {
if (!stillAssoc || stillAssoc->blendAmount < 1.0 && stillAssoc->blendDelta <= 0.0) {
- stillAssoc = CAnimManager::BlendAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_STILL, 2.0f);
+ stillAssoc = CAnimManager::BlendAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_READY, 2.0f);
}
} else {
if (velocityFwdDotProd >= 0.0f) {
@@ -3909,7 +3909,7 @@ CPed::DriveVehicle(void)
walkbackAssoc->blendDelta = -4.0f;
}
} else if (!walkbackAssoc || walkbackAssoc->blendAmount < 1.0f && walkbackAssoc->blendDelta <= 0.0f) {
- walkbackAssoc = CAnimManager::BlendAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_PUSHES, 4.0f);
+ walkbackAssoc = CAnimManager::BlendAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_WALKBACK, 4.0f);
}
}
}
@@ -4007,9 +4007,9 @@ CPed::DriveVehicle(void)
float leftRightBlend = leftRightLeanAmount * blendDelta;
if (IsPlayer()) {
if (!fwdAssoc)
- fwdAssoc = CAnimManager::AddAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_FWD);
+ fwdAssoc = CAnimManager::AddAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_LEANF);
if (!backAssoc)
- backAssoc = CAnimManager::AddAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_BACK);
+ backAssoc = CAnimManager::AddAnimation(GetClump(), bike->m_bikeAnimType, ANIM_BIKE_LEANB);
if (bike->m_fPedLeanAmountUD < 0.0f) {
backAssoc->blendAmount = fwdBackBlend;
@@ -4058,35 +4058,35 @@ CPed::DriveVehicle(void)
CAnimBlendAssociation* lbAssoc;
CAnimBlendAssociation* sitAssoc;
if (m_pMyVehicle->IsBoat() && !(m_pMyVehicle->pHandling->Flags & HANDLING_SIT_IN_BOAT)) {
- sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_BOAT);
+ sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_BOAT_DRIVE);
if (!sitAssoc || sitAssoc->blendAmount < 1.0f) {
return;
}
- lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_BOAT_L);
- rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_BOAT_R);
- lbAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_BOAT_LB);
+ lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_BOAT_DRIVE_LEFT);
+ rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_BOAT_DRIVE_RIGHT);
+ lbAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_BOAT_LOOKBEHIND);
} else if (m_pMyVehicle->bLowVehicle) {
- sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LSIT);
+ sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_LO);
if (!sitAssoc || sitAssoc->blendAmount < 1.0f) {
return;
}
- lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_LOW_L);
+ lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_LEFT_LO);
lbAssoc = nil;
- rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_LOW_R);
+ rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_RIGHT_LO);
} else {
- sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SIT);
+ sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT);
if (!sitAssoc || sitAssoc->blendAmount < 1.0f) {
return;
}
- lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_L);
- rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_R);
- lbAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LB);
+ lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_LEFT);
+ rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_RIGHT);
+ lbAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_LOOKBEHIND);
}
if (lbAssoc &&
@@ -4095,13 +4095,13 @@ CPed::DriveVehicle(void)
lbAssoc->blendDelta = -1000.0f;
}
- CAnimBlendAssociation* driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_L);
+ CAnimBlendAssociation* driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_LEFT);
if (!driveByAssoc)
- driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_R);
+ driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_RIGHT);
if (!driveByAssoc)
- driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_LOW_L);
+ driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_LEFT_LO);
if (!driveByAssoc)
- driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_LOW_R);
+ driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_RIGHT_LO);
if (m_pMyVehicle->bLowVehicle || m_pMyVehicle->m_fGasPedal >= 0.0f || driveByAssoc ||
m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI || m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_PLANE) {
@@ -4118,11 +4118,11 @@ CPed::DriveVehicle(void)
if (rDriveAssoc)
rDriveAssoc->blendAmount = clamp(steerAngle * -100.0f / 61.0f, 0.0f, 1.0f);
else if (m_pMyVehicle->IsBoat() && !(m_pMyVehicle->pHandling->Flags & HANDLING_SIT_IN_BOAT))
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT_R);
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE_RIGHT);
else if (m_pMyVehicle->bLowVehicle)
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_LOW_R);
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVE_RIGHT_LO);
else
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_R);
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVE_RIGHT);
} else {
if (rDriveAssoc)
@@ -4131,11 +4131,11 @@ CPed::DriveVehicle(void)
if (lDriveAssoc)
lDriveAssoc->blendAmount = clamp(steerAngle * 100.0f / 61.0f, 0.0f, 1.0f);
else if (m_pMyVehicle->IsBoat() && !(m_pMyVehicle->pHandling->Flags & HANDLING_SIT_IN_BOAT))
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT_L);
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE_LEFT);
else if (m_pMyVehicle->bLowVehicle)
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_LOW_L);
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVE_LEFT_LO);
else
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_L);
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVE_LEFT);
}
if (lbAssoc)
@@ -4147,9 +4147,9 @@ CPed::DriveVehicle(void)
&& (!lbAssoc || lbAssoc->blendAmount < 1.0f && lbAssoc->blendDelta <= 0.0f)) {
if (m_pMyVehicle->IsBoat() && !(m_pMyVehicle->pHandling->Flags & HANDLING_SIT_IN_BOAT))
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_BOAT_LB, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_LOOKBEHIND, 4.0f);
else
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_LB, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_LOOKBEHIND, 4.0f);
}
}
}
@@ -4160,7 +4160,7 @@ CPed::RemoveWeaponAnims(int unused, float animDelta)
CAnimBlendAssociation *weaponAssoc;
//CWeaponInfo::GetWeaponInfo(unused);
- weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE);
+ weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_1);
if (weaponAssoc) {
weaponAssoc->blendDelta = animDelta;
weaponAssoc->flags |= ASSOC_DELETEFADEDOUT;
@@ -4175,17 +4175,17 @@ CPed::RemoveWeaponAnims(int unused, float animDelta)
weaponAssoc->blendDelta = animDelta;
weaponAssoc->flags |= ASSOC_DELETEFADEDOUT;
}
- weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_RELOAD);
+ weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ATTACK_EXTRA1);
if (weaponAssoc) {
weaponAssoc->blendDelta = animDelta;
weaponAssoc->flags |= ASSOC_DELETEFADEDOUT;
}
- weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCHRELOAD);
+ weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_MELEE_IDLE_FIGHTMODE);
if (weaponAssoc) {
weaponAssoc->flags |= ASSOC_DELETEFADEDOUT;
if (weaponAssoc->flags & ASSOC_PARTIAL)
weaponAssoc->blendDelta = animDelta;
else
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, -animDelta);
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, -animDelta);
}
}
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index 7308b3fb..5c40419e 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -246,7 +246,7 @@ CPlayerPed::MakeChangesForNewWeapon(int32 slot)
void
CPlayerPed::ReApplyMoveAnims(void)
{
- static AnimationId moveAnims[] = { ANIM_WALK, ANIM_RUN, ANIM_SPRINT, ANIM_IDLE_STANCE, ANIM_WALK_START };
+ static AnimationId moveAnims[] = { ANIM_STD_WALK, ANIM_STD_RUN, ANIM_STD_RUNFAST, ANIM_STD_IDLE, ANIM_STD_STARTWALK };
for(int i = 0; i < ARRAY_SIZE(moveAnims); i++) {
CAnimBlendAssociation *curMoveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), moveAnims[i]);
@@ -311,13 +311,13 @@ CPlayerPed::SetInitialState(void)
void
CPlayerPed::SetRealMoveAnim(void)
{
- CAnimBlendAssociation *curWalkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK);
- CAnimBlendAssociation *curRunAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN);
- CAnimBlendAssociation *curSprintAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SPRINT);
- CAnimBlendAssociation *curWalkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK_START);
- CAnimBlendAssociation *curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE);
- CAnimBlendAssociation *curRunStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP);
- CAnimBlendAssociation *curRunStopRAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R);
+ CAnimBlendAssociation *curWalkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_WALK);
+ CAnimBlendAssociation *curRunAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUN);
+ CAnimBlendAssociation *curSprintAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNFAST);
+ CAnimBlendAssociation *curWalkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_STARTWALK);
+ CAnimBlendAssociation *curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE);
+ CAnimBlendAssociation *curRunStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP1);
+ CAnimBlendAssociation *curRunStopRAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP2);
if (bResetWalkAnims) {
if (curWalkAssoc)
curWalkAssoc->SetCurrentTime(0.0f);
@@ -329,9 +329,9 @@ CPlayerPed::SetRealMoveAnim(void)
}
if (!curIdleAssoc)
- curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED);
+ curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED);
if (!curIdleAssoc)
- curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE);
+ curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE);
if (!curIdleAssoc)
curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_MELEE_IDLE_FIGHTMODE);
@@ -352,10 +352,10 @@ CPlayerPed::SetRealMoveAnim(void)
if (!curIdleAssoc) {
if (m_fCurrentStamina < 0.0f && !bIsAimingGun && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f,
nil, true, false, false, false, false, false)) {
- curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 8.0f);
+ curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 8.0f);
} else {
- curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 8.0f);
+ curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 8.0f);
}
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(2500, 4000);
}
@@ -366,25 +366,25 @@ CPlayerPed::SetRealMoveAnim(void)
if (!curIdleAssoc) {
if (m_fCurrentStamina < 0.0f && !bIsAimingGun && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f,
nil, true, false, false, false, false, false)) {
- curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
+ curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 4.0f);
} else {
- curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f);
+ curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f);
}
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(2500, 4000);
}
- if ((m_fCurrentStamina > 0.0f || bIsAimingGun) && curIdleAssoc->animId == ANIM_IDLE_TIRED) {
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f);
+ if ((m_fCurrentStamina > 0.0f || bIsAimingGun) && curIdleAssoc->animId == ANIM_STD_IDLE_TIRED) {
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f);
} else if (m_nPedState != PED_FIGHT) {
- if (m_fCurrentStamina < 0.0f && !bIsAimingGun && curIdleAssoc->animId != ANIM_IDLE_TIRED
+ if (m_fCurrentStamina < 0.0f && !bIsAimingGun && curIdleAssoc->animId != ANIM_STD_IDLE_TIRED
&& !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f, nil, true, false, false, false, false, false)) {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 4.0f);
- } else if (curIdleAssoc->animId != ANIM_IDLE_STANCE) {
- CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f);
+ } else if (curIdleAssoc->animId != ANIM_STD_IDLE) {
+ CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f);
}
}
m_nMoveState = PEDMOVE_STILL;
@@ -395,7 +395,7 @@ CPlayerPed::SetRealMoveAnim(void)
curWalkStartAssoc->blendAmount = 1.0f;
curWalkStartAssoc->blendDelta = 0.0f;
} else {
- curWalkStartAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_WALK_START);
+ curWalkStartAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_STD_STARTWALK);
}
if (curWalkAssoc)
curWalkAssoc->SetCurrentTime(0.0f);
@@ -403,8 +403,8 @@ CPlayerPed::SetRealMoveAnim(void)
curRunAssoc->SetCurrentTime(0.0f);
delete curIdleAssoc;
- delete RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED);
- CAnimBlendAssociation *fightIdleAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE);
+ delete RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED);
+ CAnimBlendAssociation *fightIdleAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE);
if (!fightIdleAnim)
fightIdleAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_MELEE_IDLE_FIGHTMODE);
delete fightIdleAnim;
@@ -422,11 +422,11 @@ CPlayerPed::SetRealMoveAnim(void)
RestoreHeadingRate();
}
if (!curWalkAssoc) {
- curWalkAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_WALK);
+ curWalkAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_STD_WALK);
curWalkAssoc->blendAmount = 0.0f;
}
if (!curRunAssoc) {
- curRunAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_RUN);
+ curRunAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_STD_RUN);
curRunAssoc->blendAmount = 0.0f;
}
if (curWalkStartAssoc && !(curWalkStartAssoc->IsRunning())) {
@@ -453,9 +453,9 @@ CPlayerPed::SetRealMoveAnim(void)
if (m_fMoveSpeed < 0.4f) {
AnimationId runStopAnim;
if (curSprintAssoc->GetProgress() < 0.5) // double
- runStopAnim = ANIM_RUN_STOP;
+ runStopAnim = ANIM_STD_RUNSTOP1;
else
- runStopAnim = ANIM_RUN_STOP_R;
+ runStopAnim = ANIM_STD_RUNSTOP2;
CAnimBlendAssociation* newRunStopAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, runStopAnim);
newRunStopAssoc->blendAmount = 1.0f;
newRunStopAssoc->SetDeleteCallback(RestoreHeadingRateCB, this);
@@ -498,7 +498,7 @@ CPlayerPed::SetRealMoveAnim(void)
// Transition between run-sprint
curWalkAssoc->blendAmount = 0.0f;
curRunAssoc->blendAmount = 1.0f;
- curSprintAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_SPRINT, 2.0f);
+ curSprintAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_RUNFAST, 2.0f);
}
UseSprintEnergy();
} else {
@@ -629,14 +629,14 @@ CPlayerPed::DoesTargetHaveToBeBroken(CVector target, CWeapon *weaponUsed)
void
CPlayerPed::RunningLand(CPad *padUsed)
{
- CAnimBlendAssociation *landAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_LAND);
+ CAnimBlendAssociation *landAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_LAND);
if (landAssoc && landAssoc->currentTime == 0.0f && m_fMoveSpeed > 1.5f
&& padUsed && (padUsed->GetPedWalkLeftRight() != 0.0f || padUsed->GetPedWalkUpDown() != 0.0f)) {
landAssoc->blendDelta = -1000.0f;
landAssoc->flags |= ASSOC_DELETEFADEDOUT;
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_JUMP_LAND)->SetFinishCallback(FinishJumpCB, this);
+ CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_JUMP_LAND)->SetFinishCallback(FinishJumpCB, this);
if (m_nPedState == PED_JUMP)
RestorePreviousState();
@@ -869,7 +869,7 @@ CPlayerPed::PlayerControl1stPersonRunAround(CPad *padUsed)
if (m_nPedState == PED_JUMP) {
if (bIsInTheAir) {
if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f)
- && m_fDistanceTravelled < CTimer::GetTimeStep() * 0.02 && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) {
+ && m_fDistanceTravelled < CTimer::GetTimeStepInSeconds() && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) {
float angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O
float angleCos = Cos(m_fRotationCur);
@@ -1259,7 +1259,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
TheCamera.SetNewPlayerWeaponMode(CCam::MODE_M16_1STPERSON, 0, 0);
m_fMoveSpeed = 0.0f;
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_STANCE, 1000.0f);
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE, 1000.0f);
SetPedState(PED_SNIPER_MODE);
return;
}
@@ -1484,7 +1484,7 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed)
if (m_nPedState == PED_JUMP) {
if (bIsInTheAir) {
if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f)
- && m_fDistanceTravelled < CTimer::GetTimeStep() * 0.02 && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) {
+ && m_fDistanceTravelled < CTimer::GetTimeStepInSeconds() && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) {
float angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O
float angleCos = Cos(m_fRotationCur);
@@ -1680,7 +1680,7 @@ CPlayerPed::ProcessControl(void)
}
}
if (GetWeapon()->m_eWeaponType == WEAPONTYPE_CHAINSAW && m_nPedState != PED_ATTACK && !bInVehicle) {
- DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_ATTACK, 0.0f);
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_CHAINSAW_IDLE, 0.0f);
}
if (m_nMoveState != PEDMOVE_RUN && m_nMoveState != PEDMOVE_SPRINT)
@@ -1701,24 +1701,24 @@ CPlayerPed::ProcessControl(void)
if (m_nPedState == PED_DRIVING && m_objective != OBJECTIVE_LEAVE_CAR) {
if (!CReplay::IsPlayingBack() || m_pMyVehicle) {
if (m_pMyVehicle->IsCar() && ((CAutomobile*)m_pMyVehicle)->Damage.GetDoorStatus(DOOR_FRONT_LEFT) == DOOR_STATUS_SWINGING) {
- CAnimBlendAssociation *rollDoorAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLDOOR);
+ CAnimBlendAssociation *rollDoorAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS);
- if (m_pMyVehicle->m_nGettingOutFlags & CAR_DOOR_FLAG_LF || rollDoorAssoc || (rollDoorAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLDOOR_LOW))) {
+ if (m_pMyVehicle->m_nGettingOutFlags & CAR_DOOR_FLAG_LF || rollDoorAssoc || (rollDoorAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS))) {
if (rollDoorAssoc)
- m_pMyVehicle->ProcessOpenDoor(CAR_DOOR_LF, ANIM_CAR_ROLLDOOR, rollDoorAssoc->currentTime);
+ m_pMyVehicle->ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, rollDoorAssoc->currentTime);
} else {
// These comparisons are wrong, they return uint16
if (padUsed && (padUsed->GetAccelerate() != 0.0f || padUsed->GetSteeringLeftRight() != 0.0f || padUsed->GetBrake() != 0.0f)) {
if (rollDoorAssoc)
- m_pMyVehicle->ProcessOpenDoor(CAR_DOOR_LF, ANIM_CAR_ROLLDOOR, rollDoorAssoc->currentTime);
+ m_pMyVehicle->ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, rollDoorAssoc->currentTime);
} else {
m_pMyVehicle->m_nGettingOutFlags |= CAR_DOOR_FLAG_LF;
if (m_pMyVehicle->bLowVehicle)
- rollDoorAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ROLLDOOR_LOW);
+ rollDoorAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS);
else
- rollDoorAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ROLLDOOR);
+ rollDoorAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS);
rollDoorAssoc->SetFinishCallback(PedAnimDoorCloseRollingCB, this);
}
@@ -1948,11 +1948,11 @@ CPlayerPed::PlayIdleAnimations(CPad *padUsed)
};
const animAndGroup idleAnims[] = {
- {ANIM_IDLE_STRETCH, ASSOCGRP_PLAYER_IDLE},
- {ANIM_IDLE_TIME, ASSOCGRP_PLAYER_IDLE},
- {ANIM_IDLE_SHOULDER, ASSOCGRP_PLAYER_IDLE},
- {ANIM_IDLE_STRETCH_LEG, ASSOCGRP_PLAYER_IDLE},
- {ANIM_XPRESS_SCRATCH, ASSOCGRP_STD},
+ {ANIM_PLAYER_IDLE1, ASSOCGRP_PLAYER_IDLE},
+ {ANIM_PLAYER_IDLE2, ASSOCGRP_PLAYER_IDLE},
+ {ANIM_PLAYER_IDLE3, ASSOCGRP_PLAYER_IDLE},
+ {ANIM_PLAYER_IDLE4, ASSOCGRP_PLAYER_IDLE},
+ {ANIM_STD_XPRESS_SCRATCH, ASSOCGRP_STD},
};
static int32 lastTime = 0;
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 0119b475..f0e41231 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -911,10 +911,9 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones()
void
CPopulation::ConvertAllObjectsToDummyObjects()
{
- int poolSize = CPools::GetObjectPool()->GetSize();
- for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) {
-
- CObject *obj = CPools::GetObjectPool()->GetSlot(poolIndex);
+ uint32 i = CPools::GetObjectPool()->GetSize();
+ while(i--) {
+ CObject *obj = CPools::GetObjectPool()->GetSlot(i);
if (obj) {
if (obj->CanBeDeleted())
ConvertToDummyObject(obj);
@@ -980,27 +979,30 @@ CPopulation::TestSafeForRealObject(CDummyObject *dummy)
{
CPtrNode *ptrNode;
CColModel *dummyCol = dummy->GetColModel();
- float colRadius = dummy->GetBoundRadius();
- CVector colCentre = dummy->GetBoundCentre();
- int minX = CWorld::GetSectorIndexX(dummy->GetPosition().x - colRadius);
+ float radius = dummyCol->boundingSphere.radius;
+ int minX = CWorld::GetSectorIndexX(dummy->GetPosition().x - radius);
if (minX < 0) minX = 0;
- int minY = CWorld::GetSectorIndexY(dummy->GetPosition().y - colRadius);
+ int minY = CWorld::GetSectorIndexY(dummy->GetPosition().y - radius);
if (minY < 0) minY = 0;
- int maxX = CWorld::GetSectorIndexX(dummy->GetPosition().x + colRadius);
+ int maxX = CWorld::GetSectorIndexX(dummy->GetPosition().x + radius);
#ifdef FIX_BUGS
if (maxX >= NUMSECTORS_X) maxX = NUMSECTORS_X - 1;
#else
if (maxX >= NUMSECTORS_X) maxX = NUMSECTORS_X;
#endif
- int maxY = CWorld::GetSectorIndexY(dummy->GetPosition().y + colRadius);
+ int maxY = CWorld::GetSectorIndexY(dummy->GetPosition().y + radius);
#ifdef FIX_BUGS
if (maxY >= NUMSECTORS_Y) maxY = NUMSECTORS_Y - 1;
#else
if (maxY >= NUMSECTORS_Y) maxY = NUMSECTORS_Y;
#endif
+ float colRadius = dummy->GetBoundRadius();
+ CVUVECTOR colCentre;
+ dummy->GetBoundCentre(colCentre);
+
static CColPoint aTempColPoints[MAX_COLLISION_POINTS];
for (int curY = minY; curY <= maxY; curY++) {
@@ -1405,7 +1407,7 @@ CPopulation::PlaceGangMembersInFormation(ePedType pedType, int pedAmount, CVecto
CPed *createdPeds[5];
if (!TheCamera.IsSphereVisible(coors, 3.0f) || MIN_CREATION_DIST * PedCreationDistMultiplier() <= (coors - FindPlayerPed()->GetPosition()).Magnitude2D()) {
- if (CPedPlacement::IsPositionClearForPed(coors, 3.0f, -1, 0)) {
+ if (CPedPlacement::IsPositionClearForPed(coors, 3.0f, -1, nil)) {
bool leaderFoundGround;
float leaderGroundZ = CWorld::FindGroundZFor3DCoord(coors.x, coors.y, coors.z, &leaderFoundGround) + 1.0f;
if (leaderFoundGround) {
@@ -1485,11 +1487,14 @@ CPopulation::PlaceGangMembersInCircle(ePedType pedType, int pedAmount, CVector c
if (!TheCamera.IsSphereVisible(coors, circleR) ||
MIN_CREATION_DIST * PedCreationDistMultiplier() <= (coors - FindPlayerPed()->GetPosition()).Magnitude2D()) {
- if (CPedPlacement::IsPositionClearForPed(coors, circleR, -1, 0)) {
+ if (CPedPlacement::IsPositionClearForPed(coors, circleR, -1, nil)) {
int pedIdx = 0;
CVector leaderPos;
+#ifdef FIX_BUGS
+ bool createLeader = true;
+#endif
- for (int i = 0; i < pedAmount; i++) {
+ for (int i = 0; i < pedAmount; i++) {
float angleMult = i + CGeneral::GetRandomNumberInRange(-0.2f, 0.2f);
float randomR = circleR + CGeneral::GetRandomNumberInRange(-0.2f, 0.2f) * circleR;
float xOffset = randomR * Cos(angleMult * circleSector);
@@ -1498,8 +1503,10 @@ CPopulation::PlaceGangMembersInCircle(ePedType pedType, int pedAmount, CVector c
float groundZ = CWorld::FindGroundZFor3DCoord(xOffset + coors.x, yOffset + coors.y, coors.z + 1.0, &foundGround) + 1.0f;
if (foundGround) {
CVector finalPos(coors.x + xOffset, coors.y + yOffset, coors.z > groundZ ? coors.z : groundZ);
-
- if (i == 0)
+#ifndef FIX_BUGS
+ const bool createLeader = i == 0;
+#endif
+ if (createLeader)
leaderPos = finalPos;
int gangModel = ChooseGangOccupation(pedType - PEDTYPE_GANG1);
@@ -1522,11 +1529,11 @@ CPopulation::PlaceGangMembersInCircle(ePedType pedType, int pedAmount, CVector c
}
}
}
- bool memberCanSeeLeader = i == 0 ? true : CWorld::GetIsLineOfSightClear(finalPos, leaderPos, true, false, false, false, false, false, false);
+ bool memberCanSeeLeader = createLeader ? true : CWorld::GetIsLineOfSightClear(finalPos, leaderPos, true, false, false, false, false, false, false);
- bool notTooCloseToLeader = i == 0 ? true : !(Abs(finalPos.z - leaderPos.z) < 1.0f);
+ bool notTooHighFromLeader = createLeader ? true : !(Abs(finalPos.z - leaderPos.z) >= 1.0f);
- if (!foundObstacle && memberCanSeeLeader && notTooCloseToLeader) {
+ if (!foundObstacle && memberCanSeeLeader && notTooHighFromLeader) {
CPed* newPed = AddPed(pedType, gangModel, finalPos);
if (newPed) {
createdPeds[pedIdx++] = newPed;
@@ -1539,6 +1546,9 @@ CPopulation::PlaceGangMembersInCircle(ePedType pedType, int pedAmount, CVector c
newPed->bCanAttackPlayerWithCops = true;
CVisibilityPlugins::SetClumpAlpha(newPed->GetClump(), 0);
+#ifdef FIX_BUGS
+ createLeader = false;
+#endif
}
// No.
#ifndef FIX_BUGS
@@ -1586,7 +1596,7 @@ CPopulation::PlaceCouple(ePedType manType, int32 manModel, ePedType womanType, i
return;
if (!TheCamera.IsSphereVisible(coors, 1.5f) || MIN_CREATION_DIST * PedCreationDistMultiplier() <= (coors - FindPlayerPed()->GetPosition()).Magnitude2D()) {
- if (CPedPlacement::IsPositionClearForPed(coors, CModelInfo::GetModelInfo(manModel)->GetColModel()->boundingSphere.radius, -1, 0)) {
+ if (CPedPlacement::IsPositionClearForPed(coors, CModelInfo::GetModelInfo(manModel)->GetColModel()->boundingSphere.radius, -1, nil)) {
bool manFoundGround;
float manGroundZ = CWorld::FindGroundZFor3DCoord(coors.x, coors.y, coors.z, &manFoundGround) + 1.0f;
if (manFoundGround) {
@@ -1668,9 +1678,12 @@ CPopulation::PlaceMallPedsAsStationaryGroup(CVector const& coors, int32 group)
if (!TheCamera.IsSphereVisible(coors, circleR) ||
MIN_CREATION_DIST * PedCreationDistMultiplier() <= (coors - FindPlayerPed()->GetPosition()).Magnitude2D()) {
- if (CPedPlacement::IsPositionClearForPed(coors, circleR, -1, 0)) {
+ if (CPedPlacement::IsPositionClearForPed(coors, circleR, -1, nil)) {
int pedIdx = 0;
CVector leaderPos;
+#ifdef FIX_BUGS
+ bool createLeader = true;
+#endif
for (int i = 0; i < pedAmount; i++) {
float angleMult = i + CGeneral::GetRandomNumberInRange(-0.2f, 0.2f);
@@ -1682,11 +1695,15 @@ CPopulation::PlaceMallPedsAsStationaryGroup(CVector const& coors, int32 group)
if (foundGround) {
CVector finalPos(coors.x + xOffset, coors.y + yOffset, coors.z > groundZ ? coors.z : groundZ);
- if (i == 0)
+#ifndef FIX_BUGS
+ const bool createLeader = i == 0;
+#endif
+ if (createLeader)
leaderPos = finalPos;
int pedModel = ChooseCivilianOccupation(group);
CPedModelInfo *pedModelInfo = (CPedModelInfo*)CModelInfo::GetModelInfo(pedModel);
+
if (pedModelInfo->GetRwObject()) {
CEntity* obstacles[6] = { nil, nil, nil, nil, nil, nil };
CPedPlacement::IsPositionClearForPed(finalPos, CModelInfo::GetModelInfo(pedModel)->GetColModel()->boundingSphere.radius, ARRAY_SIZE(obstacles), obstacles);
@@ -1706,11 +1723,11 @@ CPopulation::PlaceMallPedsAsStationaryGroup(CVector const& coors, int32 group)
}
}
}
- bool memberCanSeeLeader = i == 0 ? true : CWorld::GetIsLineOfSightClear(finalPos, leaderPos, true, false, false, false, false, false, false);
+ bool memberCanSeeLeader = createLeader ? true : CWorld::GetIsLineOfSightClear(finalPos, leaderPos, true, false, false, false, false, false, false);
- bool notTooCloseToLeader = i == 0 ? true : !(Abs(finalPos.z - leaderPos.z) < 1.0f);
+ bool notTooHighFromLeader = createLeader ? true : !(Abs(finalPos.z - leaderPos.z) >= 1.0f);
- if (!foundObstacle && memberCanSeeLeader && notTooCloseToLeader) {
+ if (!foundObstacle && memberCanSeeLeader && notTooHighFromLeader) {
CPed *newPed = AddPed(pedModelInfo->m_pedType, pedModel, finalPos);
if (newPed) {
createdPeds[pedIdx++] = newPed;
@@ -1721,6 +1738,9 @@ CPopulation::PlaceMallPedsAsStationaryGroup(CVector const& coors, int32 group)
newPed->m_fRotationCur = angle;
newPed->m_fearFlags = 0;
CVisibilityPlugins::SetClumpAlpha(newPed->GetClump(), 0);
+#ifdef FIX_BUGS
+ createLeader = false;
+#endif
}
// No.
#ifndef FIX_BUGS