if obj_data.target:#{
volume.target = sr_entity_id( obj_data.target )
volume._anon.trigger.event = obj_data.target_event
- volume._anon.trigger.event_leave = obj_data.target_event_leave
+
+ ev = 0xffffffff if obj_data.target_event_leave < 0 else \
+ obj_data.target_event_leave
+ volume._anon.trigger.event_leave = ev
#}
sr_ent_push(volume)
type=bpy.types.Object, name="Target", \
poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE))
target_event: bpy.props.IntProperty( name="Enter Ev" )
- target_event_leave: bpy.props.IntProperty( name="Leave Ev" )
+ target_event_leave: bpy.props.IntProperty( name="Leave Ev", default=-1 )
@staticmethod
def inspect_target( layout, data, propname, evs = ['_event'] ):#{
" if( uIsoAmt > 0.0 ){\n"
" float height = fract( aCo.y * 0.1 );\n"
" float lg = 2.0*length(vec2(dFdx(height), dFdy(height)));\n"
-" vfrag *= 1.0f+(lg*0.4*uIsoAmt);\n"
+" vfrag *= 1.0f+(lg*0.2*uIsoAmt);\n"
" }\n"
"\n"
-"\n"
" oColour = vec4( vfrag, 1.0 );\n"
" //oColour = vec4( vfrag, 1.0 );\n"
"}\n"
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...... */
- ent_call basecall;
- basecall.function = k_ent_function_trigger_leave;
- basecall.id = mdl_entity_id( k_ent_volume, idx );
- basecall.data = NULL;
+ /*
+ * 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 );
+ entity_call( world, &basecall );
+ }
}
}
world_static.active_trigger_volume_count = j;