X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_gen.h;h=ee774bb7486fc63cd8488ec61c61c35c8931f803;hb=75703291fbf045008a3b1ebb20fc46a2617b6b3b;hp=96928b60bd166b05fb58c52810b43f6f83b4a130;hpb=297468e5a3cc8c7805c16fdd615f42f3876eb908;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_gen.h b/world_gen.h index 96928b6..ee774bb 100644 --- a/world_gen.h +++ b/world_gen.h @@ -655,6 +655,8 @@ VG_STATIC void world_process_resources(void) VG_STATIC void world_unload(void) { + vg_acquire_thread_sync(); + /* free meshes */ mesh_free( &world.mesh_route_lines ); mesh_free( &world.mesh_geo ); @@ -734,6 +736,8 @@ VG_STATIC void world_unload(void) world.collector_count = 0; world.water.enabled = 0; + + vg_release_thread_sync(); } VG_STATIC void world_load(void)