mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 12:30:40 +02:00
cleanups
This commit is contained in:
parent
d2cd4fc405
commit
e7d8bccd5d
8 changed files with 2 additions and 84 deletions
|
@ -110,15 +110,6 @@ private:
|
||||||
MovingMinMaxAvg<quint64> _timeSpentPerHashMatchCallStats; // update with usecs spent inside each packetVersionAndHashMatch call
|
MovingMinMaxAvg<quint64> _timeSpentPerHashMatchCallStats; // update with usecs spent inside each packetVersionAndHashMatch call
|
||||||
|
|
||||||
MovingMinMaxAvg<int> _readPendingCallsPerSecondStats; // update with # of readPendingDatagrams calls in the last second
|
MovingMinMaxAvg<int> _readPendingCallsPerSecondStats; // update with # of readPendingDatagrams calls in the last second
|
||||||
|
|
||||||
/* // loop variables */
|
|
||||||
/* // QTimer* _idleTimer = nullptr; */
|
|
||||||
/* int _nextFrame = 0; */
|
|
||||||
/* QElapsedTimer _timer; */
|
|
||||||
/* char _clientMixBuffer[MAX_PACKET_SIZE]; */
|
|
||||||
/* int _usecToSleep = AudioConstants::NETWORK_FRAME_USECS; */
|
|
||||||
/* const int TRAILING_AVERAGE_FRAMES = 100; */
|
|
||||||
/* int _framesSinceCutoffEvent = TRAILING_AVERAGE_FRAMES; */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AudioMixer_h
|
#endif // hifi_AudioMixer_h
|
||||||
|
|
|
@ -65,7 +65,9 @@ const float BILLBOARD_AND_IDENTITY_SEND_PROBABILITY = 1.0f / 300.0f;
|
||||||
// 1) use the view frustum to cull those avatars that are out of view. Since avatar data doesn't need to be present
|
// 1) use the view frustum to cull those avatars that are out of view. Since avatar data doesn't need to be present
|
||||||
// if the avatar is not in view or in the keyhole.
|
// if the avatar is not in view or in the keyhole.
|
||||||
void AvatarMixer::broadcastAvatarData() {
|
void AvatarMixer::broadcastAvatarData() {
|
||||||
|
|
||||||
int idleTime = QDateTime::currentMSecsSinceEpoch() - _lastFrameTimestamp;
|
int idleTime = QDateTime::currentMSecsSinceEpoch() - _lastFrameTimestamp;
|
||||||
|
|
||||||
++_numStatFrames;
|
++_numStatFrames;
|
||||||
|
|
||||||
const float STRUGGLE_TRIGGER_SLEEP_PERCENTAGE_THRESHOLD = 0.10f;
|
const float STRUGGLE_TRIGGER_SLEEP_PERCENTAGE_THRESHOLD = 0.10f;
|
||||||
|
@ -336,22 +338,6 @@ void AvatarMixer::sendStatsPacket() {
|
||||||
_numStatFrames = 0;
|
_numStatFrames = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// void AvatarMixer::stop() {
|
|
||||||
// qDebug() << "AvatarMixer::stop";
|
|
||||||
// if (_broadcastTimer) {
|
|
||||||
// // _broadcastTimer->stop();
|
|
||||||
// // delete _broadcastTimer;
|
|
||||||
// _broadcastTimer->deleteLater();
|
|
||||||
// // _broadcastTimer = nullptr;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// _broadcastThread.quit();
|
|
||||||
// _broadcastThread.wait();
|
|
||||||
|
|
||||||
// ThreadedAssignment::stop();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
void AvatarMixer::run() {
|
void AvatarMixer::run() {
|
||||||
ThreadedAssignment::commonInit(AVATAR_MIXER_LOGGING_NAME, NodeType::AvatarMixer);
|
ThreadedAssignment::commonInit(AVATAR_MIXER_LOGGING_NAME, NodeType::AvatarMixer);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
/// runs the avatar mixer
|
/// runs the avatar mixer
|
||||||
void run();
|
void run();
|
||||||
// Q_INVOKABLE virtual void stop();
|
|
||||||
|
|
||||||
void nodeAdded(SharedNodePointer nodeAdded);
|
void nodeAdded(SharedNodePointer nodeAdded);
|
||||||
void nodeKilled(SharedNodePointer killedNode);
|
void nodeKilled(SharedNodePointer killedNode);
|
||||||
|
@ -33,8 +32,6 @@ public slots:
|
||||||
void readPendingDatagrams();
|
void readPendingDatagrams();
|
||||||
|
|
||||||
void sendStatsPacket();
|
void sendStatsPacket();
|
||||||
|
|
||||||
void finished();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void broadcastAvatarData();
|
void broadcastAvatarData();
|
||||||
|
|
|
@ -163,14 +163,3 @@ void EntityServer::readAdditionalConfiguration(const QJsonObject& settingsSectio
|
||||||
EntityTree* tree = static_cast<EntityTree*>(_tree);
|
EntityTree* tree = static_cast<EntityTree*>(_tree);
|
||||||
tree->setWantEditLogging(wantEditLogging);
|
tree->setWantEditLogging(wantEditLogging);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// void EntityServer::stop() {
|
|
||||||
// qDebug() << "EntityServer::stop";
|
|
||||||
// if (_pruneDeletedEntitiesTimer) {
|
|
||||||
// _pruneDeletedEntitiesTimer->stop();
|
|
||||||
// delete _pruneDeletedEntitiesTimer;
|
|
||||||
// _pruneDeletedEntitiesTimer = nullptr;
|
|
||||||
// }
|
|
||||||
// OctreeServer::stop();
|
|
||||||
// }
|
|
||||||
|
|
|
@ -44,7 +44,6 @@ public:
|
||||||
virtual void readAdditionalConfiguration(const QJsonObject& settingsSectionObject);
|
virtual void readAdditionalConfiguration(const QJsonObject& settingsSectionObject);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// Q_INVOKABLE virtual void stop();
|
|
||||||
void pruneDeletedEntities();
|
void pruneDeletedEntities();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -1236,40 +1236,6 @@ void OctreeServer::aboutToFinish() {
|
||||||
qDebug() << qPrintable(_safeServerName) << "server ENDING about to finish...";
|
qDebug() << qPrintable(_safeServerName) << "server ENDING about to finish...";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// void OctreeServer::stop() {
|
|
||||||
// qDebug() << "OctreeServer::stop";
|
|
||||||
// // setFinished(true);
|
|
||||||
// // QThread *thisThread = QThread::currentThread();
|
|
||||||
// // thisThread->quit();
|
|
||||||
|
|
||||||
// if (_jurisdictionSender) {
|
|
||||||
// _jurisdictionSender->terminating();
|
|
||||||
// _jurisdictionSender->terminate();
|
|
||||||
// // delete _jurisdictionSender;
|
|
||||||
// // _jurisdictionSender = nullptr;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// _datagramProcessingThread->quit();
|
|
||||||
// if (_octreeInboundPacketProcessor) {
|
|
||||||
// _octreeInboundPacketProcessor->terminating();
|
|
||||||
// _octreeInboundPacketProcessor->terminate();
|
|
||||||
// // delete _octreeInboundPacketProcessor;
|
|
||||||
// // _octreeInboundPacketProcessor = nullptr;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // _persistThread
|
|
||||||
// if (_persistThread) {
|
|
||||||
// _persistThread->terminating();
|
|
||||||
// _persistThread->terminate();
|
|
||||||
// // delete _persistThread;
|
|
||||||
// // _persistThread = nullptr;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// ThreadedAssignment::stop();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
QString OctreeServer::getUptime() {
|
QString OctreeServer::getUptime() {
|
||||||
QString formattedUptime;
|
QString formattedUptime;
|
||||||
quint64 now = usecTimestampNow();
|
quint64 now = usecTimestampNow();
|
||||||
|
|
|
@ -123,7 +123,6 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
/// runs the octree server assignment
|
/// runs the octree server assignment
|
||||||
void run();
|
void run();
|
||||||
// Q_INVOKABLE virtual void stop();
|
|
||||||
void nodeAdded(SharedNodePointer node);
|
void nodeAdded(SharedNodePointer node);
|
||||||
void nodeKilled(SharedNodePointer node);
|
void nodeKilled(SharedNodePointer node);
|
||||||
void sendStatsPacket();
|
void sendStatsPacket();
|
||||||
|
|
|
@ -73,15 +73,6 @@ void ThreadedAssignment::setFinished(bool isFinished) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// void ThreadedAssignment::stop() {
|
|
||||||
// setFinished(true);
|
|
||||||
// qDebug() << "ThreadedAssignment::stop";
|
|
||||||
// QThread *thisThread = QThread::currentThread();
|
|
||||||
// thisThread->quit();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
void ThreadedAssignment::commonInit(const QString& targetName, NodeType_t nodeType, bool shouldSendStats) {
|
void ThreadedAssignment::commonInit(const QString& targetName, NodeType_t nodeType, bool shouldSendStats) {
|
||||||
// change the logging target name while the assignment is running
|
// change the logging target name while the assignment is running
|
||||||
LogHandler::getInstance().setTargetName(targetName);
|
LogHandler::getInstance().setTargetName(targetName);
|
||||||
|
|
Loading…
Reference in a new issue