summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-10-31 21:03:09 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-31 21:03:09 +0000
commitcd4a6f05d7e37dcf85e0cd8c1adbe35aa332860f (patch)
treecc94524ac53a8a563c489640a6cde8f1c1ae4fa6 /legacy/ephysics/src
parent5e0998835ec02d153e27d8eb7b7ea1f903539be7 (diff)
ephysics: fix cols / rows account
It was creating meshes with cols - 1, rows - 1. SVN revision: 78729
Diffstat (limited to 'legacy/ephysics/src')
-rw-r--r--legacy/ephysics/src/lib/ephysics_body.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp
index 251442b7cc..3ffea07290 100644
--- a/legacy/ephysics/src/lib/ephysics_body.cpp
+++ b/legacy/ephysics/src/lib/ephysics_body.cpp
@@ -1484,8 +1484,8 @@ ephysics_body_cloth_anchor_full_add(EPhysics_Body *body1, EPhysics_Body *body2,
1484 return; 1484 return;
1485 } 1485 }
1486 1486
1487 rows = body1->cloth_rows; 1487 rows = body1->cloth_rows + 1;
1488 columns = body1->cloth_columns; 1488 columns = body1->cloth_columns + 1;
1489 anchor_mass = body1->soft_body->m_nodes.size() * 0.025; 1489 anchor_mass = body1->soft_body->m_nodes.size() * 0.025;
1490 1490
1491 if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_RIGHT) 1491 if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_RIGHT)
@@ -1648,7 +1648,8 @@ ephysics_body_cloth_add(EPhysics_World *world, unsigned short rows, unsigned sho
1648 btVector3(2, 1, 0), 1648 btVector3(2, 1, 0),
1649 btVector3(1, 2, 0), 1649 btVector3(1, 2, 0),
1650 btVector3(1, 1, 0), 1650 btVector3(1, 1, 0),
1651 body_rows, body_columns, 0, false); 1651 body_rows + 1, body_columns + 1,
1652 0, false);
1652 1653
1653 if (!soft_body) 1654 if (!soft_body)
1654 { 1655 {