summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/String.xml4
-rw-r--r--servers/physics_2d/godot_body_2d.cpp1
-rw-r--r--servers/physics_3d/godot_body_3d.cpp2
-rw-r--r--servers/physics_3d/godot_physics_server_3d.cpp2
4 files changed, 5 insertions, 4 deletions
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 10ce03c4b2..abb68e0d05 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -56,11 +56,11 @@
Converts a string containing a binary number into an integer. Binary strings can either be prefixed with [code]0b[/code] or not, and they can also start with a [code]-[/code] before the optional prefix.
[codeblocks]
[gdscript]
- print("0x101".bin_to_int()) # Prints "5".
+ print("0b101".bin_to_int()) # Prints "5".
print("101".bin_to_int()) # Prints "5".
[/gdscript]
[csharp]
- GD.Print("0x101".BinToInt()); // Prints "5".
+ GD.Print("0b101".BinToInt()); // Prints "5".
GD.Print("101".BinToInt()); // Prints "5".
[/csharp]
[/codeblocks]
diff --git a/servers/physics_2d/godot_body_2d.cpp b/servers/physics_2d/godot_body_2d.cpp
index 68f114a34a..a18c748e1d 100644
--- a/servers/physics_2d/godot_body_2d.cpp
+++ b/servers/physics_2d/godot_body_2d.cpp
@@ -276,6 +276,7 @@ PhysicsServer2D::BodyMode GodotBody2D::get_mode() const {
void GodotBody2D::_shapes_changed() {
_mass_properties_changed();
+ wakeup();
wakeup_neighbours();
}
diff --git a/servers/physics_3d/godot_body_3d.cpp b/servers/physics_3d/godot_body_3d.cpp
index 0564c4d452..02929eeaed 100644
--- a/servers/physics_3d/godot_body_3d.cpp
+++ b/servers/physics_3d/godot_body_3d.cpp
@@ -327,6 +327,8 @@ PhysicsServer3D::BodyMode GodotBody3D::get_mode() const {
void GodotBody3D::_shapes_changed() {
_mass_properties_changed();
+ wakeup();
+ wakeup_neighbours();
}
void GodotBody3D::set_state(PhysicsServer3D::BodyState p_state, const Variant &p_variant) {
diff --git a/servers/physics_3d/godot_physics_server_3d.cpp b/servers/physics_3d/godot_physics_server_3d.cpp
index 34b56e733e..79a2e0b0ea 100644
--- a/servers/physics_3d/godot_physics_server_3d.cpp
+++ b/servers/physics_3d/godot_physics_server_3d.cpp
@@ -584,7 +584,6 @@ void GodotPhysicsServer3D::body_set_collision_layer(RID p_body, uint32_t p_layer
ERR_FAIL_COND(!body);
body->set_collision_layer(p_layer);
- body->wakeup();
}
uint32_t GodotPhysicsServer3D::body_get_collision_layer(RID p_body) const {
@@ -599,7 +598,6 @@ void GodotPhysicsServer3D::body_set_collision_mask(RID p_body, uint32_t p_mask)
ERR_FAIL_COND(!body);
body->set_collision_mask(p_mask);
- body->wakeup();
}
uint32_t GodotPhysicsServer3D::body_get_collision_mask(RID p_body) const {