collision layers
[carveJwlIkooP6JGAAIwe30JlM.git] / world_audio.c
index a8e88d6631fdbf00e14ad98774a32bdbb56a5b64..8a167e402b4889c753a2489be87eeead1a58c172 100644 (file)
@@ -44,7 +44,8 @@ enum audio_sprite_type world_audio_sample_sprite_random(v3f origin, v3f output)
 
    world_instance *world = world_current_instance();
    
-   if( ray_world( world, pos, (v3f){0.0f,-1.0f,0.0f}, &contact ) ){
+   if( ray_world( world, pos, (v3f){0.0f,-1.0f,0.0f}, &contact, 
+            k_material_flag_ghosts ) ){
       struct world_surface *mat = ray_hit_surface( world, &contact );
 
       if( mat->info.surface_prop == k_surface_prop_grass){
@@ -104,7 +105,8 @@ VG_STATIC void world_audio_sample_distances( v3f co, int *index, float *value )
    float dist = 200.0f;
 
    for( int i=0; i<10; i++ ){
-      if( ray_world( world_current_instance(), rc, rd, &ray ) ){
+      if( ray_world( world_current_instance(), rc, rd, &ray, 
+                     k_material_flag_ghosts ) ){
          dist = (float)i*5.0f + ray.dist;
          break;
       }