diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/particles_2d.cpp | 7 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index 4aa6151df3..ded86702ef 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -484,7 +484,7 @@ void Particles2D::_notification(int p_what) { Particle *pdata=&particles[0]; int particle_count=particles.size(); - Rect2 r(Point2(),size); + RID texrid; if (texture.is_valid()) @@ -606,9 +606,10 @@ void Particles2D::_notification(int p_what) { if (texrid.is_valid()) { - VisualServer::get_singleton()->canvas_item_add_texture_rect(ci,r,texrid,false,color); + texture->draw(ci,Point2(),color); + //VisualServer::get_singleton()->canvas_item_add_texture_rect(ci,r,texrid,false,color); } else { - VisualServer::get_singleton()->canvas_item_add_rect(ci,r,color); + VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(Point2(),size),color); } diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index d32c6df7a4..6403454588 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -329,6 +329,7 @@ Map<TileMap::PosKey,TileMap::Quadrant>::Element *TileMap::_create_quadrant(const VisualServer::get_singleton()->canvas_item_set_parent( q.canvas_item, get_canvas_item() ); VisualServer::get_singleton()->canvas_item_set_transform( q.canvas_item, xform ); q.static_body=Physics2DServer::get_singleton()->body_create(Physics2DServer::BODY_MODE_STATIC); + Physics2DServer::get_singleton()->body_attach_object_instance_ID(q.static_body,get_instance_ID()); Physics2DServer::get_singleton()->body_set_layer_mask(q.static_body,collision_layer); Physics2DServer::get_singleton()->body_set_param(q.static_body,Physics2DServer::BODY_PARAM_FRICTION,friction); Physics2DServer::get_singleton()->body_set_param(q.static_body,Physics2DServer::BODY_PARAM_BOUNCE,bounce); |