grind sound
[carveJwlIkooP6JGAAIwe30JlM.git] / world_gen.h
index 96928b60bd166b05fb58c52810b43f6f83b4a130..ee774bb7486fc63cd8488ec61c61c35c8931f803 100644 (file)
@@ -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)