Fixed bug whereby byte buffer that held scene data was still big enough to

accomodate the fringe layer and the way the ByteBuffer stuff works, it
writes out the whole enchilada even if there are a bunch of zeros at the
end.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1367 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-05-16 03:54:18 +00:00
parent 95daba5bee
commit 7ba2173174
@@ -1,5 +1,5 @@
//
// $Id: MisoSceneModel.java,v 1.6 2002/05/16 02:25:19 ray Exp $
// $Id: MisoSceneModel.java,v 1.7 2002/05/16 03:54:18 mdb Exp $
package com.threerings.miso.scene;
@@ -54,7 +54,7 @@ public class MisoSceneModel
// write everything into a ByteBuffer, viewed as an IntBuffer and
// then write the bytes from those operations out to the output
// stream
ByteBuffer bbuf = ByteBuffer.allocate(8*tcount + 4*otc + 4*3);
ByteBuffer bbuf = ByteBuffer.allocate(4*tcount + 4*otc + 4*3);
IntBuffer ibuf = bbuf.asIntBuffer();
// insert the dimensions
@@ -72,8 +72,7 @@ public class MisoSceneModel
// next write out the object action strings
int acount = otc/3;
for (int i = 0; i < acount; i++) {
String action = objectActions[i];
out.writeUTF((action == null) ? "" : action);
out.writeUTF((objectActions[i] == null) ? "" : objectActions[i]);
}
}