X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_walk.c;h=1f706c2ad3f875d108dd14c405fb8f32e704f34d;hb=296560179b19451468030f202b17492b1c71b9d0;hp=3cefc295068cf8ff5b4cd666663ee2e4b7ad5ba4;hpb=8a31c1ffcb632b9b6d1702332f0d75d609c0a87b;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_walk.c b/player_walk.c index 3cefc29..1f706c2 100644 --- a/player_walk.c +++ b/player_walk.c @@ -146,8 +146,7 @@ VG_STATIC int player_walk_scan_for_drop_in( player_instance *player ) ray_hit *ray = &samples[ sample_count ]; ray->dist = 2.0f; - if( ray_world( world, pos, ray_dir, ray ) ) - { + if( ray_world( world, pos, ray_dir, ray, 0 ) ){ vg_line( pos, ray->pos, VG__RED ); vg_line_point( ray->pos, 0.025f, VG__BLACK ); @@ -219,8 +218,7 @@ VG_STATIC int player_walk_scan_for_drop_in( player_instance *player ) ray_hit ray; ray.dist = k_board_length*2.0f + 0.6f; - if( ray_world( world, va, v0, &ray ) ) - { + if( ray_world( world, va, v0, &ray, 0 ) ){ vg_line( va, vb, VG__RED ); vg_line_point( ray.pos, 0.1f, VG__RED ); vg_error( "invalidated\n" ); @@ -228,8 +226,7 @@ VG_STATIC int player_walk_scan_for_drop_in( player_instance *player ) } v3_muls( v0, -1.0f, v0 ); - if( ray_world( world, vb, v0, &ray ) ) - { + if( ray_world( world, vb, v0, &ray, 0 ) ){ vg_line( va, vb, VG__RED ); vg_line_point( ray.pos, 0.1f, VG__RED ); vg_error( "invalidated\n" ); @@ -457,7 +454,7 @@ VG_STATIC void player__walk_update( player_instance *player ){ */ len = rb_capsule__scene( mtx, &w->collider, NULL, - &world->rb_geo.inf.scene, manifold ); + &world->rb_geo.inf.scene, manifold, 0 ); player_walk_custom_filter( world, manifold, len, 0.01f ); len = rb_manifold_apply_filtered( manifold, len ); @@ -570,7 +567,8 @@ VG_STATIC void player__walk_update( player_instance *player ){ v3f n; float t; - if( spherecast_world( world, pa, pb, w->collider.radius, &t, n ) != -1 ){ + if( spherecast_world( world, pa, pb, + w->collider.radius, &t, n, 0 ) != -1 ){ if( player_walk_normal_standable( player, n ) ){ v3_lerp( pa, pb, t, player->rb.co ); v3_muladds( player->rb.co, player->basis[1], @@ -624,13 +622,13 @@ VG_STATIC void player__walk_update( player_instance *player ){ float t, sr = w->collider.radius-0.04f; v3f n; - if( spherecast_world( world, lwr_prev, lwr_now, sr, &t, n ) != -1 ){ + if( spherecast_world( world, lwr_prev, lwr_now, sr, &t, n, 0 ) != -1 ){ v3_lerp( lwr_prev, lwr_now, vg_maxf(0.01f,t), player->rb.co ); player->rb.co[1] -= w->collider.radius; rb_update_transform( &player->rb ); v3_add( player->rb.co, player->basis[1], mtx[3] ); - vg_line_capsule( mtx, w->collider.radius, w->collider.height, VG__RED ); + vg_line_capsule( mtx, w->collider.radius, w->collider.height, VG__RED); } }