History

some comment cleanup

ZappoMan committed 13 years ago

Commit 1587cf01 parent 2c4ab631 file · +13 −8Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+13−8
@@ -4128,7 +4128,7 @@ void Application::nodeKilled(Node* node) { · 4127 unmodified lines
41284128 VoxelPositionSize rootDetails;
41294129 voxelDetailsForCode(rootCode, rootDetails);
41304130
4131− printf(">>>>>>>>>>>>>>>> HERE>>>>>>>>> voxel server going away...... v[%f, %f, %f, %f]\n",
4131+ printf("voxel server going away...... v[%f, %f, %f, %f]\n",
41324132 rootDetails.x, rootDetails.y, rootDetails.z, rootDetails.s);
41334133
41344134 // Add the jurisditionDetails object to the list of "fade outs"
@@ -4140,10 +4140,11 @@ void Application::nodeKilled(Node* node) { · 5 unmodified lines
41404140 _voxelFades.push_back(fade);
41414141 }
41424142
4143− // we should remove it...
4143+ // If the voxel server is going away, remove it from our jurisdiction map so we don't send voxels to a dead server
41444144 _voxelServerJurisdictions.erase(nodeUUID);
41454145 }
41464146
4147+ // also clean up scene stats for that server
41474148 if (_voxelServerSceneStats.find(nodeUUID) != _voxelServerSceneStats.end()) {
41484149 _voxelServerSceneStats.erase(nodeUUID);
41494150 }
@@ -4157,8 +4158,8 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng · 7 unmodified lines
41574158 // But, also identify the sender, and keep track of the contained jurisdiction root for this server
41584159 Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress);
41594160
4160− // parse the incoming stats data, and stick it into our averaging stats object for now... even though this
4161− // means mixing in stats from potentially multiple servers.
4161+ // parse the incoming stats datas stick it in a temporary object for now, while we
4162+ // determine which server it belongs to
41624163 VoxelSceneStats temp;
41634164 int statsMessageLength = temp.unpackFromMessage(messageData, messageLength);
41644165
@@ -4169,16 +4170,20 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng · 4 unmodified lines
41694170 // now that we know the node ID, let's add these stats to the stats for that node...
41704171 if (_voxelServerSceneStats.find(nodeUUID) != _voxelServerSceneStats.end()) {
41714172 VoxelSceneStats& oldStats = _voxelServerSceneStats[nodeUUID];
4173+
4174+ // this if construct is a little strange because we aren't quite using it yet. But
4175+ // we want to keep this logic in here for now because we plan to use it soon to determine
4176+ // additional network optimization states and better rate control
41724177 if (!oldStats.isMoving() && temp.isMoving()) {
4178+ // we think we are starting to move
41734179 _voxelServerSceneStats[nodeUUID].unpackFromMessage(messageData, messageLength);
4174− //qDebug() << ">>>>>>>>>> STARTING!!! " << nodeUUID << " <<<<<<<<<<<\n";
41754180 } else if (oldStats.isMoving() && !temp.isMoving()) {
4181+ // we think we are done moving
41764182 _voxelServerSceneStats[nodeUUID].unpackFromMessage(messageData, messageLength);
4177− //qDebug() << ">>>>>>>>>> FINISHED!!! " << nodeUUID << " <<<<<<<<<<<\n";
41784183 } else if (!oldStats.isMoving() && !temp.isMoving()) {
4179− //qDebug() << ">>>>>>>>>> all still " << nodeUUID << " <<<<<<<<<<<\n";
4184+ // we think we are still not moving
41804185 } else {
4181− //qDebug() << ">>>>>>>>>> still moving... " << nodeUUID << " <<<<<<<<<<<\n";
4186+ // we think we are still moving
41824187 }
41834188
41844189 } else {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t