mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-21 12:11:07 +00:00
Fix miscompilation with gcc 4.5
idAnimator::GetJointLocalTransform() miscompiles with gcc 4.5 and -ftree-vrp (implied by -O2). Reorder code to avoid the compiler bug, no functional change.
This commit is contained in:
parent
d2b2285345
commit
a8b4f9e5f6
1 changed files with 8 additions and 6 deletions
|
@ -4472,16 +4472,18 @@ bool idAnimator::GetJointLocalTransform( jointHandle_t jointHandle, int currentT
|
|||
// FIXME: overkill
|
||||
CreateFrame( currentTime, false );
|
||||
|
||||
if ( jointHandle > 0 ) {
|
||||
idJointMat m = joints[ jointHandle ];
|
||||
m /= joints[ modelJoints[ jointHandle ].parentNum ];
|
||||
offset = m.ToVec3();
|
||||
axis = m.ToMat3();
|
||||
} else {
|
||||
if ( jointHandle == 0 ) {
|
||||
offset = joints[ jointHandle ].ToVec3();
|
||||
axis = joints[ jointHandle ].ToMat3();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
idJointMat m = joints[ jointHandle ];
|
||||
m /= joints[ modelJoints[ jointHandle ].parentNum ];
|
||||
offset = m.ToVec3();
|
||||
axis = m.ToMat3();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue