summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-10-16 23:18:48 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-16 23:18:48 +0000
commite25a9d45e80bcf2325b81bf4c02ca6b6a27d7026 (patch)
tree5356acbe1b1f556b42f7095fc50179bda74066bc /legacy
parentfe2c2423673fe2870c8416ad22692b1e98f50225 (diff)
ephysics: don't try to unset dragging if it's not set
Otherwise weird behaviors could happens <evil laughs> SVN revision: 78095
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ephysics/src/lib/ephysics_body.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp
index 254d46f673..401df1bfd6 100644
--- a/legacy/ephysics/src/lib/ephysics_body.cpp
+++ b/legacy/ephysics/src/lib/ephysics_body.cpp
@@ -1307,6 +1307,12 @@ ephysics_body_soft_body_dragging_unset(EPhysics_Body *body)
1307 return; 1307 return;
1308 } 1308 }
1309 1309
1310 if (!body->dragging_data.dragging)
1311 {
1312 INF("Dragging isn't set");
1313 return;
1314 }
1315
1310 ephysics_world_lock_take(body->world); 1316 ephysics_world_lock_take(body->world);
1311 face = body->soft_body->m_faces[body->dragging_data.triangle]; 1317 face = body->soft_body->m_faces[body->dragging_data.triangle];
1312 for (int i = 0; i < 3; i++) 1318 for (int i = 0; i < 3; i++)
@@ -1562,7 +1568,7 @@ ephysics_body_soft_body_dragging_apply(EPhysics_Body *body)
1562 { 1568 {
1563 node = face.m_n[i]; 1569 node = face.m_n[i];
1564 node->m_v *= 0; 1570 node->m_v *= 0;
1565 node->m_im *= 0; 1571 node->m_im *= 0;
1566 } 1572 }
1567} 1573}
1568 1574