|
@@ -192,7 +192,7 @@ int Physics2DDirectSpaceStateSW::intersect_shape(const RID& p_shape, const Matri
|
|
if (p_result_max<=0)
|
|
if (p_result_max<=0)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
- Shape2DSW *shape = static_cast<Physics2DServerSW*>(Physics2DServer::get_singleton())->shape_owner.get(p_shape);
|
|
|
|
|
|
+ Shape2DSW *shape = Physics2DServerSW::singletonsw->shape_owner.get(p_shape);
|
|
ERR_FAIL_COND_V(!shape,0);
|
|
ERR_FAIL_COND_V(!shape,0);
|
|
|
|
|
|
Rect2 aabb = p_xform.xform(shape->get_aabb());
|
|
Rect2 aabb = p_xform.xform(shape->get_aabb());
|
|
@@ -239,7 +239,7 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Shape2DSW *shape = static_cast<Physics2DServerSW*>(Physics2DServer::get_singleton())->shape_owner.get(p_shape);
|
|
|
|
|
|
+ Shape2DSW *shape = Physics2DServerSW::singletonsw->shape_owner.get(p_shape);
|
|
ERR_FAIL_COND_V(!shape,false);
|
|
ERR_FAIL_COND_V(!shape,false);
|
|
|
|
|
|
Rect2 aabb = p_xform.xform(shape->get_aabb());
|
|
Rect2 aabb = p_xform.xform(shape->get_aabb());
|
|
@@ -367,7 +367,7 @@ bool Physics2DDirectSpaceStateSW::collide_shape(RID p_shape, const Matrix32& p_s
|
|
if (p_result_max<=0)
|
|
if (p_result_max<=0)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
- Shape2DSW *shape = static_cast<Physics2DServerSW*>(Physics2DServer::get_singleton())->shape_owner.get(p_shape);
|
|
|
|
|
|
+ Shape2DSW *shape = Physics2DServerSW::singletonsw->shape_owner.get(p_shape);
|
|
ERR_FAIL_COND_V(!shape,0);
|
|
ERR_FAIL_COND_V(!shape,0);
|
|
|
|
|
|
Rect2 aabb = p_shape_xform.xform(shape->get_aabb());
|
|
Rect2 aabb = p_shape_xform.xform(shape->get_aabb());
|
|
@@ -474,7 +474,7 @@ static void _rest_cbk_result(const Vector2& p_point_A,const Vector2& p_point_B,v
|
|
bool Physics2DDirectSpaceStateSW::rest_info(RID p_shape, const Matrix32& p_shape_xform,const Vector2& p_motion,float p_margin,ShapeRestInfo *r_info, const Set<RID>& p_exclude,uint32_t p_layer_mask,uint32_t p_object_type_mask) {
|
|
bool Physics2DDirectSpaceStateSW::rest_info(RID p_shape, const Matrix32& p_shape_xform,const Vector2& p_motion,float p_margin,ShapeRestInfo *r_info, const Set<RID>& p_exclude,uint32_t p_layer_mask,uint32_t p_object_type_mask) {
|
|
|
|
|
|
|
|
|
|
- Shape2DSW *shape = static_cast<Physics2DServerSW*>(Physics2DServer::get_singleton())->shape_owner.get(p_shape);
|
|
|
|
|
|
+ Shape2DSW *shape = Physics2DServerSW::singletonsw->shape_owner.get(p_shape);
|
|
ERR_FAIL_COND_V(!shape,0);
|
|
ERR_FAIL_COND_V(!shape,0);
|
|
|
|
|
|
Rect2 aabb = p_shape_xform.xform(shape->get_aabb());
|
|
Rect2 aabb = p_shape_xform.xform(shape->get_aabb());
|