diff options
Diffstat (limited to 'linden/indra/llcharacter/llkeyframemotion.cpp')
-rw-r--r-- | linden/indra/llcharacter/llkeyframemotion.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/linden/indra/llcharacter/llkeyframemotion.cpp b/linden/indra/llcharacter/llkeyframemotion.cpp index 3b4cf7e..6e80e8d 100644 --- a/linden/indra/llcharacter/llkeyframemotion.cpp +++ b/linden/indra/llcharacter/llkeyframemotion.cpp | |||
@@ -1460,6 +1460,10 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1460 | 1460 | ||
1461 | LLQuaternion::Order ro = StringToOrder("ZYX"); | 1461 | LLQuaternion::Order ro = StringToOrder("ZYX"); |
1462 | rot_key.mRotation = mayaQ(rot_angles.mV[VX], rot_angles.mV[VY], rot_angles.mV[VZ], ro); | 1462 | rot_key.mRotation = mayaQ(rot_angles.mV[VX], rot_angles.mV[VY], rot_angles.mV[VZ], ro); |
1463 | if(!(rot_key.mRotation.isFinite())) | ||
1464 | { | ||
1465 | return FALSE; | ||
1466 | } | ||
1463 | } | 1467 | } |
1464 | else | 1468 | else |
1465 | { | 1469 | { |
@@ -1538,6 +1542,10 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1538 | if (old_version) | 1542 | if (old_version) |
1539 | { | 1543 | { |
1540 | success = dp.unpackVector3(pos_key.mPosition, "pos"); | 1544 | success = dp.unpackVector3(pos_key.mPosition, "pos"); |
1545 | if(!(pos_key.mPosition.isFinite())) | ||
1546 | { | ||
1547 | return FALSE; | ||
1548 | } | ||
1541 | } | 1549 | } |
1542 | else | 1550 | else |
1543 | { | 1551 | { |
@@ -1644,6 +1652,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1644 | str = (char*)bin_data; | 1652 | str = (char*)bin_data; |
1645 | constraintp->mSourceConstraintVolume = mCharacter->getCollisionVolumeID(str); | 1653 | constraintp->mSourceConstraintVolume = mCharacter->getCollisionVolumeID(str); |
1646 | 1654 | ||
1655 | if(constraintp->mSourceConstraintVolume == -1) | ||
1656 | { | ||
1657 | llwarns << "can't find a valid source collision volume." << llendl; | ||
1658 | delete constraintp; | ||
1659 | return FALSE; | ||
1660 | } | ||
1661 | |||
1647 | if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset")) | 1662 | if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset")) |
1648 | { | 1663 | { |
1649 | llwarns << "can't read constraint source offset" << llendl; | 1664 | llwarns << "can't read constraint source offset" << llendl; |
@@ -1676,6 +1691,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) | |||
1676 | { | 1691 | { |
1677 | constraintp->mConstraintTargetType = CONSTRAINT_TARGET_TYPE_BODY; | 1692 | constraintp->mConstraintTargetType = CONSTRAINT_TARGET_TYPE_BODY; |
1678 | constraintp->mTargetConstraintVolume = mCharacter->getCollisionVolumeID(str); | 1693 | constraintp->mTargetConstraintVolume = mCharacter->getCollisionVolumeID(str); |
1694 | if(constraintp->mTargetConstraintVolume == -1) | ||
1695 | { | ||
1696 | llwarns << "can't find a valid target collision volume." << llendl; | ||
1697 | delete constraintp; | ||
1698 | return FALSE; | ||
1699 | } | ||
1679 | } | 1700 | } |
1680 | 1701 | ||
1681 | if (!dp.unpackVector3(constraintp->mTargetConstraintOffset, "target_offset")) | 1702 | if (!dp.unpackVector3(constraintp->mTargetConstraintOffset, "target_offset")) |