paint: physics cleanup
This commit is contained in:
@@ -320,7 +320,7 @@ void export_arm_run_project() {
|
||||
g_project->mesh_physics_shapes = i32_array_create(g_project->_->paint_objects->length);
|
||||
g_project->mesh_physics_masses = f32_array_create(g_project->_->paint_objects->length);
|
||||
for (i32 i = 0; i < g_project->mesh_physics_shapes->length; ++i) {
|
||||
asim_body_t *pb = g_project->_->paint_objects->buffer[i]->base->_->body;
|
||||
physics_body_t *pb = g_project->_->paint_objects->buffer[i]->base->_->body;
|
||||
g_project->mesh_physics_shapes->buffer[i] = pb != NULL ? pb->shape : -1; // No physics
|
||||
g_project->mesh_physics_masses->buffer[i] = pb != NULL ? pb->mass : 0.0;
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ void import_arm_run_project(char *path) {
|
||||
continue; // No physics
|
||||
}
|
||||
f32 mass = g_project->mesh_physics_masses != NULL && i < g_project->mesh_physics_masses->length ? g_project->mesh_physics_masses->buffer[i] : 0.0;
|
||||
sim_add_body(g_project->_->paint_objects->buffer[i]->base, (asim_shape_t)shape, mass);
|
||||
sim_add_body(g_project->_->paint_objects->buffer[i]->base, (physics_shape_t)shape, mass);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user