Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_ObjectActuator.cpp
| Context not available. | |||||
| m_angular_damping_active = false; | m_angular_damping_active = false; | ||||
| m_error_accumulator.setValue(0.0,0.0,0.0); | m_error_accumulator.setValue(0.0,0.0,0.0); | ||||
| m_previous_error.setValue(0.0,0.0,0.0); | m_previous_error.setValue(0.0,0.0,0.0); | ||||
| m_jump = false; | |||||
| return false; | return false; | ||||
| } else if (parent) | } else if (parent) | ||||
| { | { | ||||
| if (character->OnGround()) | |||||
sybren: Style: opening bracket on same line as if-statement. | |||||
| { | |||||
| m_jump = false; | |||||
| } | |||||
| if (m_bitLocalFlag.ServoControl) | if (m_bitLocalFlag.ServoControl) | ||||
| { | { | ||||
| // In this mode, we try to reach a target speed using force | // In this mode, we try to reach a target speed using force | ||||
| Context not available. | |||||
| else if (m_bitLocalFlag.CharacterMotion) { | else if (m_bitLocalFlag.CharacterMotion) { | ||||
| MT_Vector3 dir = m_dloc; | MT_Vector3 dir = m_dloc; | ||||
| if (m_bitLocalFlag.DLoc) | |||||
sybrenUnsubmitted Not Done Inline ActionsStyle: opening bracket on same line as if-statement. sybren: Style: opening bracket on same line as if-statement. | |||||
| { | |||||
| MT_Matrix3x3 basis = parent->GetPhysicsController()->GetOrientation(); | |||||
| dir = basis*dir; | |||||
sybrenUnsubmitted Not Done Inline ActionsStyle: spaces around operators. sybren: Style: spaces around operators. | |||||
| } | |||||
| if (m_bitLocalFlag.AddOrSetCharLoc) { | if (m_bitLocalFlag.AddOrSetCharLoc) { | ||||
| MT_Vector3 old_dir = character->GetWalkDirection(); | MT_Vector3 old_dir = character->GetWalkDirection(); | ||||
| Context not available. | |||||
| } | } | ||||
| // We always want to set the walk direction since a walk direction of (0, 0, 0) should stop the character | // We always want to set the walk direction since a walk direction of (0, 0, 0) should stop the character | ||||
| if (m_bitLocalFlag.DLoc) | |||||
| { | |||||
| MT_Matrix3x3 basis = parent->GetPhysicsController()->GetOrientation(); | |||||
| dir = basis*dir; | |||||
| } | |||||
| character->SetWalkDirection(dir/parent->GetScene()->GetPhysicsEnvironment()->GetNumTimeSubSteps()); | character->SetWalkDirection(dir/parent->GetScene()->GetPhysicsEnvironment()->GetNumTimeSubSteps()); | ||||
| if (!m_bitLocalFlag.ZeroDRot) | if (!m_bitLocalFlag.ZeroDRot) | ||||
| { | { | ||||
| parent->ApplyRotation(m_drot,(m_bitLocalFlag.DRot) != 0); | parent->ApplyRotation(m_drot,(m_bitLocalFlag.DRot) != 0); | ||||
| } | } | ||||
| if (m_bitLocalFlag.CharacterJump) | if (m_bitLocalFlag.CharacterJump && !m_jump) | ||||
sybrenUnsubmitted Not Done Inline ActionsStyle: opening bracket on same line as if-statement. sybren: Style: opening bracket on same line as if-statement. | |||||
| { | { | ||||
| character->Jump(); | character->Jump(); | ||||
| m_jump = true; | |||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| Context not available. | |||||
Style: opening bracket on same line as if-statement.