1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Fix BVH physics project setting

Move the GLOBAL_DEF for the `godot_physics/use_bvh` to occur before GLOBAL_GET.

This prevents a warning occurring and the selection not being used.
This commit is contained in:
lawnjelly
2021-01-13 09:22:17 +00:00
parent 8f265e8c0b
commit b5edbe0301
2 changed files with 4 additions and 4 deletions

View File

@@ -170,6 +170,10 @@ static String get_full_version_string() {
// FIXME: Could maybe be moved to PhysicsServerManager and Physics2DServerManager directly
// to have less code in main.cpp.
void initialize_physics() {
// This must be defined BEFORE the 3d physics server is created
GLOBAL_DEF("physics/3d/godot_physics/use_bvh", true);
/// 3D Physics Server
physics_server = PhysicsServerManager::new_server(ProjectSettings::get_singleton()->get(PhysicsServerManager::setting_property_name));
if (!physics_server) {