| 49 | return false; |
| 50 | } |
| 51 | void CCar::SWheel::Init() |
| 52 | { |
| 53 | if (inited) |
| 54 | return; |
| 55 | BONE_P_PAIR_CIT bone = bone_map.find(bone_id); |
| 56 | R_ASSERT2(bone->second.element, "No Element was created for wheel. Check collision is set"); |
| 57 | bone->second.element->set_DynamicLimits(default_l_limit, default_w_limit * 100.f); |
| 58 | CPhysicsElement* e = bone->second.element; |
| 59 | CPhysicsJoint* j = bone->second.joint; |
| 60 | radius = e->getRadius(); |
| 61 | R_ASSERT2(j, "No wheel joint was set for a wheel"); |
| 62 | joint = j; |
| 63 | joint->SetBackRef(&joint); |
| 64 | R_ASSERT2(dJointGetType(joint->GetDJoint()) == dJointTypeHinge2, "No wheel join was set for a wheel, only wheel-joint valid!!!"); |
| 65 | ApplyDriveAxisVelTorque(0.f, 0.f); |
| 66 | e->add_ObjectContactCallback(WheellCollisionCallback); |
| 67 | e->set_CallbackData((void*)&collision_params); |
| 68 | e->SetAirResistance(0, 0); |
| 69 | inited = true; |
| 70 | } |
| 71 | void CCar::SWheel::Load(LPCSTR section) |
| 72 | { |
| 73 | IKinematics* K = PKinematics(car->Visual()); |
nothing calls this directly
no test coverage detected