Filter out surfaces with bad tris, use 32 bit ints for collision surfaces

This commit is contained in:
jaburns
2021-08-16 15:01:57 -06:00
parent 54f979df93
commit e108c03608
4 changed files with 45 additions and 27 deletions
+10 -2
View File
@@ -156,8 +156,14 @@ static void engine_surface_from_lib_surface( struct Surface *surface, const stru
maxY = y3;
}
if (mag < 0.0001)
DEBUG_PRINT("ERROR: normal magnitude is very close to zero");
if (mag < 0.0001) {
DEBUG_PRINT("ERROR: normal magnitude is very close to zero:");
DEBUG_PRINT("v1 %i %i %i", x1, y1, z1 );
DEBUG_PRINT("v2 %i %i %i", x2, y2, z2 );
DEBUG_PRINT("v3 %i %i %i", x3, y3, z3 );
surface->isValid = 0;
return;
}
mag = (f32)(1.0 / mag);
nx *= mag;
@@ -198,6 +204,8 @@ static void engine_surface_from_lib_surface( struct Surface *surface, const stru
} else {
surface->force = 0;
}
surface->isValid = 1;
}
uint32_t loaded_surface_iter_group_count( void )