more sensible world loading stuff (wip)
[carveJwlIkooP6JGAAIwe30JlM.git] / world_entity.c
index 7e285d44a54731ea3cd73e93885ff10ed6d70d74..d3c6a8c011b00fc6dc3af5182c66ca33a690bcd3 100644 (file)
@@ -6,9 +6,7 @@
 #include "world.h"
 #include "world_load.h"
 
-VG_STATIC void world_gen_entities_init(void){
-   world_instance *world = world_loading_instance();
-
+VG_STATIC void world_gen_entities_init( world_instance *world ){
    /* lights */
    for( u32 j=0; j<mdl_arrcount(&world->ent_light); j ++ ){
       ent_light *light = mdl_arritm( &world->ent_light, j );
@@ -200,7 +198,7 @@ VG_STATIC void ent_audio_call( world_instance *world, ent_call *call ){
       return;
    }
 
-   u8 world_id = (world - world_static.worlds) + 1;
+   u8 world_id = (world - world_static.instances) + 1;
    u32 index = mdl_entity_id_id( call->id );
    ent_audio *audio = mdl_arritm( &world->ent_audio, index );