Merge pull request #60918 from lawnjelly/fti_reset_warnings

This commit is contained in:
Rémi Verschelde 2022-05-10 12:39:37 +02:00 committed by GitHub
commit e609a56803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,6 +108,17 @@ void VisualInstance::_notification(int p_what) {
if (_is_vi_visible() && is_physics_interpolated()) {
VisualServer::get_singleton()->instance_reset_physics_interpolation(instance);
}
#if defined(DEBUG_ENABLED) && defined(TOOLS_ENABLED)
else if (GLOBAL_GET("debug/settings/physics_interpolation/enable_warnings")) {
String node_name = is_inside_tree() ? String(get_path()) : String(get_name());
if (!_is_vi_visible()) {
WARN_PRINT("[Physics interpolation] NOTIFICATION_RESET_PHYSICS_INTERPOLATION only works with unhidden nodes: \"" + node_name + "\".");
}
if (!is_physics_interpolated()) {
WARN_PRINT("[Physics interpolation] NOTIFICATION_RESET_PHYSICS_INTERPOLATION only works with interpolated nodes: \"" + node_name + "\".");
}
}
#endif
} break;
case NOTIFICATION_EXIT_WORLD: {
VisualServer::get_singleton()->instance_set_scenario(instance, RID());