Browse Source

Merge pull request #99864 from HuntJSparra/server-features-regression

Fix `OS::has_feature()` skipping custom features
Rémi Verschelde 9 months ago
parent
commit
acdffd0a14
1 changed files with 2 additions and 7 deletions
  1. 2 7
      core/os/os.cpp

+ 2 - 7
core/os/os.cpp

@@ -536,14 +536,9 @@ bool OS::has_feature(const String &p_feature) {
 		return true;
 		return true;
 	}
 	}
 
 
-	if (has_server_feature_callback) {
-		return has_server_feature_callback(p_feature);
-	}
-#ifdef DEBUG_ENABLED
-	else if (is_stdout_verbose()) {
-		WARN_PRINT_ONCE("Server features cannot be checked before RenderingServer has been created. If you are checking a server feature, consider moving your OS::has_feature call after INITIALIZATION_LEVEL_SERVERS.");
+	if (has_server_feature_callback && has_server_feature_callback(p_feature)) {
+		return true;
 	}
 	}
-#endif
 
 
 	if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) {
 	if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) {
 		return true;
 		return true;