Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Dec 5, 2024
2 parents 9e1768a + 020f9e5 commit 2e851a7
Show file tree
Hide file tree
Showing 121 changed files with 187 additions and 8,358 deletions.
1 change: 0 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"name": "Run the editor with V-Sekai game",
"type": "lldb",
"request": "launch",
"args": ["--path", "~/Desktop/v-sekai-game", "-e"],
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/godot/bin/godot.macos.editor.double.arm64",
"preLaunchTask": "Godot Engine",
Expand Down
4 changes: 2 additions & 2 deletions godot/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/V-Sekai/godot.git
branch = groups-4.4
commit = 909488ad997bc18df0890906765d9ec5d319a25f
parent = 063fc7f1037eef481fb9df26c4e18bf1a56a5569
commit = 2e88ac16c1fad1d13f4882f466356cc1c24b22a7
parent = dbea8e19ac226e26b20cbb6c85a18ea07940b772
method = merge
cmdver = 0.4.9
72 changes: 37 additions & 35 deletions godot/doc/classes/ProjectSettings.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "../objects/jolt_body_3d.h"
#include "../spaces/jolt_space_3d.h"

#include "core/error/error_macros.h"

#include "Jolt/Physics/Constraints/SwingTwistConstraint.h"

namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "../objects/jolt_body_3d.h"
#include "../spaces/jolt_space_3d.h"

#include "core/error/error_macros.h"

#include "Jolt/Physics/Constraints/SixDOFConstraint.h"

namespace {
Expand Down
1 change: 0 additions & 1 deletion godot/modules/jolt_physics/joints/jolt_hinge_joint_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "../spaces/jolt_space_3d.h"

#include "core/config/engine.h"
#include "core/error/error_macros.h"

#include "Jolt/Physics/Constraints/FixedConstraint.h"
#include "Jolt/Physics/Constraints/HingeConstraint.h"
Expand Down
2 changes: 0 additions & 2 deletions godot/modules/jolt_physics/joints/jolt_joint_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "../objects/jolt_body_3d.h"
#include "../spaces/jolt_space_3d.h"

#include "core/error/error_macros.h"

namespace {

constexpr int DEFAULT_SOLVER_PRIORITY = 1;
Expand Down
3 changes: 0 additions & 3 deletions godot/modules/jolt_physics/joints/jolt_joint_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
#ifndef JOLT_JOINT_3D_H
#define JOLT_JOINT_3D_H

#include "core/math/transform_3d.h"
#include "core/string/ustring.h"
#include "core/templates/rid.h"
#include "servers/physics_server_3d.h"

#include "Jolt/Jolt.h"
Expand Down
2 changes: 0 additions & 2 deletions godot/modules/jolt_physics/joints/jolt_pin_joint_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "../objects/jolt_body_3d.h"
#include "../spaces/jolt_space_3d.h"

#include "core/error/error_macros.h"

#include "Jolt/Physics/Constraints/PointConstraint.h"

namespace {
Expand Down
2 changes: 0 additions & 2 deletions godot/modules/jolt_physics/joints/jolt_slider_joint_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "../objects/jolt_body_3d.h"
#include "../spaces/jolt_space_3d.h"

#include "core/error/error_macros.h"

#include "Jolt/Physics/Constraints/FixedConstraint.h"
#include "Jolt/Physics/Constraints/SliderConstraint.h"

Expand Down
1 change: 0 additions & 1 deletion godot/modules/jolt_physics/jolt_globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

#include "core/os/memory.h"
#include "core/string/print_string.h"
#include "core/variant/variant.h"

#include "Jolt/Jolt.h"

Expand Down
2 changes: 0 additions & 2 deletions godot/modules/jolt_physics/jolt_physics_server_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
#include "spaces/jolt_physics_direct_space_state_3d.h"
#include "spaces/jolt_space_3d.h"

#include "core/error/error_macros.h"

JoltPhysicsServer3D::JoltPhysicsServer3D(bool p_on_separate_thread) :
on_separate_thread(p_on_separate_thread) {
singleton = this;
Expand Down
1 change: 0 additions & 1 deletion godot/modules/jolt_physics/jolt_physics_server_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#ifndef JOLT_PHYSICS_SERVER_3D_H
#define JOLT_PHYSICS_SERVER_3D_H

#include "core/templates/hash_set.h"
#include "core/templates/rid_owner.h"
#include "servers/physics_server_3d.h"

Expand Down
91 changes: 31 additions & 60 deletions godot/modules/jolt_physics/jolt_project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include "jolt_project_settings.h"

#include "core/config/project_settings.h"
#include "core/error/error_macros.h"
#include "core/math/math_funcs.h"

namespace {

Expand All @@ -53,9 +51,9 @@ void JoltProjectSettings::register_settings() {
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/speculative_contact_distance", PROPERTY_HINT_RANGE, U"0,1,0.00001,or_greater,suffix:m"), 0.02f);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/baumgarte_stabilization_factor", PROPERTY_HINT_RANGE, U"0,1,0.01"), 0.2f);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/soft_body_point_radius", PROPERTY_HINT_RANGE, U"0,1,0.001,or_greater,suffix:m"), 0.01f);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/bounce_velocity_threshold", PROPERTY_HINT_NONE, U"suffix:m/s"), 1.0f);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/bounce_velocity_threshold", PROPERTY_HINT_RANGE, U"0,1,0.001,or_greater,suffix:m/s"), 1.0f);
GLOBAL_DEF(PropertyInfo(Variant::BOOL, "physics/jolt_physics_3d/simulation/allow_sleep"), true);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/sleep_velocity_threshold", PROPERTY_HINT_NONE, U"suffix:m/s"), 0.03f);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/sleep_velocity_threshold", PROPERTY_HINT_RANGE, U"0,1,0.001,or_greater,suffix:m/s"), 0.03f);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/sleep_time_threshold", PROPERTY_HINT_RANGE, U"0,5,0.01,or_greater,suffix:s"), 0.5f);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/continuous_cd_movement_threshold", PROPERTY_HINT_RANGE, U"0,1,0.01"), 0.75f);
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/jolt_physics_3d/simulation/continuous_cd_max_penetration", PROPERTY_HINT_RANGE, U"0,1,0.01"), 0.25f);
Expand Down Expand Up @@ -85,94 +83,76 @@ void JoltProjectSettings::register_settings() {
}

int JoltProjectSettings::get_simulation_velocity_steps() {
static const int value = GLOBAL_GET("physics/jolt_physics_3d/simulation/velocity_steps");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/velocity_steps");
}

int JoltProjectSettings::get_simulation_position_steps() {
static const int value = GLOBAL_GET("physics/jolt_physics_3d/simulation/position_steps");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/position_steps");
}

bool JoltProjectSettings::use_enhanced_internal_edge_removal_for_bodies() {
static const bool value = GLOBAL_GET("physics/jolt_physics_3d/simulation/use_enhanced_internal_edge_removal");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/use_enhanced_internal_edge_removal");
}

bool JoltProjectSettings::areas_detect_static_bodies() {
static const bool value = GLOBAL_GET("physics/jolt_physics_3d/simulation/areas_detect_static_bodies");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/areas_detect_static_bodies");
}

bool JoltProjectSettings::should_generate_all_kinematic_contacts() {
static const bool value = GLOBAL_GET("physics/jolt_physics_3d/simulation/generate_all_kinematic_contacts");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/generate_all_kinematic_contacts");
}

float JoltProjectSettings::get_penetration_slop() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/penetration_slop");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/penetration_slop");
}

float JoltProjectSettings::get_speculative_contact_distance() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/speculative_contact_distance");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/speculative_contact_distance");
}

float JoltProjectSettings::get_baumgarte_stabilization_factor() {
static const float value = (float)GLOBAL_GET("physics/jolt_physics_3d/simulation/baumgarte_stabilization_factor");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/baumgarte_stabilization_factor");
}

float JoltProjectSettings::get_soft_body_point_radius() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/soft_body_point_radius");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/soft_body_point_radius");
}

float JoltProjectSettings::get_bounce_velocity_threshold() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/bounce_velocity_threshold");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/bounce_velocity_threshold");
}

bool JoltProjectSettings::is_sleep_allowed() {
static const bool value = GLOBAL_GET("physics/jolt_physics_3d/simulation/allow_sleep");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/allow_sleep");
}

float JoltProjectSettings::get_sleep_velocity_threshold() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/sleep_velocity_threshold");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/sleep_velocity_threshold");
}

float JoltProjectSettings::get_sleep_time_threshold() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/sleep_time_threshold");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/sleep_time_threshold");
}

float JoltProjectSettings::get_ccd_movement_threshold() {
static const float value = (float)GLOBAL_GET("physics/jolt_physics_3d/simulation/continuous_cd_movement_threshold");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/continuous_cd_movement_threshold");
}

float JoltProjectSettings::get_ccd_max_penetration() {
static const float value = (float)GLOBAL_GET("physics/jolt_physics_3d/simulation/continuous_cd_max_penetration");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/continuous_cd_max_penetration");
}

bool JoltProjectSettings::is_body_pair_contact_cache_enabled() {
static const bool value = GLOBAL_GET("physics/jolt_physics_3d/simulation/body_pair_contact_cache_enabled");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/simulation/body_pair_contact_cache_enabled");
}

float JoltProjectSettings::get_body_pair_cache_distance_sq() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/body_pair_contact_cache_distance_threshold");
static const float squared_value = value * value;
return squared_value;
const float value = GLOBAL_GET("physics/jolt_physics_3d/simulation/body_pair_contact_cache_distance_threshold");
return value * value;
}

float JoltProjectSettings::get_body_pair_cache_angle_cos_div2() {
static const float value = Math::cos((float)GLOBAL_GET("physics/jolt_physics_3d/simulation/body_pair_contact_cache_angle_threshold") / 2.0f);
return value;
return Math::cos((float)GLOBAL_GET("physics/jolt_physics_3d/simulation/body_pair_contact_cache_angle_threshold") / 2.0f);
}

bool JoltProjectSettings::use_enhanced_internal_edge_removal_for_queries() {
Expand All @@ -196,7 +176,7 @@ int JoltProjectSettings::get_motion_query_recovery_iterations() {
}

float JoltProjectSettings::get_motion_query_recovery_amount() {
static const float value = (float)GLOBAL_GET("physics/jolt_physics_3d/motion_queries/recovery_amount");
static const float value = GLOBAL_GET("physics/jolt_physics_3d/motion_queries/recovery_amount");
return value;
}

Expand All @@ -211,46 +191,37 @@ float JoltProjectSettings::get_active_edge_threshold() {
}

bool JoltProjectSettings::use_joint_world_node_a() {
static const bool value = (int)GLOBAL_GET("physics/jolt_physics_3d/joints/world_node") == JOLT_JOINT_WORLD_NODE_A;
return value;
return (int)GLOBAL_GET("physics/jolt_physics_3d/joints/world_node") == JOLT_JOINT_WORLD_NODE_A;
}

int JoltProjectSettings::get_temp_memory_mib() {
static const int value = GLOBAL_GET("physics/jolt_physics_3d/limits/temporary_memory_buffer_size");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/limits/temporary_memory_buffer_size");
}

int64_t JoltProjectSettings::get_temp_memory_b() {
static const int64_t value = get_temp_memory_mib() * 1024 * 1024;
return value;
return get_temp_memory_mib() * 1024 * 1024;
}

float JoltProjectSettings::get_world_boundary_shape_size() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/limits/world_boundary_shape_size");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/limits/world_boundary_shape_size");
}

float JoltProjectSettings::get_max_linear_velocity() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/limits/max_linear_velocity");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/limits/max_linear_velocity");
}

float JoltProjectSettings::get_max_angular_velocity() {
static const float value = GLOBAL_GET("physics/jolt_physics_3d/limits/max_angular_velocity");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/limits/max_angular_velocity");
}

int JoltProjectSettings::get_max_bodies() {
static const int value = GLOBAL_GET("physics/jolt_physics_3d/limits/max_bodies");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/limits/max_bodies");
}

int JoltProjectSettings::get_max_pairs() {
static const int value = GLOBAL_GET("physics/jolt_physics_3d/limits/max_body_pairs");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/limits/max_body_pairs");
}

int JoltProjectSettings::get_max_contact_constraints() {
static const int value = GLOBAL_GET("physics/jolt_physics_3d/limits/max_contact_constraints");
return value;
return GLOBAL_GET("physics/jolt_physics_3d/limits/max_contact_constraints");
}
Loading

0 comments on commit 2e851a7

Please sign in to comment.