seperation of body initialization, glider model
[carveJwlIkooP6JGAAIwe30JlM.git] / player_ragdoll.h
index 0afc330486d6be8e96bd82790a5b5dc9746ebff8..77118f117389dfd5ad919ff66e4da17e4f215dd7 100644 (file)
@@ -20,9 +20,17 @@ struct player_ragdoll{
       u32 use_limits;
       v3f limits[2];
 
-      rb_object obj;
       u32 parent;
       u32 colour;
+
+      rigidbody rb;
+      enum bone_collider type;
+
+      union {
+         rb_capsule capsule;
+         boxf box;
+      }
+      inf;
    }
    parts[32];
    u32 part_count;
@@ -33,12 +41,19 @@ struct player_ragdoll{
    rb_constr_swingtwist cone_constraints[32];
    u32                  cone_constraints_count;
 
+   /* TODO: Fix duplicated data */
+   u32 constraint_associations[32][2];
    int shoes[2];
 };
 
 static float k_ragdoll_floatyiness = 20.0f,
                 k_ragdoll_floatydrag  = 1.0f,
-                k_ragdoll_limit_scale = 1.0f;
+                k_ragdoll_limit_scale = 1.0f,
+                k_ragdoll_spring = 127.0f,
+                k_ragdoll_dampening = 15.0f,
+                k_ragdoll_correction = 0.5f,
+                k_ragdoll_angular_drag = 0.08f,
+                k_ragdoll_active_threshold = 5.0f;
 
 static int   k_ragdoll_div = 1,
                 ragdoll_frame = 0,