limit size of polyvox data property to below MTU

This commit is contained in:
Seth Alves 2015-05-27 09:59:18 -07:00
parent 429cc631f3
commit 14c68519f3

View file

@ -291,11 +291,15 @@ void RenderablePolyVoxEntityItem::compressVolumeData() {
QByteArray newVoxelData = qCompress(uncompressedData, 9);
// HACK -- until we have a way to allow for properties larger than MTU, don't update.
if (newVoxelData.length() < 1300) {
if (newVoxelData.length() < 1200) {
_voxelData = newVoxelData;
qDebug() << "-------------- voxel compresss --------------";
qDebug() << "raw-size =" << rawSize << " compressed-size =" << newVoxelData.size();
} else {
qDebug() << "voxel data too large, reverting change.";
// revert
decompressVolumeData();
}
qDebug() << "-------------- voxel compresss --------------";
qDebug() << "raw-size =" << rawSize << " compressed-size =" << _voxelData.size();
}