Skip to content

Commit d0be274

Browse files
committedNov 8, 2014
Speed up removing a node (less block mesh updates).
1 parent 05e7f71 commit d0be274

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
 

‎src/client.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -2300,20 +2300,19 @@ void Client::removeNode(v3s16 p)
23002300
{
23012301
}
23022302

2303-
// add urgent task to update the modified node
2304-
addUpdateMeshTaskForNode(p, false, true);
2305-
23062303
for(std::map<v3s16, MapBlock * >::iterator
23072304
i = modified_blocks.begin();
23082305
i != modified_blocks.end(); ++i)
23092306
{
2310-
addUpdateMeshTaskWithEdge(i->first);
2307+
addUpdateMeshTask(i->first, false, false);
23112308
}
2309+
// add urgent task to update the modified node
2310+
addUpdateMeshTaskForNode(p, false, true);
23122311
}
23132312

23142313
void Client::addNode(v3s16 p, MapNode n, bool remove_metadata)
23152314
{
2316-
TimeTaker timer1("Client::addNode()");
2315+
//TimeTaker timer1("Client::addNode()");
23172316

23182317
std::map<v3s16, MapBlock*> modified_blocks;
23192318

@@ -2329,7 +2328,7 @@ void Client::addNode(v3s16 p, MapNode n, bool remove_metadata)
23292328
i = modified_blocks.begin();
23302329
i != modified_blocks.end(); ++i)
23312330
{
2332-
addUpdateMeshTaskWithEdge(i->first);
2331+
addUpdateMeshTask(i->first, false, false);
23332332
}
23342333
}
23352334

0 commit comments

Comments
 (0)
Please sign in to comment.