X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_volumes.c;h=7f2b685170e6f1ce784ef60529e4927dd32516a1;hb=74b2136d5b41b18e2eec698f1fd11b503aa1100a;hp=dac790e9baa0d99387186ab20a5b03fc2d20a218;hpb=f014a592925b224f846d8adfc6559539fae1a096;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_volumes.c b/world_volumes.c index dac790e..7f2b685 100644 --- a/world_volumes.c +++ b/world_volumes.c @@ -19,10 +19,19 @@ static void world_volumes_update( world_instance *world, v3f pos ){ world_static.active_trigger_volumes[ j ++ ] = idx; boxf cube = {{-1.0f,-1.0f,-1.0f},{1.0f,1.0f,1.0f}}; vg_line_boxf_transformed( volume->to_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;