X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_gen.h;fp=world_gen.h;h=c8c7fb797b419ca80da92801d127b3c7c3ff2dd9;hb=ec90a4b46865009c1e1b1679f6926e35d2ee3f12;hp=c274eace18e621cc15b3b7ed81915e644781a56c;hpb=a6880a555be0e8bed7aae08c95b95eeb62ade0b4;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_gen.h b/world_gen.h index c274eac..c8c7fb7 100644 --- a/world_gen.h +++ b/world_gen.h @@ -39,7 +39,7 @@ VG_STATIC void world_add_blob( world_instance *world, float angle = v3_dot(hit->normal,(v3f){0.0f,1.0f,0.0f}); q_axis_angle( qsurface, axis, angle ); - q_axis_angle( qrandom, (v3f){0.0f,1.0f,0.0f}, vg_randf()*VG_TAUf ); + q_axis_angle( qrandom, (v3f){0.0f,1.0f,0.0f}, vg_randf64()*VG_TAUf ); q_mul( qsurface, qrandom, qsurface ); q_m3x3( qsurface, transform ); v3_copy( hit->pos, transform[3] ); @@ -108,7 +108,7 @@ VG_STATIC void world_apply_procedural_foliage( world_instance *world, for( u32 i=0; iscene_geo.bbx[0], pos ); @@ -790,6 +790,8 @@ matched:; VG_STATIC void world_load( u32 index, const char *path ) { + vg_rand_seed( 9001 ); + world_instance *world = &world_global.worlds[index]; world_init_blank( world ); world->status = k_world_status_loading;