Merge pull request #7289 from ZappoMan/bugfixes

fix a couple bugs
This commit is contained in:
Howard Stearns 2016-03-09 12:21:58 -08:00
commit 7f7ea8b672
4 changed files with 9 additions and 5 deletions

View file

@ -115,7 +115,7 @@ Item {
color: root.fontColor
font.pixelSize: root.fontSize
visible: root.expanded;
text: "Voxel max ping: " + 0
text: "Messages max ping: " + root.messagePing
}
}
}

View file

@ -136,10 +136,12 @@ void Stats::updateStats(bool force) {
SharedNodePointer audioMixerNode = nodeList->soloNodeOfType(NodeType::AudioMixer);
SharedNodePointer avatarMixerNode = nodeList->soloNodeOfType(NodeType::AvatarMixer);
SharedNodePointer assetServerNode = nodeList->soloNodeOfType(NodeType::AssetServer);
SharedNodePointer messageMixerNode = nodeList->soloNodeOfType(NodeType::MessagesMixer);
STAT_UPDATE(audioPing, audioMixerNode ? audioMixerNode->getPingMs() : -1);
STAT_UPDATE(avatarPing, avatarMixerNode ? avatarMixerNode->getPingMs() : -1);
STAT_UPDATE(assetPing, assetServerNode ? assetServerNode->getPingMs() : -1);
STAT_UPDATE(messagePing, messageMixerNode ? messageMixerNode->getPingMs() : -1);
//// Now handle entity servers, since there could be more than one, we average their ping times
int totalPingOctree = 0;
int octreeServerCount = 0;

View file

@ -45,7 +45,8 @@ class Stats : public QQuickItem {
STATS_PROPERTY(int, avatarPing, 0)
STATS_PROPERTY(int, entitiesPing, 0)
STATS_PROPERTY(int, assetPing, 0)
STATS_PROPERTY(QVector3D, position, QVector3D(0, 0, 0) )
STATS_PROPERTY(int, messagePing, 0)
STATS_PROPERTY(QVector3D, position, QVector3D(0, 0, 0))
STATS_PROPERTY(float, speed, 0)
STATS_PROPERTY(float, yaw, 0)
STATS_PROPERTY(int, avatarMixerInKbps, 0)
@ -123,6 +124,7 @@ signals:
void avatarPingChanged();
void entitiesPingChanged();
void assetPingChanged();
void messagePingChanged();
void positionChanged();
void speedChanged();
void yawChanged();

View file

@ -114,8 +114,8 @@ public:
// use this method if you have a pointer to the entity (avoid an extra entity lookup)
bool updateEntity(EntityItemPointer entity, const EntityItemProperties& properties, const SharedNodePointer& senderNode = SharedNodePointer(nullptr));
void deleteEntity(const EntityItemID& entityID, bool force = false, bool ignoreWarnings = false);
void deleteEntities(QSet<EntityItemID> entityIDs, bool force = false, bool ignoreWarnings = false);
void deleteEntity(const EntityItemID& entityID, bool force = false, bool ignoreWarnings = true);
void deleteEntities(QSet<EntityItemID> entityIDs, bool force = false, bool ignoreWarnings = true);
/// \param position point of query in world-frame (meters)
/// \param targetRadius radius of query (meters)