}
else{
vg_warn( "type: %u\n", bone->collider );
- vg_fatal_exit_loop( "Invalid bone collider type" );
+ vg_fatal_error( "Invalid bone collider type" );
}
m4x3_invert_affine( rp->collider_mtx, rp->inv_collider_mtx );
if( rd->parts[ j ].bone_id == bone_id )
return j;
- vg_fatal_exit_loop( "Referenced parent bone does not have a rigidbody" );
+ vg_fatal_error( "Referenced parent bone does not have a rigidbody" );
return 0;
}
continue;
if( rd->part_count > vg_list_size(rd->parts) )
- vg_fatal_exit_loop( "Playermodel has too many colliders" );
+ vg_fatal_error( "Playermodel has too many colliders" );
struct ragdoll_part *rp = &rd->parts[ rd->part_count ++ ];
rp->bone_id = i;
*/
VG_STATIC void player_ragdoll_iter( struct player_ragdoll *rd )
{
- world_instance *world = get_active_world();
+ world_instance *world = world_current_instance();
int run_sim = 0;
ragdoll_frame ++;
if( stress ){
temp_filter = 20;
audio_lock();
- audio_oneshot_3d( &audio_hits[rand()%5], stress->co, 20.0f, 1.0f );
+ audio_oneshot_3d( &audio_hits[vg_randu32()%5], stress->co, 20.0f, 1.0f );
audio_unlock();
}
}