Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
09442638
Unverified
Commit
09442638
authored
May 03, 2020
by
Rémi Verschelde
Committed by
GitHub
May 03, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #38420 from zzz-assault/Tilemap_update-bitmask-region
Tilemap: Fix performance issue in fallback of update_bitmask_region
parents
687f02dd
e0f084b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
tile_map.cpp
scene/2d/tile_map.cpp
+2
-5
No files found.
scene/2d/tile_map.cpp
View file @
09442638
...
...
@@ -940,13 +940,10 @@ void TileMap::update_bitmask_area(const Vector2 &p_pos) {
void
TileMap
::
update_bitmask_region
(
const
Vector2
&
p_start
,
const
Vector2
&
p_end
)
{
if
((
p_end
.
x
<
p_start
.
x
||
p_end
.
y
<
p_start
.
y
)
||
(
p_end
.
x
==
p_start
.
x
&&
p_end
.
y
==
p_start
.
y
))
{
int
i
;
Array
a
=
get_used_cells
();
for
(
i
=
0
;
i
<
a
.
size
();
i
++
)
{
// update_bitmask_area() in order to update cells adjacent to the
// current cell, since ordering in array may not be reliable
for
(
int
i
=
0
;
i
<
a
.
size
();
i
++
)
{
Vector2
vector
=
(
Vector2
)
a
[
i
];
update_
bitmask_area
(
Vector2
(
vector
.
x
,
vector
.
y
)
);
update_
cell_bitmask
(
vector
.
x
,
vector
.
y
);
}
return
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment