From 6fe61ef5c16c35ff647036a2a8f3333321337f6f Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 12 Sep 2008 00:49:52 +0000 Subject: [PATCH] whoops, we still need to write out an empty table --- panda/src/chan/animChannelMatrixXfmTable.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/panda/src/chan/animChannelMatrixXfmTable.cxx b/panda/src/chan/animChannelMatrixXfmTable.cxx index bfc1c71908..ba698a3608 100644 --- a/panda/src/chan/animChannelMatrixXfmTable.cxx +++ b/panda/src/chan/animChannelMatrixXfmTable.cxx @@ -415,9 +415,11 @@ write_datagram(BamWriter *manager, Datagram &me) { float r = _tables[8].empty() ? 0.0f : _tables[8][i % _tables[8].size()]; hprs.push_back(LVecBase3f(h, p, r)); } + const LVecBase3f *hprs_array = NULL; if (hprs_length != 0) { - compressor.write_hprs(me, &hprs[0], hprs_length); + hprs_array = &hprs[0]; } + compressor.write_hprs(me, hprs_array, hprs_length); // And now the translations. for(i = 9; i < num_matrix_components; i++) { @@ -508,12 +510,7 @@ fillin(DatagramIterator &scan, BamReader *manager) { int i; // First, read in the scales and shears. - for (i = 0; i < 3; i++) { - PTA_float ind_table = PTA_float::empty_array(0, get_class_type()); - compressor.read_reals(scan, ind_table.v()); - _tables[i] = ind_table; - } - for (i = 3; i < 6; i++) { + for (i = 0; i < 6; i++) { PTA_float ind_table = PTA_float::empty_array(0, get_class_type()); compressor.read_reals(scan, ind_table.v()); _tables[i] = ind_table;