mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #1645 from ZappoMan/bugfixes
fix particle-server spinning out at 100% cpu
This commit is contained in:
commit
f177a4fe23
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