Skip to content

Commit

Permalink
xrPhysics: Fix potential copy-paste error in SetLimitsActive for ax…
Browse files Browse the repository at this point in the history
…is `-1` (#1491)
  • Loading branch information
AMS21 authored Nov 4, 2023
1 parent 470c23d commit c53d1f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/xrPhysics/PHJoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ void CPHJoint::SetLimitsActive(int axis_num)
dJointSetSliderParam(m_joint, dParamHiStop, axes[0].high);
dJointSetAMotorParam(m_joint1, dParamLoStop, axes[1].low);
dJointSetAMotorParam(m_joint1, dParamHiStop, axes[1].high);
break;
case 0:
dJointSetSliderParam(m_joint, dParamLoStop, axes[0].low);
dJointSetSliderParam(m_joint, dParamHiStop, axes[0].high);
Expand All @@ -982,11 +983,12 @@ void CPHJoint::SetLimitsActive(int axis_num)
{
case -1:
dJointSetAMotorParam(m_joint1, dParamLoStop, axes[0].low);
dJointSetAMotorParam(m_joint1, dParamLoStop, axes[0].low);
dJointSetAMotorParam(m_joint1, dParamHiStop, axes[0].high);
dJointSetAMotorParam(m_joint1, dParamLoStop2, axes[1].low);
dJointSetAMotorParam(m_joint1, dParamHiStop2, axes[1].high);
dJointSetAMotorParam(m_joint1, dParamLoStop3, axes[2].low);
dJointSetAMotorParam(m_joint1, dParamHiStop3, axes[2].high);
dJointSetAMotorParam(m_joint1, dParamHiStop3, axes[2].high);
break;
case 0:
dJointSetAMotorParam(m_joint1, dParamLoStop, axes[0].low);
dJointSetAMotorParam(m_joint1, dParamHiStop, axes[0].high);
Expand Down

0 comments on commit c53d1f5

Please sign in to comment.