-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear monitoring in Area*
when its space changes to invalid
#81809
Conversation
Yes, that is another issue. I don't have an idea yet, and I have no plans to solve it here. |
body_map
/area_map
in Area2D
during NOTIFICATION_DISABLED
body_map
/area_map
in Area2D
/Area3D
during NOTIFICATION_DISABLED
c2f65fb
to
f455cd9
Compare
body_map
/area_map
in Area2D
/Area3D
during NOTIFICATION_DISABLED
Area*
during NOTIFICATION_DISABLED
f455cd9
to
5824864
Compare
Um, thanks I think it’s ready for review. |
Tried this PR under Godot 4.1.2 and it fixed #76219. |
CC @mihe to review implications on godot-jolt (and maybe whether the change makes sense upstream ;)). |
With this PR I'm seeing some strange behavior when using any Seeing as how
It wouldn't do anything to address the question of what |
Um, Providing a callback function will make it easier. Thanks for the suggestion. |
0e499a4
to
b5eedd8
Compare
Area*
during NOTIFICATION_DISABLED
Area*
when its space changes to invalid
There isn't enough time to test this for Godot 4.2, so I'm bumping it. We should try to get this tested and validated early in the 4.3 dev cycle. Testing by everyone who is currently affected by the bug in their project would be highly apprecaited! |
Tested and it works. |
So that it can work properly when the space changes to valid again. Change `space` in advance to prevent disabled areas from being queried again.
b5eedd8
to
ea30aab
Compare
I pushed a small addition that fixes the error spam from #70848 and the second case of #61420. I believe we were simply missing a check before adding to the self list. This code was added like that over 10 years ago by reduz, so it's likely to just be a silly mistake. There don't seem to be any issues caused by that and everything works as expected. And I validated that this PR fixes both cases from #61420 and now also fixes #70848. I trust testing above that it fixes #76219. The changes seem sensible to me and follow what @mihe suggested closely. @markdibarry Is there anything else left that this PR doesn't fix? Something mentioned in comments, but not in the OP perhaps? |
@YuriSizov Great job! I'll make a build and test this out today. The only thing nagging at me is that pausing/unpausing a scene causes enter/exit signals to retrigger in Area*D's. I could go 50/50 to guess whether or not that's intentional. It sounds like one of those things where both behaviors would be inherently problematic, and the onus is just unfortunately on the user to guard against. Either way, that's certainly outside the scope of this ticket, but if you have any insight on it, I'd appreciate it. |
@YuriSizov Tested and can no longer reproduce either issue mentioned in #61420 |
Thanks! Someone's daily counter will stop now 😛 |
Got this annoying error on godot 4.2.1 ""p_elem->_root" is true" had to set process disabled to the other area aswell to solve it, and also
|
Clear monitoring in
area*
so thatthey can work properly in the followingit can work properly when the space changes to valid again.NOTIFICATION_ENABLED
.Change
space
in advance to prevent disabled areas from being queried again.That is, if the area as a monitor is disabled, it will no longer be added to the query list. Cached maps information will be cleared later in
NOTIFICATION_DISABLED
. Behavior is similar to exiting an area, as opposed toNOTIFICATION_ENABLED
(which is similar to entering an area).Fixes #61420 (Wrong behaviors caused by pause).
Fixes #76219.
Fixes #70848.