1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-21 12:17:45 +00:00

Fix the shapes crashing on certain models

This is a hack to get things working for now
This commit is contained in:
Joshua Goins 2024-04-27 18:43:32 -04:00
parent 808b383949
commit 1823b1f084

View file

@ -752,8 +752,7 @@ impl MDL {
for shape_value in shape_values { for shape_value in shape_values {
let old_vertex = let old_vertex =
vertices[indices[shape_value.base_indices_index as usize] as usize]; vertices[indices[shape_value.base_indices_index as usize] as usize];
let new_vertex = vertices[shape_value.replacing_vertex_index as usize let new_vertex = vertices[(shape_value.replacing_vertex_index as usize).saturating_sub(model.meshes[j as usize].start_index as usize)];
- model.meshes[j as usize].start_index as usize];
let vertex = &mut morphed_vertices let vertex = &mut morphed_vertices
[indices[shape_value.base_indices_index as usize] as usize]; [indices[shape_value.base_indices_index as usize] as usize];