mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-05-31 00:41:38 +00:00
Small corrections to dmap
This commit is contained in:
parent
352df659a8
commit
e03ed8769d
10 changed files with 70 additions and 35 deletions
|
@ -189,17 +189,19 @@ static bool MatchVert( const idDrawVert* a, const idDrawVert* b )
|
|||
return false;
|
||||
}
|
||||
|
||||
// RB begin
|
||||
// if the normal is 0 (smoothed normals), consider it a match
|
||||
if( a->GetNormal() == idVec3( 0, 0, 0 ) || b->GetNormal() == idVec3( 0, 0, 0 ) )
|
||||
if( a->GetNormal().Length() == 0 && b->GetNormal().Length() == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// otherwise do a dot-product cosine check
|
||||
if( a->GetNormal() * b->GetNormal() < COSINE_EPSILON )
|
||||
if( ( a->GetNormal() * b->GetNormal() ) < COSINE_EPSILON )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// RB end
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue