def get_targeted_methods( scene, context ):
#{
obj = context.object
- invalid = [('0',"","")]
+ invalid = [('0',"",""),
+ ('1',"",""),
+ ('2',"",""),
+ ('3',"","")]
if obj.cv_data.target:
#{
flags |= 0x200
if obj.cv_data.audio_format == 'remain compressed':
flags |= 0x400
+ if obj.cv_data.audio_format == 'synthetic bird':
+ flags |= 0x1000
_.flags = flags
_.volume = obj.cv_data.fltp
#}
#}
-# Classtype 14
-#
-# Purpose: Plays some audio (44100hz .ogg vorbis only)
-# NOTE: There is a 32mb limit on the audio buffer, world audio is
-# decompressed and stored in signed 16 bit integers (2 bytes)
-# per sample.
-#
-# volume: not used if has 3D flag
-# flags:
-# AUDIO_FLAG_LOOP 0x1
-# AUDIO_FLAG_SPACIAL_3D 0x4 (Probably what you want)
-# AUDIO_FLAG_AUTO_START 0x8 (Play when the world starts)
-# ......
-# the rest are just internal flags, only use the above 3.
-#
-class classtype_audio(Structure):
-#{
- _pack_ = 1
- _fields_ = [("pstr_file",c_uint32),
- ("flags",c_uint32),
- ("volume",c_float)]
-
- def encode_obj(_, node,node_def ):
- #{
- node.classtype = 14
-
- obj = node_def['obj']
-
- _.pstr_file = encoder_process_pstr( obj.cv_data.strp )
-
- flags = 0x00
- if obj.cv_data.bp0: flags |= 0x1
- if obj.cv_data.bp1: flags |= 0x4
- if obj.cv_data.bp2: flags |= 0x8
-
- if obj.cv_data.audio_format == 'stereo':
- flags |= 0x200
- if obj.cv_data.audio_format == 'remain compressed':
- flags |= 0x400
-
- _.flags = flags
- _.volume = obj.cv_data.fltp
- #}
-
- @staticmethod
- def editor_interface( layout, obj ):
- #{
- layout.prop( obj.cv_data, "strp", text = "File (.ogg)" )
-
- layout.prop( obj.cv_data, "bp0", text = "Looping" )
- layout.prop( obj.cv_data, "bp1", text = "3D Audio" )
- layout.prop( obj.cv_data, "bp2", text = "Auto Start" )
- layout.prop( obj.cv_data, "audio_format" )
-
- layout.prop( obj.cv_data, "fltp", text = "Volume (0-1)" )
- #}
-
- @staticmethod
- def draw_scene_helpers( obj ):
- #{
- global cv_view_verts, cv_view_colours
-
- cv_draw_sphere( obj.location, obj.scale[0], [1,1,0,1] )
- #}
-#}
# Classtype 200
#
items = [
('mono', "mono", "", 0),
('stereo', "stereo", "", 1),
- ('remain compressed', "remain compressed", "", 2)
+ ('remain compressed', "remain compressed", "", 2),
+ ('synthetic bird',"synthetic bird","",3)
])
#}
vg_line( from->co, to->co, clamped );
}
-VG_STATIC void logic_bricks_debug( world_instance *world )
+VG_STATIC void logic_bricks_debug( world_instance *world, v3f pos )
{
v3f white = {1.0f,1.0f,1.0f},
red = {1.0f,0.2f,0.1f},
struct logic_brick_ref *ref = &world->logic_bricks[i];
mdl_node *node = ref->node;
+ if( v3_dist2( node->co, pos ) > 50.0f*50.0f )
+ continue;
+
void *entdata = mdl_get_entdata( world->meta, node );
if( ref->node->classtype == k_classtype_logic_wire )
{
mdl_node *pnext = mdl_node_from_id( world->meta, inf->targets[red] );
- if( pnext->classtype == k_classtype_logic_wire )
+ if( (pnext->classtype == k_classtype_logic_wire) ||
+ (pnext->classtype == k_classtype_logic_chances) ||
+ (pnext->classtype == k_classtype_signal_splitter) )
{
packet->location = pnext->sub_uid;
}