Explorar o código

Fix mismatch between RigidBody(2D) and Body(2D)SW can_sleep defaults.

- Set Body2DSW can_sleep default to true.

- Set Body2D can_sleep default to true.
Marcel Admiraal %!s(int64=5) %!d(string=hai) anos
pai
achega
42a9ae7a82
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      servers/physics/body_sw.cpp
  2. 1 1
      servers/physics_2d/body_2d_sw.cpp

+ 1 - 1
servers/physics/body_sw.cpp

@@ -794,7 +794,7 @@ BodySW::BodySW() :
 
 
 	still_time = 0;
 	still_time = 0;
 	continuous_cd = false;
 	continuous_cd = false;
-	can_sleep = false;
+	can_sleep = true;
 	fi_callback = NULL;
 	fi_callback = NULL;
 }
 }
 
 

+ 1 - 1
servers/physics_2d/body_2d_sw.cpp

@@ -694,7 +694,7 @@ Body2DSW::Body2DSW() :
 
 
 	still_time = 0;
 	still_time = 0;
 	continuous_cd_mode = Physics2DServer::CCD_MODE_DISABLED;
 	continuous_cd_mode = Physics2DServer::CCD_MODE_DISABLED;
-	can_sleep = false;
+	can_sleep = true;
 	fi_callback = NULL;
 	fi_callback = NULL;
 }
 }