mirror of
https://github.com/lubosz/overte.git
synced 2025-08-14 08:55:55 +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);
|
bytesWritten = encodeTreeBitstream(subTree, &packetData, nodeBag, params);
|
||||||
unlock();
|
unlock();
|
||||||
|
|
||||||
// if bytesWritten == 0, then it means that the subTree couldn't fit, and so we should reset the packet
|
// if the subTree couldn't fit, and so we should reset the packet and reinsert the node in our bag and try again...
|
||||||
// and reinsert the node in our bag and try again...
|
if (bytesWritten == 0 && (params.stopReason == EncodeBitstreamParams::DIDNT_FIT)) {
|
||||||
if (bytesWritten == 0) {
|
|
||||||
if (packetData.hasContent()) {
|
if (packetData.hasContent()) {
|
||||||
file.write((const char*)packetData.getFinalizedData(), packetData.getFinalizedSize());
|
file.write((const char*)packetData.getFinalizedData(), packetData.getFinalizedSize());
|
||||||
lastPacketWritten = true;
|
lastPacketWritten = true;
|
||||||
|
|
Loading…
Reference in a new issue