You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fix transform notification not getting sent out for RigidBody2D
This commit is contained in:
@@ -891,22 +891,18 @@ void CanvasItem::_notify_transform(CanvasItem *p_node) {
|
|||||||
* notification anyway).
|
* notification anyway).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (/*p_node->xform_change.in_list() &&*/ p_node->_is_global_invalid()) {
|
if (p_node->block_transform_notify || p_node->_is_global_invalid()) {
|
||||||
return; //nothing to do
|
return; //nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
p_node->_set_global_invalid(true);
|
p_node->_set_global_invalid(true);
|
||||||
|
|
||||||
if (p_node->notify_transform && !p_node->xform_change.in_list()) {
|
if (p_node->notify_transform && !p_node->xform_change.in_list() && p_node->is_inside_tree()) {
|
||||||
if (!p_node->block_transform_notify) {
|
if (is_accessible_from_caller_thread()) {
|
||||||
if (p_node->is_inside_tree()) {
|
get_tree()->xform_change_list.add(&p_node->xform_change);
|
||||||
if (is_accessible_from_caller_thread()) {
|
} else {
|
||||||
get_tree()->xform_change_list.add(&p_node->xform_change);
|
// Should be rare, but still needs to be handled.
|
||||||
} else {
|
MessageQueue::get_singleton()->push_callable(callable_mp(p_node, &CanvasItem::_notify_transform_deferred));
|
||||||
// Should be rare, but still needs to be handled.
|
|
||||||
MessageQueue::get_singleton()->push_callable(callable_mp(p_node, &CanvasItem::_notify_transform_deferred));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user