forked from enlightenment/efl
ephysics: check for side value on anchors full add
function SVN revision: 79037
This commit is contained in:
parent
5169b73515
commit
5d465e1c04
|
@ -1838,6 +1838,7 @@ typedef enum _EPhysics_Body_Cloth_Anchor_Side
|
||||||
EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_RIGHT,
|
EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_RIGHT,
|
||||||
EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_TOP,
|
EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_TOP,
|
||||||
EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_BOTTOM,
|
EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_BOTTOM,
|
||||||
|
EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_LAST,
|
||||||
} EPhysics_Body_Cloth_Anchor_Side;
|
} EPhysics_Body_Cloth_Anchor_Side;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1484,6 +1484,12 @@ ephysics_body_cloth_anchor_full_add(EPhysics_Body *body1, EPhysics_Body *body2,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((side < 0) || (side >= EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_LAST))
|
||||||
|
{
|
||||||
|
ERR("Could not add anchors, side is invalid.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
rows = body1->cloth_rows + 1;
|
rows = body1->cloth_rows + 1;
|
||||||
columns = body1->cloth_columns + 1;
|
columns = body1->cloth_columns + 1;
|
||||||
anchor_mass = body1->soft_body->m_nodes.size() * 0.025;
|
anchor_mass = body1->soft_body->m_nodes.size() * 0.025;
|
||||||
|
|
Loading…
Reference in New Issue