diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-14 12:26:56 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-14 14:52:23 +0100 |
commit | 93ab45b6b5c4f8e0619e963156c983009d399a9d (patch) | |
tree | 80e55993f29ad7bf502ef7388eef78114b2dc4ab /main/tests/test_physics_2d.cpp | |
parent | 78e90ac60b81f17fdf8c319357f16962e92e6106 (diff) |
Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
Diffstat (limited to 'main/tests/test_physics_2d.cpp')
-rw-r--r-- | main/tests/test_physics_2d.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp index 2074d532b1..8a6a8c78f9 100644 --- a/main/tests/test_physics_2d.cpp +++ b/main/tests/test_physics_2d.cpp @@ -218,8 +218,10 @@ class TestPhysics2DMainLoop : public MainLoop { void _do_ray_query() { -// Physics2DServer *ps = Physics2DServer::get_singleton(); - // ps->query_intersection_segment(ray_query,ray_from,ray_to); + /* + Physics2DServer *ps = Physics2DServer::get_singleton(); + ps->query_intersection_segment(ray_query,ray_from,ray_to); + */ } @@ -273,7 +275,7 @@ protected: ps->body_set_continuous_collision_detection_mode(body,Physics2DServer::CCD_MODE_CAST_SHAPE); ps->body_set_state(body,Physics2DServer::BODY_STATE_TRANSFORM,p_xform); -// print_line("add body with xform: "+p_xform); + //print_line("add body with xform: "+p_xform); RID sprite = vs->canvas_item_create(); vs->canvas_item_set_parent(sprite,canvas); vs->canvas_item_set_transform(sprite,p_xform); @@ -281,8 +283,8 @@ protected: vs->canvas_item_add_texture_rect(sprite,Rect2(-imgsize/2.0,imgsize),body_shape_data[p_shape].image); ps->body_set_force_integration_callback(body,this,"_body_moved",sprite); -// RID q = ps->query_create(this,"_body_moved",sprite); -// ps->query_body_state(q,body); + //RID q = ps->query_create(this,"_body_moved",sprite); + //ps->query_body_state(q,body); return body; } @@ -409,10 +411,12 @@ public: }; Physics2DServer::ShapeType type = types[i%4]; -// type=Physics2DServer::SHAPE_SEGMENT; + //type=Physics2DServer::SHAPE_SEGMENT; _add_body(type,Transform2D(i*0.8,Point2(152+i*40,100-40*i))); - //if (i==0) - // ps->body_set_mode(b,Physics2DServer::BODY_MODE_STATIC); + /* + if (i==0) + ps->body_set_mode(b,Physics2DServer::BODY_MODE_STATIC); + */ } //RID b= _add_body(Physics2DServer::SHAPE_CIRCLE,Transform2D(0,Point2(101,140))); |