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
22db3010
Unverified
Commit
22db3010
authored
May 11, 2020
by
Rémi Verschelde
Committed by
GitHub
May 11, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #31938 from KoBeWi/a_welcome_lag
Fix VisibilityEnabler2D behavior on start
parents
dbd90b94
d0c5d910
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
visibility_notifier_2d.cpp
scene/2d/visibility_notifier_2d.cpp
+13
-4
No files found.
scene/2d/visibility_notifier_2d.cpp
View file @
22db3010
...
...
@@ -248,10 +248,19 @@ void VisibilityEnabler2D::_notification(int p_what) {
_find_nodes
(
from
);
if
(
enabler
[
ENABLER_PARENT_PHYSICS_PROCESS
]
&&
get_parent
())
get_parent
()
->
set_physics_process
(
false
);
if
(
enabler
[
ENABLER_PARENT_PROCESS
]
&&
get_parent
())
get_parent
()
->
set_process
(
false
);
// We need to defer the call of set_process and set_physics_process,
// otherwise they are overwritten inside NOTIFICATION_READY.
// We can't use call_deferred, because it happens after a physics frame.
// The ready signal works as it's emitted immediately after NOTIFICATION_READY.
if
(
enabler
[
ENABLER_PARENT_PHYSICS_PROCESS
]
&&
get_parent
())
{
get_parent
()
->
connect
(
SceneStringNames
::
get_singleton
()
->
ready
,
callable_mp
(
get_parent
(),
&
Node
::
set_physics_process
),
varray
(
false
),
CONNECT_ONESHOT
);
}
if
(
enabler
[
ENABLER_PARENT_PROCESS
]
&&
get_parent
())
{
get_parent
()
->
connect
(
SceneStringNames
::
get_singleton
()
->
ready
,
callable_mp
(
get_parent
(),
&
Node
::
set_process
),
varray
(
false
),
CONNECT_ONESHOT
);
}
}
if
(
p_what
==
NOTIFICATION_EXIT_TREE
)
{
...
...
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