Open clayjohn opened 2 days ago
Also CCing @RandomShaper as he made the suggestion that led to this code https://github.com/godotengine/godot/pull/98862#issuecomment-2488994511
Sorry for the issue. I’ll write up a PR later today that fixes the early return and moves the warning until after all other checks.
If the check still fails to find the feature, it’ll print the warning, regardless of if the call was originally intended to check a server feature or not. That could be annoy for people who really want 0 warnings in their console. So, another “fix” for this issue could be to remove the warning entirely. I don’t have a preference either way.
Tested versions
Current master 56a7dba10beacec50176723a5fae76d1614e75c1
System information
Godot v4.4.dev (5ea9e8b26) - Pop!_OS 22.04 LTS on X11 - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - Mesa Intel(R) Xe Graphics (TGL GT2) - 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 threads)
Issue description
The following warning is printed whenever you run Godot in a debug build with
--verbose
:Introduced by https://github.com/godotengine/godot/pull/98862
Here is the relevant code:
before
after
Before if either
has_server_feature_callback
orhas_server_feature_callback(p_feature)
was false, the function would continue and checkif (ProjectSettings::get_singleton()->has_custom_feature(p_feature))
. With the new logic the warning is printed any time thathas_server_feature_callback
isfalse
and the code returns early wheneverhas_server_feature_callback
is true. I suspect that neither of those things are intendedCC @HuntJSparra
Steps to reproduce
Run Godot from the command line with --verbose and observe
Minimal reproduction project (MRP)
N/A