map update
authorhgn <hgodden00@gmail.com>
Thu, 8 Dec 2022 01:05:00 +0000 (01:05 +0000)
committerhgn <hgodden00@gmail.com>
Thu, 8 Dec 2022 01:05:00 +0000 (01:05 +0000)
maps_src/mp_mtzero.mdl
player_physics.h

index 24c3c03ee5839ee03a68daab252a8f17be481c13..45891c30aecae7dd58f30f547dbdfa7e5fbf2ca1 100644 (file)
Binary files a/maps_src/mp_mtzero.mdl and b/maps_src/mp_mtzero.mdl differ
index db7105d1ed246bbfe95947a7612243dee5ca7541..56698f87e2ecdfd65fd44e083eed6b522d386c88 100644 (file)
@@ -800,7 +800,11 @@ VG_STATIC int player_update_collision_manifold( rb_ct *manifold )
       rb_manifold_filter_joint_edges( manifold, len_f, 0.05f );
       rb_manifold_filter_pairs( manifold, len_f, 0.05f );
    }
-   len_f = rb_manifold_apply_filtered( manifold, len_f );
+   int new_len_f = rb_manifold_apply_filtered( manifold, len_f );
+   if( len_f && !new_len_f )
+      len_f = 1;
+   else
+      len_f = new_len_f;
    
    rb_ct *man_b = &manifold[len_f];
    len_b = rb_sphere_scene( rbb, &world.rb_geo, man_b );
@@ -811,8 +815,11 @@ VG_STATIC int player_update_collision_manifold( rb_ct *manifold )
       rb_manifold_filter_joint_edges( man_b, len_b, 0.05f );
       rb_manifold_filter_pairs( man_b, len_b, 0.05f );
    }
-   len_b = rb_manifold_apply_filtered( man_b, len_b );
-
+   int new_len_b = rb_manifold_apply_filtered( man_b, len_b );
+   if( len_b && !new_len_b )
+      len_b = 1;
+   else
+      len_b = new_len_b;
 #if 0
    /* 
     * Preprocess collision points, and create a surface picture.
@@ -946,8 +953,8 @@ VG_STATIC void player_collision_response( rb_ct *manifold, int len )
           * components.
           */
          
-         float wy = v3_dot( phys->rb.up, impulse ),
-               wx = v3_dot( phys->rb.right, impulse )*1.8f;
+         float wy = v3_dot( phys->rb.up, impulse ) * 0.8f,
+               wx = v3_dot( phys->rb.right, impulse )*1.0f;
 
          v3_muladds( phys->rb.w, phys->rb.up, wy, phys->rb.w );
          v3_muladds( phys->rb.w, phys->rb.right, wx, phys->rb.w );
@@ -1080,7 +1087,7 @@ VG_STATIC void player_do_motion(void)
    
    
    /* Real angular velocity integration */
-   v3_lerp( phys->rb.w, (v3f){0.0f,0.0f,0.0f}, 0.125f, phys->rb.w );
+   v3_lerp( phys->rb.w, (v3f){0.0f,0.0f,0.0f}, 0.125f*0.5f, phys->rb.w );
    if( v3_length2( phys->rb.w ) > 0.0f )
    {
       v4f rotation;