Skip to content
Snippets Groups Projects
Commit 7a0c3cd4 authored by Tazpn's avatar Tazpn
Browse files

niflib: More changes for mass properties

parent a846bdcb
No related branches found
No related tags found
No related merge requests found
......@@ -839,16 +839,16 @@ ostream & operator<<( ostream & out, Char8String const & val ) {
//InertiaMatrix
void NifStream( InertiaMatrix & val, istream& in, const NifInfo & info ) {
for (int c = 0; c < 3; ++c) {
for (int r = 0; r < 4; ++r) {
for (int r = 0; r < 3; ++r) {
for (int c = 0; c < 4; ++c) {
val[r][c] = ReadFloat( in );
}
}
}
void NifStream( InertiaMatrix const & val, ostream& out, const NifInfo & info ) {
for (int c = 0; c < 3; ++c) {
for (int r = 0; r < 4; ++r) {
for (int r = 0; r < 3; ++r) {
for (int c = 0; c < 4; ++c) {
WriteFloat( val[r][c], out );
}
}
......
......@@ -687,7 +687,7 @@ InertiaMatrix & InertiaMatrix::operator*=( const InertiaMatrix & rh ) {
for (int i = 0; i < _countof(rows); i++) {
for (int j = 0; j < 4; j++) {
t = 0.0f;
for (int k = 0; k < 4; k++) {
for (int k = 0; k < _countof(rows); k++) {
t += lh[i][k] * rh[k][j];
}
r[i][j] = t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment