summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-16 10:33:19 +0200
committeraap <aap@papnet.eu>2020-05-16 10:33:19 +0200
commit0c231663188ff4b639549c1be3c6f08df9a5afe1 (patch)
tree580611bace98ef247c549056810c1502b999c72c /src/peds/Ped.cpp
parentRemove unused audio enum (diff)
downloadre3-0c231663188ff4b639549c1be3c6f08df9a5afe1.tar
re3-0c231663188ff4b639549c1be3c6f08df9a5afe1.tar.gz
re3-0c231663188ff4b639549c1be3c6f08df9a5afe1.tar.bz2
re3-0c231663188ff4b639549c1be3c6f08df9a5afe1.tar.lz
re3-0c231663188ff4b639549c1be3c6f08df9a5afe1.tar.xz
re3-0c231663188ff4b639549c1be3c6f08df9a5afe1.tar.zst
re3-0c231663188ff4b639549c1be3c6f08df9a5afe1.zip
Diffstat (limited to 'src/peds/Ped.cpp')
-rw-r--r--src/peds/Ped.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index a1709fd7..d48a6a2f 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -2514,37 +2514,37 @@ CPed::CalculateNewVelocity(void)
if ((!idleAssoc || idleAssoc->blendAmount < 0.5f) && !fightAssoc) {
#endif
LimbOrientation newUpperLegs;
- newUpperLegs.phi = localWalkAngle;
+ newUpperLegs.yaw = localWalkAngle;
- if (newUpperLegs.phi < -DEGTORAD(100.0f)) {
- newUpperLegs.phi += PI;
- } else if (newUpperLegs.phi > DEGTORAD(100.0f)) {
- newUpperLegs.phi -= PI;
+ if (newUpperLegs.yaw < -DEGTORAD(100.0f)) {
+ newUpperLegs.yaw += PI;
+ } else if (newUpperLegs.yaw > DEGTORAD(100.0f)) {
+ newUpperLegs.yaw -= PI;
}
- if (newUpperLegs.phi > -DEGTORAD(50.0f) && newUpperLegs.phi < DEGTORAD(50.0f)) {
+ if (newUpperLegs.yaw > -DEGTORAD(50.0f) && newUpperLegs.yaw < DEGTORAD(50.0f)) {
#ifdef PED_SKIN
if(IsClumpSkinned(GetClump())){
/*
// this looks shit
- newUpperLegs.theta = 0.0f;
+ newUpperLegs.pitch = 0.0f;
RwV3d axis = { -1.0f, 0.0f, 0.0f };
- RtQuatRotate(&m_pFrames[PED_UPPERLEGL]->hanimFrame->q, &axis, RADTODEG(newUpperLegs.phi), rwCOMBINEPRECONCAT);
- RtQuatRotate(&m_pFrames[PED_UPPERLEGR]->hanimFrame->q, &axis, RADTODEG(newUpperLegs.phi), rwCOMBINEPRECONCAT);
+ RtQuatRotate(&m_pFrames[PED_UPPERLEGL]->hanimFrame->q, &axis, RADTODEG(newUpperLegs.yaw), rwCOMBINEPRECONCAT);
+ RtQuatRotate(&m_pFrames[PED_UPPERLEGR]->hanimFrame->q, &axis, RADTODEG(newUpperLegs.yaw), rwCOMBINEPRECONCAT);
*/
- newUpperLegs.theta = 0.1f;
+ newUpperLegs.pitch = 0.1f;
RwV3d Xaxis = { 1.0f, 0.0f, 0.0f };
RwV3d Zaxis = { 0.0f, 0.0f, 1.0f };
- RtQuatRotate(&m_pFrames[PED_UPPERLEGL]->hanimFrame->q, &Zaxis, RADTODEG(newUpperLegs.theta), rwCOMBINEPOSTCONCAT);
- RtQuatRotate(&m_pFrames[PED_UPPERLEGL]->hanimFrame->q, &Xaxis, RADTODEG(newUpperLegs.phi), rwCOMBINEPOSTCONCAT);
- RtQuatRotate(&m_pFrames[PED_UPPERLEGR]->hanimFrame->q, &Zaxis, RADTODEG(newUpperLegs.theta), rwCOMBINEPOSTCONCAT);
- RtQuatRotate(&m_pFrames[PED_UPPERLEGR]->hanimFrame->q, &Xaxis, RADTODEG(newUpperLegs.phi), rwCOMBINEPOSTCONCAT);
+ RtQuatRotate(&m_pFrames[PED_UPPERLEGL]->hanimFrame->q, &Zaxis, RADTODEG(newUpperLegs.pitch), rwCOMBINEPOSTCONCAT);
+ RtQuatRotate(&m_pFrames[PED_UPPERLEGL]->hanimFrame->q, &Xaxis, RADTODEG(newUpperLegs.yaw), rwCOMBINEPOSTCONCAT);
+ RtQuatRotate(&m_pFrames[PED_UPPERLEGR]->hanimFrame->q, &Zaxis, RADTODEG(newUpperLegs.pitch), rwCOMBINEPOSTCONCAT);
+ RtQuatRotate(&m_pFrames[PED_UPPERLEGR]->hanimFrame->q, &Xaxis, RADTODEG(newUpperLegs.yaw), rwCOMBINEPOSTCONCAT);
bDontAcceptIKLookAts = true;
}else
#endif
{
- newUpperLegs.theta = 0.0f;
+ newUpperLegs.pitch = 0.0f;
m_pedIK.RotateTorso(m_pFrames[PED_UPPERLEGL], &newUpperLegs, false);
m_pedIK.RotateTorso(m_pFrames[PED_UPPERLEGR], &newUpperLegs, false);
}