Object::notification()
doesn't fully respect its p_reversed
parameter
#52325
Labels
Milestone
Object::notification()
doesn't fully respect its p_reversed
parameter
#52325
Godot version
3.3.3.stable, 4.0.dev (c97afc0)
System information
N/A
Issue description
Object::notification()
always calls_notification()
in order:p_reversed
parameter.Relevant source code:
godot/core/object/object.cpp
Lines 840 to 850 in c97afc0
So for example for an object
b
of typeB
with inheritance:Object
<Node
<A
(gdscript) <B
(gdscript)here's a comparison of the current behavior and what I'd say is expected behavior:
b.notification(12345, false)
Object::_notification
2.
Node::_notification
3.
B::_notification
4.
A::_notification
Object::_notification
2.
Node::_notification
3.
A::_notification
4.
B::_notification
b.notification(12345, true)
Node::_notification
2.
Object::_notification
3.
B::_notification
4.
A::_notification
B::_notification
2.
A::_notification
3.
Node::_notification
4.
Object::_notification
Also current
notification()
's description in the docs is misleading becausereversed
parameter currently doesn't affect the order of execution of in-script_notification()
overrides.Steps to reproduce
Run such script:
Output:
Minimal reproduction project
Just run script above.
The text was updated successfully, but these errors were encountered: