mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 09:43:25 +02:00
fix particle-server spinning out at 100% cpu%
This commit is contained in:
parent
0e6faec5bb
commit
3d0d5f130a
1 changed files with 2 additions and 3 deletions
|
@ -1390,9 +1390,8 @@ void Octree::writeToSVOFile(const char* fileName, OctreeElement* node) {
|
|||
bytesWritten = encodeTreeBitstream(subTree, &packetData, nodeBag, params);
|
||||
unlock();
|
||||
|
||||
// if bytesWritten == 0, then it means that the subTree couldn't fit, and so we should reset the packet
|
||||
// and reinsert the node in our bag and try again...
|
||||
if (bytesWritten == 0) {
|
||||
// if the subTree couldn't fit, and so we should reset the packet and reinsert the node in our bag and try again...
|
||||
if (bytesWritten == 0 && (params.stopReason == EncodeBitstreamParams::DIDNT_FIT)) {
|
||||
if (packetData.hasContent()) {
|
||||
file.write((const char*)packetData.getFinalizedData(), packetData.getFinalizedSize());
|
||||
lastPacketWritten = true;
|
||||
|
|
Loading…
Reference in a new issue