Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
d0be2741
Commit
d0be2741
authored
10 years ago
by
RealBadAngel
Browse files
Options
Downloads
Patches
Plain Diff
Speed up removing a node (less block mesh updates).
parent
05e7f71b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/client.cpp
+5
-6
5 additions, 6 deletions
src/client.cpp
with
5 additions
and
6 deletions
src/client.cpp
+
5
−
6
View file @
d0be2741
...
...
@@ -2300,20 +2300,19 @@ void Client::removeNode(v3s16 p)
{
}
// add urgent task to update the modified node
addUpdateMeshTaskForNode
(
p
,
false
,
true
);
for
(
std
::
map
<
v3s16
,
MapBlock
*
>::
iterator
i
=
modified_blocks
.
begin
();
i
!=
modified_blocks
.
end
();
++
i
)
{
addUpdateMeshTask
WithEdge
(
i
->
first
);
addUpdateMeshTask
(
i
->
first
,
false
,
false
);
}
// add urgent task to update the modified node
addUpdateMeshTaskForNode
(
p
,
false
,
true
);
}
void
Client
::
addNode
(
v3s16
p
,
MapNode
n
,
bool
remove_metadata
)
{
TimeTaker
timer1
(
"Client::addNode()"
);
//
TimeTaker timer1("Client::addNode()");
std
::
map
<
v3s16
,
MapBlock
*>
modified_blocks
;
...
...
@@ -2329,7 +2328,7 @@ void Client::addNode(v3s16 p, MapNode n, bool remove_metadata)
i
=
modified_blocks
.
begin
();
i
!=
modified_blocks
.
end
();
++
i
)
{
addUpdateMeshTask
WithEdge
(
i
->
first
);
addUpdateMeshTask
(
i
->
first
,
false
,
false
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment