diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/SCsub | 2 | ||||
-rw-r--r-- | servers/audio/SCsub | 2 | ||||
-rw-r--r-- | servers/physics/SCsub | 2 | ||||
-rw-r--r-- | servers/physics/joints/SCsub | 2 | ||||
-rw-r--r-- | servers/physics/space_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics/space_sw.h | 1 | ||||
-rw-r--r-- | servers/physics_2d/SCsub | 2 | ||||
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 19 | ||||
-rw-r--r-- | servers/physics_2d/space_2d_sw.h | 1 | ||||
-rw-r--r-- | servers/spatial_sound/SCsub | 2 | ||||
-rw-r--r-- | servers/spatial_sound_2d/SCsub | 2 | ||||
-rw-r--r-- | servers/visual/SCsub | 2 | ||||
-rw-r--r-- | servers/visual_server.cpp | 3 |
13 files changed, 32 insertions, 10 deletions
diff --git a/servers/SCsub b/servers/SCsub index d861847101..57b5b36758 100644 --- a/servers/SCsub +++ b/servers/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') env.servers_sources=[] diff --git a/servers/audio/SCsub b/servers/audio/SCsub index d31af2c1c4..4684bd6cf3 100644 --- a/servers/audio/SCsub +++ b/servers/audio/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') env.add_source_files(env.servers_sources,"*.cpp") diff --git a/servers/physics/SCsub b/servers/physics/SCsub index 95296eadbe..b527f38ceb 100644 --- a/servers/physics/SCsub +++ b/servers/physics/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') env.add_source_files(env.servers_sources,"*.cpp") diff --git a/servers/physics/joints/SCsub b/servers/physics/joints/SCsub index d31af2c1c4..4684bd6cf3 100644 --- a/servers/physics/joints/SCsub +++ b/servers/physics/joints/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') env.add_source_files(env.servers_sources,"*.cpp") diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp index 7077146420..9755c49e2d 100644 --- a/servers/physics/space_sw.cpp +++ b/servers/physics/space_sw.cpp @@ -721,7 +721,7 @@ SpaceSW::SpaceSW() { constraint_bias = 0.01; body_linear_velocity_sleep_threshold=GLOBAL_DEF("physics/sleep_threshold_linear",0.1); body_angular_velocity_sleep_threshold=GLOBAL_DEF("physics/sleep_threshold_angular", (8.0 / 180.0 * Math_PI) ); - body_time_to_sleep=0.5; + body_time_to_sleep=GLOBAL_DEF("physics/time_before_sleep",0.5); body_angular_velocity_damp_ratio=10; diff --git a/servers/physics/space_sw.h b/servers/physics/space_sw.h index 3fdef7e62b..29eca2690a 100644 --- a/servers/physics/space_sw.h +++ b/servers/physics/space_sw.h @@ -37,6 +37,7 @@ #include "area_pair_sw.h" #include "broad_phase_sw.h" #include "collision_object_sw.h" +#include "globals.h" class PhysicsDirectSpaceStateSW : public PhysicsDirectSpaceState { diff --git a/servers/physics_2d/SCsub b/servers/physics_2d/SCsub index ebb7f8be00..2114782faa 100644 --- a/servers/physics_2d/SCsub +++ b/servers/physics_2d/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') env.add_source_files(env.servers_sources,"*.cpp") diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index d0dcee7763..56bee8b0c5 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -81,6 +81,9 @@ int Physics2DDirectSpaceStateSW::intersect_point(const Vector2& p_point,ShapeRes if (!shape->contains_point(local_point)) continue; + if (cc>=p_result_max) + continue; + r_results[cc].collider_id=col_obj->get_instance_id(); if (r_results[cc].collider_id!=0) r_results[cc].collider=ObjectDB::get_instance(r_results[cc].collider_id); @@ -1321,14 +1324,14 @@ Space2DSW::Space2DSW() { contact_debug_count=0; locked=false; - contact_recycle_radius=0.01; - contact_max_separation=0.05; - contact_max_allowed_penetration= 0.01; - - constraint_bias = 0.01; - body_linear_velocity_sleep_treshold=0.01; - body_angular_velocity_sleep_treshold=(8.0 / 180.0 * Math_PI); - body_time_to_sleep=0.5; + contact_recycle_radius=1.0; + contact_max_separation=1.5; + 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); broadphase = BroadPhase2DSW::create_func(); diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h index f58e8c3fe7..45a3e4ca8f 100644 --- a/servers/physics_2d/space_2d_sw.h +++ b/servers/physics_2d/space_2d_sw.h @@ -37,6 +37,7 @@ #include "area_pair_2d_sw.h" #include "broad_phase_2d_sw.h" #include "collision_object_2d_sw.h" +#include "globals.h" class Physics2DDirectSpaceStateSW : public Physics2DDirectSpaceState { diff --git a/servers/spatial_sound/SCsub b/servers/spatial_sound/SCsub index d31af2c1c4..4684bd6cf3 100644 --- a/servers/spatial_sound/SCsub +++ b/servers/spatial_sound/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') env.add_source_files(env.servers_sources,"*.cpp") diff --git a/servers/spatial_sound_2d/SCsub b/servers/spatial_sound_2d/SCsub index d31af2c1c4..4684bd6cf3 100644 --- a/servers/spatial_sound_2d/SCsub +++ b/servers/spatial_sound_2d/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') env.add_source_files(env.servers_sources,"*.cpp") diff --git a/servers/visual/SCsub b/servers/visual/SCsub index d31af2c1c4..4684bd6cf3 100644 --- a/servers/visual/SCsub +++ b/servers/visual/SCsub @@ -1,3 +1,5 @@ +#!/usr/bin/env python + Import('env') env.add_source_files(env.servers_sources,"*.cpp") diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index f69580254c..dfa0c91c7f 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -382,7 +382,7 @@ void VisualServer::_bind_methods() { ObjectTypeDB::bind_method(_MD("mesh_create"),&VisualServer::mesh_create); - ObjectTypeDB::bind_method(_MD("mesh_add_surface"),&VisualServer::mesh_add_surface, DEFVAL(NO_INDEX_ARRAY)); + ObjectTypeDB::bind_method(_MD("mesh_add_surface"),&VisualServer::mesh_add_surface, DEFVAL(Array()), DEFVAL(false)); ObjectTypeDB::bind_method(_MD("mesh_surface_set_material"),&VisualServer::mesh_surface_set_material,DEFVAL(false)); ObjectTypeDB::bind_method(_MD("mesh_surface_get_material"),&VisualServer::mesh_surface_get_material); @@ -531,6 +531,7 @@ void VisualServer::_bind_methods() { ObjectTypeDB::bind_method(_MD("canvas_item_set_self_opacity"),&VisualServer::canvas_item_set_self_opacity); ObjectTypeDB::bind_method(_MD("canvas_item_get_self_opacity"),&VisualServer::canvas_item_get_self_opacity); ObjectTypeDB::bind_method(_MD("canvas_item_set_z"),&VisualServer::canvas_item_set_z); + ObjectTypeDB::bind_method(_MD("canvas_item_set_sort_children_by_y"),&VisualServer::canvas_item_set_sort_children_by_y); ObjectTypeDB::bind_method(_MD("canvas_item_add_line"),&VisualServer::canvas_item_add_line, DEFVAL(1.0), DEFVAL(false)); ObjectTypeDB::bind_method(_MD("canvas_item_add_rect"),&VisualServer::canvas_item_add_rect); |