mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Don't validate facet if there is an invalid border plane
The check was missing, which would cause a crash during collision test
This commit is contained in:
parent
1b8ef411ee
commit
cd06dc0535
1 changed files with 4 additions and 0 deletions
|
@ -766,6 +766,10 @@ static qboolean CM_ValidateFacet( facet_t *facet ) {
|
|||
Vector4Copy( planes[ facet->surfacePlane ].plane, plane );
|
||||
w = BaseWindingForPlane( plane, plane[3] );
|
||||
for ( j = 0 ; j < facet->numBorders && w ; j++ ) {
|
||||
if ( facet->borderPlanes[j] == -1 ) {
|
||||
FreeWinding( w );
|
||||
return qfalse;
|
||||
}
|
||||
Vector4Copy( planes[ facet->borderPlanes[j] ].plane, plane );
|
||||
if ( !facet->borderInward[j] ) {
|
||||
VectorSubtract( vec3_origin, plane, plane );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue