From: hgn Date: Tue, 17 Jan 2023 02:02:48 +0000 (+0000) Subject: make grass sprites a function of map area X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=ac4a2a0176bd9261b114003ee2c5a66bcf2676f3;hp=deac3e6a1b3a8d28302bbc18c183c7fe64cbfb3e;p=carveJwlIkooP6JGAAIwe30JlM.git make grass sprites a function of map area --- diff --git a/maps_src/mp_gridmap.mdl b/maps_src/mp_gridmap.mdl index 1f1079f..260b43f 100644 Binary files a/maps_src/mp_gridmap.mdl and b/maps_src/mp_gridmap.mdl differ diff --git a/world_gen.h b/world_gen.h index 47ed5ee..b5481c0 100644 --- a/world_gen.h +++ b/world_gen.h @@ -56,7 +56,12 @@ VG_STATIC void world_apply_procedural_foliage( struct world_material *mat ) int count = 0; - for( int i=0;i<100000;i++ ) + float area = volume[0]*volume[2]; + u32 particles = 0.08f * area; + + vg_info( "Map area: %f. Max particles: %u\n", area, particles ); + + for( int i=0;i