X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_volumes.c;h=ae507d0cffec927296435ae7f3bd0c25677de15e;hb=b440efbe5785d114d08bb3f5ec0e09cad943006d;hp=dac790e9baa0d99387186ab20a5b03fc2d20a218;hpb=f014a592925b224f846d8adfc6559539fae1a096;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_volumes.c b/world_volumes.c index dac790e..ae507d0 100644 --- a/world_volumes.c +++ b/world_volumes.c @@ -1,9 +1,7 @@ -#ifndef WORLD_VOLUMES_C -#define WORLD_VOLUMES_C - #include "world_volumes.h" -static void world_volumes_update( world_instance *world, v3f pos ){ +void world_volumes_update( world_instance *world, v3f pos ) +{ /* filter and check the existing ones */ u32 j=0; for( u32 i=0; ito_world, cube, 0xff00ccff ); - /* triggr on stay ..... */ } else{ - /* trigger on exit...... */ + /* + * LEGACY BEHAVIOUR: < v104 does not have leave events + */ + if( world->meta.info.version >= 104 ){ + 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; @@ -94,5 +101,3 @@ static void world_volumes_update( world_instance *world, v3f pos ){ next_volume:; } } - -#endif /* WORLD_VOLUMES_H */