Reworked how servers preallocate RIDs, should fix #10970
This commit is contained in:
parent
0de6cba7e7
commit
192a4d7de5
27 changed files with 196 additions and 99 deletions
|
|
@ -587,7 +587,9 @@ Map<TileMap::PosKey, TileMap::Quadrant>::Element *TileMap::_create_quadrant(cons
|
|||
|
||||
xform.set_origin(q.pos);
|
||||
//q.canvas_item = VisualServer::get_singleton()->canvas_item_create();
|
||||
q.body = Physics2DServer::get_singleton()->body_create(use_kinematic ? Physics2DServer::BODY_MODE_KINEMATIC : Physics2DServer::BODY_MODE_STATIC);
|
||||
q.body = Physics2DServer::get_singleton()->body_create();
|
||||
Physics2DServer::get_singleton()->body_set_mode(q.body, use_kinematic ? Physics2DServer::BODY_MODE_KINEMATIC : Physics2DServer::BODY_MODE_STATIC);
|
||||
|
||||
Physics2DServer::get_singleton()->body_attach_object_instance_id(q.body, get_instance_id());
|
||||
Physics2DServer::get_singleton()->body_set_collision_layer(q.body, collision_layer);
|
||||
Physics2DServer::get_singleton()->body_set_collision_mask(q.body, collision_mask);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue