Index: trunk/src/gfx/skeletal_mesh.cc
===================================================================
--- trunk/src/gfx/skeletal_mesh.cc	(revision 289)
+++ trunk/src/gfx/skeletal_mesh.cc	(revision 290)
@@ -122,6 +122,7 @@
 void nv::skeletal_animation_entry_gpu::update_skeleton( mat4* data, uint32 time ) const
 {
-	float tick_time = ( time * 0.001f ) * m_node_data->get_frame_rate();
-	float anim_time = fmodf( tick_time, m_node_data->get_duration() );
+	float tick_time = ( time * 0.001f ) * m_frame_rate;
+	float anim_time = m_start;
+	if ( m_duration > 0.0f ) anim_time += fmodf( tick_time, m_duration );
 
 	if ( !m_node_data->is_flat() )
@@ -224,5 +225,5 @@
 		skeletal_animation_entry_gpu * anim = (skeletal_animation_entry_gpu*)(a_anim);
 		anim->prepare( m_bone_data );
-		update_animation( a_anim, 0 );
+		update_animation( a_anim, uint32( anim->get_start() * 1000.f * anim->get_frame_rate() * 1000 ) );
 	}
 }
@@ -240,9 +241,10 @@
 {
 	if ( m_bone_data )
-		a_program->set_uniform_array( "nv_m_bones", m_transform, m_bone_data->get_count() );
+		a_program->set_opt_uniform_array( "nv_m_bones", m_transform, m_bone_data->get_count() );
 }
 
 nv::transform nv::skeletal_mesh_gpu::get_node_transform( uint32 node_id ) const
 {
+	if ( node_id == 0 ) return transform();
 	return transform( m_transform[ node_id ] );
 }
