X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_volumes.c;h=23b8299ccdcdfffe21ed3b1f81049212d242b150;hb=1a7f4a35e88698bdb45c90f646f1645589d5511c;hp=2f0569df364df22a93eedbc3a2797c2887bc79e4;hpb=7eba38b8178c82040618a518634d8ff4813e2ff2;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_volumes.c b/world_volumes.c index 2f0569d..23b8299 100644 --- a/world_volumes.c +++ b/world_volumes.c @@ -23,6 +23,12 @@ static void world_volumes_update( world_instance *world, v3f pos ){ } else{ /* trigger on exit...... */ + ent_call basecall; + basecall.function = k_ent_function_trigger_leave; + basecall.id = mdl_entity_id( k_ent_volume, idx ); + basecall.data = NULL; + + entity_call( world, &basecall ); } } world_static.active_trigger_volume_count = j; @@ -37,13 +43,10 @@ static void world_volumes_update( world_instance *world, v3f pos ){ random_ticks ++; } - float radius = 25.0f; - boxf volume_proximity; - v3_add( pos, (v3f){ radius, radius, radius }, volume_proximity[1] ); - v3_sub( pos, (v3f){ radius, radius, radius }, volume_proximity[0] ); + float radius = 32.0f; bh_iter it; - bh_iter_init_box( 0, &it, volume_proximity ); + bh_iter_init_range( 0, &it, pos, radius ); i32 idx; while( bh_next( world->entity_bh, &it, &idx ) ){