diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-05 09:16:00 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-05 09:16:00 -0300 |
commit | 0f7af4ea51744cda23c4d3c7481f9c332973d1d4 (patch) | |
tree | 27b8914062558b5648655ccf3db13251d217af98 /servers/physics_2d | |
parent | 9e477babb3bf0ce5179395c2a5155a3f3cd36798 (diff) |
-Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
Diffstat (limited to 'servers/physics_2d')
-rw-r--r-- | servers/physics_2d/broad_phase_2d_hash_grid.cpp | 6 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_wrap_mt.cpp | 12 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_wrap_mt.h | 2 | ||||
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 6 |
5 files changed, 14 insertions, 14 deletions
diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp index 82d7773574..efa12c37cb 100644 --- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp +++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp @@ -683,12 +683,12 @@ BroadPhase2DSW *BroadPhase2DHashGrid::_create() { BroadPhase2DHashGrid::BroadPhase2DHashGrid() { - hash_table_size = GLOBAL_DEF("physics_2d/bp_hash_table_size",4096); + hash_table_size = GLOBAL_DEF("physics/2d/bp_hash_table_size",4096); hash_table_size = Math::larger_prime(hash_table_size); hash_table = memnew_arr( PosBin*, hash_table_size); - cell_size = GLOBAL_DEF("physics_2d/cell_size",128); - large_object_min_surface = GLOBAL_DEF("physics_2d/large_object_surface_treshold_in_cells",512); + cell_size = GLOBAL_DEF("physics/2d/cell_size",128); + large_object_min_surface = GLOBAL_DEF("physics/2d/large_object_surface_treshold_in_cells",512); for(int i=0;i<hash_table_size;i++) hash_table[i]=NULL; diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index bb55a616e2..abd83c0346 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -1386,7 +1386,7 @@ Physics2DServerSW::Physics2DServerSW() { island_count=0; active_objects=0; collision_pairs=0; - using_threads=int(Globals::get_singleton()->get("physics_2d/thread_model"))==2; + using_threads=int(GlobalConfig::get_singleton()->get("physics/2d/thread_model"))==2; }; diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp index 8a60af725f..8730bb9ee8 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp +++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp @@ -168,12 +168,12 @@ Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer* p_contained,bool p step_thread_up=false; alloc_mutex=Mutex::create(); - shape_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - area_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - body_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - pin_joint_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - groove_joint_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); - damped_spring_joint_pool_max_size=GLOBAL_DEF("core/thread_rid_pool_prealloc",20); + shape_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + area_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + body_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + pin_joint_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + groove_joint_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); + damped_spring_joint_pool_max_size=GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc"); if (!p_create_thread) { server_thread=Thread::get_caller_ID(); diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h index 71928d77a6..a8e150d8f2 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.h +++ b/servers/physics_2d/physics_2d_server_wrap_mt.h @@ -320,7 +320,7 @@ public: template<class T> static Physics2DServer* init_server() { - int tm = GLOBAL_DEF("physics_2d/thread_model",1); + int tm = GLOBAL_DEF("physics/2d/thread_model",1); if (tm==0) //single unsafe return memnew( T ); else if (tm==1) //single saef diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 42834ee4e4..8b277aa4b9 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -1329,9 +1329,9 @@ Space2DSW::Space2DSW() { contact_max_allowed_penetration= 0.3; constraint_bias = 0.2; - body_linear_velocity_sleep_treshold=GLOBAL_DEF("physics_2d/sleep_threashold_linear",2.0); - body_angular_velocity_sleep_treshold=GLOBAL_DEF("physics_2d/sleep_threshold_angular",(8.0 / 180.0 * Math_PI)); - body_time_to_sleep=GLOBAL_DEF("physics_2d/time_before_sleep",0.5); + body_linear_velocity_sleep_treshold=GLOBAL_DEF("physics/2d/sleep_threashold_linear",2.0); + body_angular_velocity_sleep_treshold=GLOBAL_DEF("physics/2d/sleep_threshold_angular",(8.0 / 180.0 * Math_PI)); + body_time_to_sleep=GLOBAL_DEF("physics/2d/time_before_sleep",0.5); broadphase = BroadPhase2DSW::create_func(); |