summaryrefslogtreecommitdiffstats
path: root/src/peds/PedIK.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-03-02 20:54:47 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-03-02 20:54:47 +0100
commit0a3211d0cf5c3ed1873089482a54954a79f0de19 (patch)
tree7f09b889e83e832b4bf8c6092e08a16f28fbf0f7 /src/peds/PedIK.cpp
parentscript utils (diff)
parentMerge pull request #340 from erorcun/erorcun (diff)
downloadre3-0a3211d0cf5c3ed1873089482a54954a79f0de19.tar
re3-0a3211d0cf5c3ed1873089482a54954a79f0de19.tar.gz
re3-0a3211d0cf5c3ed1873089482a54954a79f0de19.tar.bz2
re3-0a3211d0cf5c3ed1873089482a54954a79f0de19.tar.lz
re3-0a3211d0cf5c3ed1873089482a54954a79f0de19.tar.xz
re3-0a3211d0cf5c3ed1873089482a54954a79f0de19.tar.zst
re3-0a3211d0cf5c3ed1873089482a54954a79f0de19.zip
Diffstat (limited to 'src/peds/PedIK.cpp')
-rw-r--r--src/peds/PedIK.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/peds/PedIK.cpp b/src/peds/PedIK.cpp
index 44443e6a..38ab429e 100644
--- a/src/peds/PedIK.cpp
+++ b/src/peds/PedIK.cpp
@@ -185,7 +185,7 @@ CPedIK::LookInDirection(float phi, float theta)
if (headStatus == ANGLES_SET_TO_MAX)
success = false;
- if (headStatus != ANGLES_SET_EXACTLY && !(m_flags & LOOKING)) {
+ if (headStatus != ANGLES_SET_EXACTLY && !(m_flags & LOOKAROUND_HEAD_ONLY)) {
float remainingTurn = CGeneral::LimitRadianAngle(phi - m_ped->m_fRotationCur);
if (CPedIK::MoveLimb(m_torsoOrient, remainingTurn, theta, ms_torsoInfo))
success = true;
@@ -198,7 +198,7 @@ CPedIK::LookInDirection(float phi, float theta)
nextFrame.GetPosition() += framePos;
nextFrame.UpdateRW();
- if (!(m_flags & LOOKING))
+ if (!(m_flags & LOOKAROUND_HEAD_ONLY))
RotateTorso(m_ped->m_pFrames[PED_MID], &m_torsoOrient, false);
return success;
@@ -224,8 +224,8 @@ CPedIK::PointGunInDirection(float phi, float theta)
bool result = true;
bool armPointedToGun = false;
float angle = CGeneral::LimitRadianAngle(phi - m_ped->m_fRotationCur);
- m_flags &= (~FLAG_1);
- m_flags |= LOOKING;
+ m_flags &= (~GUN_POINTED_SUCCESSFULLY);
+ m_flags |= LOOKAROUND_HEAD_ONLY;
if (m_flags & AIMS_WITH_ARM) {
armPointedToGun = PointGunInDirectionUsingArm(angle, theta);
angle = CGeneral::LimitRadianAngle(angle - m_upperArmOrient.phi);
@@ -242,7 +242,7 @@ CPedIK::PointGunInDirection(float phi, float theta)
if (status == ANGLES_SET_TO_MAX)
result = false;
else if (status == ANGLES_SET_EXACTLY)
- m_flags |= FLAG_1;
+ m_flags |= GUN_POINTED_SUCCESSFULLY;
}
if (TheCamera.Cams[TheCamera.ActiveCam].Using3rdPersonMouseCam() && m_flags & AIMS_WITH_ARM)
RotateTorso(m_ped->m_pFrames[PED_MID], &m_torsoOrient, true);
@@ -270,7 +270,7 @@ CPedIK::PointGunInDirectionUsingArm(float phi, float theta)
float uaPhi = phi - m_torsoOrient.phi - DEGTORAD(15.0f);
LimbMoveStatus uaStatus = MoveLimb(m_upperArmOrient, uaPhi, CGeneral::LimitRadianAngle(theta - pitch), ms_upperArmInfo);
if (uaStatus == ANGLES_SET_EXACTLY) {
- m_flags |= FLAG_1;
+ m_flags |= GUN_POINTED_SUCCESSFULLY;
result = true;
}
if (uaStatus == ANGLES_SET_TO_MAX) {
@@ -283,7 +283,7 @@ CPedIK::PointGunInDirectionUsingArm(float phi, float theta)
laStatus = MoveLimb(m_lowerArmOrient, laPhi, 0.0f, ms_lowerArmInfo);
if (laStatus == ANGLES_SET_EXACTLY) {
- m_flags |= FLAG_1;
+ m_flags |= GUN_POINTED_SUCCESSFULLY;
result = true;
}
RwFrame *child = GetFirstChild(frame);
@@ -331,9 +331,9 @@ CPedIK::RestoreLookAt(void)
matrix.Translate(pos);
matrix.UpdateRW();
- if (!(m_flags & LOOKING))
+ if (!(m_flags & LOOKAROUND_HEAD_ONLY))
MoveLimb(m_torsoOrient, 0.0f, 0.0f, ms_torsoInfo);
- if (!(m_flags & LOOKING))
+ if (!(m_flags & LOOKAROUND_HEAD_ONLY))
RotateTorso(m_ped->m_pFrames[PED_MID], &m_torsoOrient, false);
return result;