projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
maths api changes
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_gen.h
diff --git
a/world_gen.h
b/world_gen.h
index c274eace18e621cc15b3b7ed81915e644781a56c..c8c7fb797b419ca80da92801d127b3c7c3ff2dd9 100644
(file)
--- 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 );
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_randf
64
()*VG_TAUf );
q_mul( qsurface, qrandom, qsurface );
q_m3x3( qsurface, transform );
v3_copy( hit->pos, transform[3] );
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; i<particles; i++ ){
v3f pos;
for( u32 i=0; i<particles; i++ ){
v3f pos;
- v3_mul( volume, (v3f){ vg_randf
(), 1000.0f, vg_randf
() }, pos );
+ v3_mul( volume, (v3f){ vg_randf
64(), 1000.0f, vg_randf64
() }, pos );
pos[1] = 1000.0f;
v3_add( pos, world->scene_geo.bbx[0], pos );
pos[1] = 1000.0f;
v3_add( pos, world->scene_geo.bbx[0], pos );
@@
-790,6
+790,8
@@
matched:;
VG_STATIC void world_load( u32 index, const char *path )
{
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;
world_instance *world = &world_global.worlds[index];
world_init_blank( world );
world->status = k_world_status_loading;