]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.c
add support for fixed joints (jointtype -1), debug only according to ODE docs
[xonotic/darkplaces.git] / world.c
diff --git a/world.c b/world.c
index d825e07a271f5bcc21492ec8fb8d948df84d8d9b..73508152dba73a5297dfb11e0d41ac3aeef2afcf 100644 (file)
--- a/world.c
+++ b/world.c
@@ -691,7 +691,7 @@ dJointID        (ODE_API *dJointCreateUniversal)(dWorldID, dJointGroupID);
 //dJointID        (ODE_API *dJointCreatePR)(dWorldID, dJointGroupID);
 //dJointID        (ODE_API *dJointCreatePU)(dWorldID, dJointGroupID);
 //dJointID        (ODE_API *dJointCreatePiston)(dWorldID, dJointGroupID);
-//dJointID        (ODE_API *dJointCreateFixed)(dWorldID, dJointGroupID);
+dJointID        (ODE_API *dJointCreateFixed)(dWorldID, dJointGroupID);
 //dJointID        (ODE_API *dJointCreateNull)(dWorldID, dJointGroupID);
 //dJointID        (ODE_API *dJointCreateAMotor)(dWorldID, dJointGroupID);
 //dJointID        (ODE_API *dJointCreateLMotor)(dWorldID, dJointGroupID);
@@ -1156,7 +1156,7 @@ static dllfunction_t odefuncs[] =
 //     {"dJointCreatePR",                                                              (void **) &dJointCreatePR},
 //     {"dJointCreatePU",                                                              (void **) &dJointCreatePU},
 //     {"dJointCreatePiston",                                                  (void **) &dJointCreatePiston},
-//     {"dJointCreateFixed",                                                   (void **) &dJointCreateFixed},
+       {"dJointCreateFixed",                                                   (void **) &dJointCreateFixed},
 //     {"dJointCreateNull",                                                    (void **) &dJointCreateNull},
 //     {"dJointCreateAMotor",                                                  (void **) &dJointCreateAMotor},
 //     {"dJointCreateLMotor",                                                  (void **) &dJointCreateLMotor},
@@ -1659,6 +1659,8 @@ static void World_Physics_Frame_BodyToEntity(world_t *world, prvm_edict_t *ed)
                                break;
                        case JOINTTYPE_HINGE2:
                                break;
+                       case JOINTTYPE_FIXED:
+                               break;
                }
                return;
        }
@@ -1785,6 +1787,9 @@ static void World_Physics_Frame_JointFromEntity(world_t *world, prvm_edict_t *ed
                case JOINTTYPE_HINGE2:
                        j = dJointCreateHinge2(world->physics.ode_world, 0);
                        break;
+               case JOINTTYPE_FIXED:
+                       j = dJointCreateFixed(world->physics.ode_world, 0);
+                       break;
                case 0:
                default:
                        // no joint
@@ -1857,6 +1862,8 @@ static void World_Physics_Frame_JointFromEntity(world_t *world, prvm_edict_t *ed
                                SETPARAMS(Hinge2,);
                                SETPARAMS(Hinge2,2);
                                break;
+                       case JOINTTYPE_FIXED:
+                               break;
                        case 0:
                        default:
                                Host_Error("what? but above the joint was valid...\n");