music player, credits
[carveJwlIkooP6JGAAIwe30JlM.git] / world_gen.c
index 799059a5f423626e00dd8a9969f94f3ece09a58e..a454d02509b6baac826cd00b74b7662e3a5985da 100644 (file)
@@ -227,7 +227,7 @@ VG_STATIC void world_gen_generate_meshes(void)
 
    vg_async_item *call = scene_alloc_async( &world->scene_no_collide,
                                             &world->mesh_no_collide,
-                                            200000, 500000 );
+                                            250000, 500000 );
 
    for( u32 i=0; i<world->surface_count; i++ ){
       struct world_surface *surf = &world->surfaces[ i ];
@@ -577,6 +577,19 @@ VG_STATIC void async_world_postprocess_render( void *payload, u32 _size )
    glBindBuffer( GL_UNIFORM_BUFFER, world->ubo_lighting );
    glBufferSubData( GL_UNIFORM_BUFFER, 0, 
                     sizeof(struct ub_world_lighting), &world->ub_lighting );
+
+   /* yes we are using this as the entity begin thing. FIXME */
+   world->probabilities[ k_probability_curve_constant ] = 1.0f;
+   for( u32 i=0; i<mdl_arrcount(&world->ent_audio); i++ ){
+      ent_audio *audio = mdl_arritm(&world->ent_audio,i);
+      if( audio->flags & AUDIO_FLAG_AUTO_START ){
+         ent_call call;
+         call.data = NULL;
+         call.function = k_ent_function_trigger;
+         call.id = mdl_entity_id( k_ent_audio, i );
+         entity_call( world, &call );
+      }
+   }
 }
 
 /* Loads textures from the pack file */