review save method
[carveJwlIkooP6JGAAIwe30JlM.git] / world_entity.h
index 3baaa2385a591aac82a822e3ff719af234ee4e59..bbcfbe20dbb651d1d1a7076cd8e9771f67503504 100644 (file)
@@ -5,7 +5,7 @@
 #include "entity.h"
 #include "bvh.h"
 
-VG_STATIC void world_gen_entities_init(void);
+VG_STATIC void world_gen_entities_init( world_instance *world );
 VG_STATIC ent_spawn *world_find_spawn_by_name( world_instance *world, 
                                                const char *name );
 VG_STATIC ent_spawn *world_find_closest_spawn( world_instance *world, 
@@ -19,11 +19,13 @@ VG_STATIC void entity_bh_expand_bound( void *user, boxf bound, u32 item_index );
 VG_STATIC float entity_bh_centroid( void *user, u32 item_index, int axis );
 VG_STATIC void entity_bh_swap( void *user, u32 ia, u32 ib );
 VG_STATIC void entity_bh_debug( void *user, u32 item_index );
+VG_STATIC void entity_bh_closest( void *user, u32 item_index, v3f point,
+                                  v3f closest );
 
 static bh_system bh_system_entity_list = {
    .expand_bound = entity_bh_expand_bound,
    .item_centroid = entity_bh_centroid,
-   .item_closest = NULL,
+   .item_closest = entity_bh_closest,
    .item_swap = entity_bh_swap,
    .item_debug = entity_bh_debug,
    .cast_ray = NULL