aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcharacter
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llcharacter')
-rw-r--r--linden/indra/llcharacter/CMakeLists.txt1
-rw-r--r--linden/indra/llcharacter/llanimationstates.cpp15
-rw-r--r--linden/indra/llcharacter/llanimationstates.h3
-rw-r--r--linden/indra/llcharacter/llbvhconsts.h52
-rw-r--r--linden/indra/llcharacter/llbvhloader.cpp12
-rw-r--r--linden/indra/llcharacter/llbvhloader.h11
-rw-r--r--linden/indra/llcharacter/llcharacter.cpp3
-rw-r--r--linden/indra/llcharacter/llcharacter.h3
-rw-r--r--linden/indra/llcharacter/lleditingmotion.cpp3
-rw-r--r--linden/indra/llcharacter/lleditingmotion.h3
-rw-r--r--linden/indra/llcharacter/llgesture.cpp3
-rw-r--r--linden/indra/llcharacter/llgesture.h3
-rw-r--r--linden/indra/llcharacter/llhandmotion.cpp3
-rw-r--r--linden/indra/llcharacter/llhandmotion.h3
-rw-r--r--linden/indra/llcharacter/llheadrotmotion.cpp3
-rw-r--r--linden/indra/llcharacter/llheadrotmotion.h3
-rw-r--r--linden/indra/llcharacter/lljoint.cpp3
-rw-r--r--linden/indra/llcharacter/lljoint.h3
-rw-r--r--linden/indra/llcharacter/lljointsolverrp3.cpp3
-rw-r--r--linden/indra/llcharacter/lljointsolverrp3.h3
-rw-r--r--linden/indra/llcharacter/lljointstate.h3
-rw-r--r--linden/indra/llcharacter/llkeyframefallmotion.cpp3
-rw-r--r--linden/indra/llcharacter/llkeyframefallmotion.h3
-rw-r--r--linden/indra/llcharacter/llkeyframemotion.cpp110
-rw-r--r--linden/indra/llcharacter/llkeyframemotion.h20
-rw-r--r--linden/indra/llcharacter/llkeyframemotionparam.cpp10
-rw-r--r--linden/indra/llcharacter/llkeyframemotionparam.h3
-rw-r--r--linden/indra/llcharacter/llkeyframestandmotion.cpp3
-rw-r--r--linden/indra/llcharacter/llkeyframestandmotion.h3
-rw-r--r--linden/indra/llcharacter/llkeyframewalkmotion.cpp3
-rw-r--r--linden/indra/llcharacter/llkeyframewalkmotion.h3
-rw-r--r--linden/indra/llcharacter/llmotion.cpp3
-rw-r--r--linden/indra/llcharacter/llmotion.h3
-rw-r--r--linden/indra/llcharacter/llmotioncontroller.cpp3
-rw-r--r--linden/indra/llcharacter/llmotioncontroller.h3
-rw-r--r--linden/indra/llcharacter/llmultigesture.cpp3
-rw-r--r--linden/indra/llcharacter/llmultigesture.h5
-rw-r--r--linden/indra/llcharacter/llpose.cpp3
-rw-r--r--linden/indra/llcharacter/llpose.h3
-rw-r--r--linden/indra/llcharacter/llstatemachine.cpp9
-rw-r--r--linden/indra/llcharacter/llstatemachine.h3
-rw-r--r--linden/indra/llcharacter/lltargetingmotion.cpp3
-rw-r--r--linden/indra/llcharacter/lltargetingmotion.h3
-rw-r--r--linden/indra/llcharacter/llvisualparam.cpp3
-rw-r--r--linden/indra/llcharacter/llvisualparam.h3
45 files changed, 256 insertions, 94 deletions
diff --git a/linden/indra/llcharacter/CMakeLists.txt b/linden/indra/llcharacter/CMakeLists.txt
index 6301062..612229d 100644
--- a/linden/indra/llcharacter/CMakeLists.txt
+++ b/linden/indra/llcharacter/CMakeLists.txt
@@ -46,6 +46,7 @@ set(llcharacter_HEADER_FILES
46 46
47 llanimationstates.h 47 llanimationstates.h
48 llbvhloader.h 48 llbvhloader.h
49 llbvhconsts.h
49 llcharacter.h 50 llcharacter.h
50 lleditingmotion.h 51 lleditingmotion.h
51 llgesture.h 52 llgesture.h
diff --git a/linden/indra/llcharacter/llanimationstates.cpp b/linden/indra/llcharacter/llanimationstates.cpp
index 97c282e..365fb67 100644
--- a/linden/indra/llcharacter/llanimationstates.cpp
+++ b/linden/indra/llcharacter/llanimationstates.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -39,19 +40,19 @@
39#include "llstring.h" 40#include "llstring.h"
40 41
41LLUUID AGENT_WALK_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_CROUCHWALK, ANIM_AGENT_TURNLEFT, ANIM_AGENT_TURNRIGHT}; 42LLUUID AGENT_WALK_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_CROUCHWALK, ANIM_AGENT_TURNLEFT, ANIM_AGENT_TURNRIGHT};
42S32 NUM_AGENT_WALK_ANIMS = sizeof(AGENT_WALK_ANIMS) / sizeof(LLUUID); 43S32 NUM_AGENT_WALK_ANIMS = LL_ARRAY_SIZE(AGENT_WALK_ANIMS);
43 44
44LLUUID AGENT_GUN_HOLD_ANIMS[] = {ANIM_AGENT_HOLD_RIFLE_R, ANIM_AGENT_HOLD_HANDGUN_R, ANIM_AGENT_HOLD_BAZOOKA_R, ANIM_AGENT_HOLD_BOW_L}; 45LLUUID AGENT_GUN_HOLD_ANIMS[] = {ANIM_AGENT_HOLD_RIFLE_R, ANIM_AGENT_HOLD_HANDGUN_R, ANIM_AGENT_HOLD_BAZOOKA_R, ANIM_AGENT_HOLD_BOW_L};
45S32 NUM_AGENT_GUN_HOLD_ANIMS = sizeof(AGENT_GUN_HOLD_ANIMS) / sizeof(LLUUID); 46S32 NUM_AGENT_GUN_HOLD_ANIMS = LL_ARRAY_SIZE(AGENT_GUN_HOLD_ANIMS);
46 47
47LLUUID AGENT_GUN_AIM_ANIMS[] = {ANIM_AGENT_AIM_RIFLE_R, ANIM_AGENT_AIM_HANDGUN_R, ANIM_AGENT_AIM_BAZOOKA_R, ANIM_AGENT_AIM_BOW_L}; 48LLUUID AGENT_GUN_AIM_ANIMS[] = {ANIM_AGENT_AIM_RIFLE_R, ANIM_AGENT_AIM_HANDGUN_R, ANIM_AGENT_AIM_BAZOOKA_R, ANIM_AGENT_AIM_BOW_L};
48S32 NUM_AGENT_GUN_AIM_ANIMS = sizeof(AGENT_GUN_AIM_ANIMS) / sizeof(LLUUID); 49S32 NUM_AGENT_GUN_AIM_ANIMS = LL_ARRAY_SIZE(AGENT_GUN_AIM_ANIMS);
49 50
50LLUUID AGENT_NO_ROTATE_ANIMS[] = {ANIM_AGENT_SIT_GROUND, ANIM_AGENT_SIT_GROUND_CONSTRAINED, ANIM_AGENT_STANDUP}; 51LLUUID AGENT_NO_ROTATE_ANIMS[] = {ANIM_AGENT_SIT_GROUND, ANIM_AGENT_SIT_GROUND_CONSTRAINED, ANIM_AGENT_STANDUP};
51S32 NUM_AGENT_NO_ROTATE_ANIMS = sizeof(AGENT_NO_ROTATE_ANIMS) / sizeof(LLUUID); 52S32 NUM_AGENT_NO_ROTATE_ANIMS = LL_ARRAY_SIZE(AGENT_NO_ROTATE_ANIMS);
52 53
53LLUUID AGENT_STAND_ANIMS[] = {ANIM_AGENT_STAND, ANIM_AGENT_STAND_1, ANIM_AGENT_STAND_2, ANIM_AGENT_STAND_3, ANIM_AGENT_STAND_4}; 54LLUUID AGENT_STAND_ANIMS[] = {ANIM_AGENT_STAND, ANIM_AGENT_STAND_1, ANIM_AGENT_STAND_2, ANIM_AGENT_STAND_3, ANIM_AGENT_STAND_4};
54S32 NUM_AGENT_STAND_ANIMS = sizeof(AGENT_STAND_ANIMS) / sizeof(LLUUID); 55S32 NUM_AGENT_STAND_ANIMS = LL_ARRAY_SIZE(AGENT_STAND_ANIMS);
55 56
56 57
57LLAnimationLibrary gAnimLibrary; 58LLAnimationLibrary gAnimLibrary;
@@ -333,7 +334,7 @@ const LLAnimStateEntry gUserAnimStates[] = {
333 LLAnimStateEntry("yes_head", ANIM_AGENT_YES), 334 LLAnimStateEntry("yes_head", ANIM_AGENT_YES),
334}; 335};
335 336
336const S32 gUserAnimStatesCount = sizeof(gUserAnimStates) / sizeof(gUserAnimStates[0]); 337const S32 gUserAnimStatesCount = LL_ARRAY_SIZE(gUserAnimStates);
337 338
338 339
339 340
diff --git a/linden/indra/llcharacter/llanimationstates.h b/linden/indra/llcharacter/llanimationstates.h
index 67786cc..56b24d5 100644
--- a/linden/indra/llcharacter/llanimationstates.h
+++ b/linden/indra/llcharacter/llanimationstates.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llbvhconsts.h b/linden/indra/llcharacter/llbvhconsts.h
new file mode 100644
index 0000000..d5876aa
--- /dev/null
+++ b/linden/indra/llcharacter/llbvhconsts.h
@@ -0,0 +1,52 @@
1/**
2 * @file llbvhconsts.h
3 * @brief Consts and types useful to BVH files and LindenLabAnimation format.
4 *
5 * $LicenseInfo:firstyear=2004&license=viewergpl$
6 *
7 * Copyright (c) 2004-2009, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33#ifndef LL_LLBVHCONSTS_H
34#define LL_LLBVHCONSTS_H
35
36const F32 MAX_ANIM_DURATION = 30.f;
37
38typedef enum e_constraint_type
39 {
40 CONSTRAINT_TYPE_POINT,
41 CONSTRAINT_TYPE_PLANE,
42 NUM_CONSTRAINT_TYPES
43 } EConstraintType;
44
45typedef enum e_constraint_target_type
46 {
47 CONSTRAINT_TARGET_TYPE_BODY,
48 CONSTRAINT_TARGET_TYPE_GROUND,
49 NUM_CONSTRAINT_TARGET_TYPES
50 } EConstraintTargetType;
51
52#endif // LL_LLBVHCONSTS_H
diff --git a/linden/indra/llcharacter/llbvhloader.cpp b/linden/indra/llcharacter/llbvhloader.cpp
index ae6272d..e1f8ce5 100644
--- a/linden/indra/llcharacter/llbvhloader.cpp
+++ b/linden/indra/llcharacter/llbvhloader.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -177,7 +178,9 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
177 //-------------------------------------------------------------------- 178 //--------------------------------------------------------------------
178 std::string path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,fileName); 179 std::string path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,fileName);
179 180
180 apr_file_t *fp = ll_apr_file_open(path, LL_APR_R); 181 LLAPRFile infile ;
182 infile.open(path, LL_APR_R);
183 apr_file_t *fp = infile.getFileHandle();
181 if (!fp) 184 if (!fp)
182 return ST_NO_XLT_FILE; 185 return ST_NO_XLT_FILE;
183 186
@@ -186,8 +189,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
186 //-------------------------------------------------------------------- 189 //--------------------------------------------------------------------
187 // register file to be closed on function exit 190 // register file to be closed on function exit
188 //-------------------------------------------------------------------- 191 //--------------------------------------------------------------------
189 FileCloser fileCloser(fp); 192
190
191 //-------------------------------------------------------------------- 193 //--------------------------------------------------------------------
192 // load header 194 // load header
193 //-------------------------------------------------------------------- 195 //--------------------------------------------------------------------
@@ -617,6 +619,8 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName)
617 } 619 }
618 620
619 } 621 }
622
623 infile.close() ;
620 return ST_OK; 624 return ST_OK;
621} 625}
622 626
diff --git a/linden/indra/llcharacter/llbvhloader.h b/linden/indra/llcharacter/llbvhloader.h
index b65368c..6937b9d 100644
--- a/linden/indra/llcharacter/llbvhloader.h
+++ b/linden/indra/llcharacter/llbvhloader.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -36,9 +37,9 @@
36#include "m3math.h" 37#include "m3math.h"
37#include "llmath.h" 38#include "llmath.h"
38#include "llapr.h" 39#include "llapr.h"
40#include "llbvhconsts.h"
39 41
40const S32 BVH_PARSER_LINE_SIZE = 2048; 42const S32 BVH_PARSER_LINE_SIZE = 2048;
41const F32 MAX_ANIM_DURATION = 30.f;
42class LLDataPacker; 43class LLDataPacker;
43 44
44//------------------------------------------------------------------------ 45//------------------------------------------------------------------------
@@ -131,12 +132,6 @@ struct Joint
131}; 132};
132 133
133 134
134typedef enum e_constraint_type
135{
136 CONSTRAINT_TYPE_POINT,
137 CONSTRAINT_TYPE_PLANE
138} EConstraintType;
139
140struct Constraint 135struct Constraint
141{ 136{
142 char mSourceJointName[16]; /* Flawfinder: ignore */ 137 char mSourceJointName[16]; /* Flawfinder: ignore */
diff --git a/linden/indra/llcharacter/llcharacter.cpp b/linden/indra/llcharacter/llcharacter.cpp
index 04d05e6..6633c65 100644
--- a/linden/indra/llcharacter/llcharacter.cpp
+++ b/linden/indra/llcharacter/llcharacter.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llcharacter.h b/linden/indra/llcharacter/llcharacter.h
index 8f1f7fb..0112788 100644
--- a/linden/indra/llcharacter/llcharacter.h
+++ b/linden/indra/llcharacter/llcharacter.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lleditingmotion.cpp b/linden/indra/llcharacter/lleditingmotion.cpp
index a2d126a..913be27 100644
--- a/linden/indra/llcharacter/lleditingmotion.cpp
+++ b/linden/indra/llcharacter/lleditingmotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lleditingmotion.h b/linden/indra/llcharacter/lleditingmotion.h
index 218d959..4a83d4b 100644
--- a/linden/indra/llcharacter/lleditingmotion.h
+++ b/linden/indra/llcharacter/lleditingmotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llgesture.cpp b/linden/indra/llcharacter/llgesture.cpp
index 7c55e92..4ee29fe 100644
--- a/linden/indra/llcharacter/llgesture.cpp
+++ b/linden/indra/llcharacter/llgesture.cpp
@@ -16,7 +16,8 @@
16 * There are special exceptions to the terms and conditions of the GPL as 16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception 17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or 18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 19 * online at
20 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
20 * 21 *
21 * By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llgesture.h b/linden/indra/llcharacter/llgesture.h
index 7ddd46c..d394ab7 100644
--- a/linden/indra/llcharacter/llgesture.h
+++ b/linden/indra/llcharacter/llgesture.h
@@ -18,7 +18,8 @@
18 * There are special exceptions to the terms and conditions of the GPL as 18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception 19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or 20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 21 * online at
22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 * 23 *
23 * By copying, modifying or distributing this software, you acknowledge 24 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above, 25 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llhandmotion.cpp b/linden/indra/llcharacter/llhandmotion.cpp
index be25de6..4c97fcd 100644
--- a/linden/indra/llcharacter/llhandmotion.cpp
+++ b/linden/indra/llcharacter/llhandmotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llhandmotion.h b/linden/indra/llcharacter/llhandmotion.h
index df341eb..dcf1696 100644
--- a/linden/indra/llcharacter/llhandmotion.h
+++ b/linden/indra/llcharacter/llhandmotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llheadrotmotion.cpp b/linden/indra/llcharacter/llheadrotmotion.cpp
index 979e320..88cd77f 100644
--- a/linden/indra/llcharacter/llheadrotmotion.cpp
+++ b/linden/indra/llcharacter/llheadrotmotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llheadrotmotion.h b/linden/indra/llcharacter/llheadrotmotion.h
index 0bef35c..97e61ea 100644
--- a/linden/indra/llcharacter/llheadrotmotion.h
+++ b/linden/indra/llcharacter/llheadrotmotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lljoint.cpp b/linden/indra/llcharacter/lljoint.cpp
index c96b8ad..37afcb7 100644
--- a/linden/indra/llcharacter/lljoint.cpp
+++ b/linden/indra/llcharacter/lljoint.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lljoint.h b/linden/indra/llcharacter/lljoint.h
index d4cc16d..b1a0b74 100644
--- a/linden/indra/llcharacter/lljoint.h
+++ b/linden/indra/llcharacter/lljoint.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lljointsolverrp3.cpp b/linden/indra/llcharacter/lljointsolverrp3.cpp
index f7e6dc7..0ea92a2 100644
--- a/linden/indra/llcharacter/lljointsolverrp3.cpp
+++ b/linden/indra/llcharacter/lljointsolverrp3.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lljointsolverrp3.h b/linden/indra/llcharacter/lljointsolverrp3.h
index 7d98cd8..75f9f9e 100644
--- a/linden/indra/llcharacter/lljointsolverrp3.h
+++ b/linden/indra/llcharacter/lljointsolverrp3.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lljointstate.h b/linden/indra/llcharacter/lljointstate.h
index 7b35ad9..16ad0e1 100644
--- a/linden/indra/llcharacter/lljointstate.h
+++ b/linden/indra/llcharacter/lljointstate.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llkeyframefallmotion.cpp b/linden/indra/llcharacter/llkeyframefallmotion.cpp
index 92f6505..15ad1b9 100644
--- a/linden/indra/llcharacter/llkeyframefallmotion.cpp
+++ b/linden/indra/llcharacter/llkeyframefallmotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llkeyframefallmotion.h b/linden/indra/llcharacter/llkeyframefallmotion.h
index 40a50bf..495be97 100644
--- a/linden/indra/llcharacter/llkeyframefallmotion.h
+++ b/linden/indra/llcharacter/llkeyframefallmotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llkeyframemotion.cpp b/linden/indra/llcharacter/llkeyframemotion.cpp
index 212020b..46dee09 100644
--- a/linden/indra/llcharacter/llkeyframemotion.cpp
+++ b/linden/indra/llcharacter/llkeyframemotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -861,7 +862,7 @@ void LLKeyframeMotion::activateConstraint(JointConstraint* constraint)
861 S32 joint_num; 862 S32 joint_num;
862 863
863 // grab ground position if we need to 864 // grab ground position if we need to
864 if (shared_data->mConstraintTargetType == TYPE_GROUND) 865 if (shared_data->mConstraintTargetType == CONSTRAINT_TARGET_TYPE_GROUND)
865 { 866 {
866 LLVector3 source_pos = mCharacter->getVolumePos(shared_data->mSourceConstraintVolume, shared_data->mSourceConstraintOffset); 867 LLVector3 source_pos = mCharacter->getVolumePos(shared_data->mSourceConstraintVolume, shared_data->mSourceConstraintOffset);
867 LLVector3 ground_pos_agent; 868 LLVector3 ground_pos_agent;
@@ -888,7 +889,7 @@ void LLKeyframeMotion::deactivateConstraint(JointConstraint *constraintp)
888 constraintp->mSourceVolume->mUpdateXform = FALSE; 889 constraintp->mSourceVolume->mUpdateXform = FALSE;
889 } 890 }
890 891
891 if (!constraintp->mSharedData->mConstraintTargetType == TYPE_GROUND) 892 if (!constraintp->mSharedData->mConstraintTargetType == CONSTRAINT_TARGET_TYPE_GROUND)
892 { 893 {
893 if (constraintp->mTargetVolume) 894 if (constraintp->mTargetVolume)
894 { 895 {
@@ -958,11 +959,11 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
958 959
959 switch(shared_data->mConstraintTargetType) 960 switch(shared_data->mConstraintTargetType)
960 { 961 {
961 case TYPE_GROUND: 962 case CONSTRAINT_TARGET_TYPE_GROUND:
962 target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos); 963 target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos);
963// llinfos << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl; 964// llinfos << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl;
964 break; 965 break;
965 case TYPE_BODY: 966 case CONSTRAINT_TARGET_TYPE_BODY:
966 target_pos = mCharacter->getVolumePos(shared_data->mTargetConstraintVolume, shared_data->mTargetConstraintOffset); 967 target_pos = mCharacter->getVolumePos(shared_data->mTargetConstraintVolume, shared_data->mTargetConstraintOffset);
967 break; 968 break;
968 default: 969 default:
@@ -973,14 +974,14 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
973 LLJoint *source_jointp = NULL; 974 LLJoint *source_jointp = NULL;
974 LLJoint *target_jointp = NULL; 975 LLJoint *target_jointp = NULL;
975 976
976 if (shared_data->mConstraintType == TYPE_PLANE) 977 if (shared_data->mConstraintType == CONSTRAINT_TYPE_PLANE)
977 { 978 {
978 switch(shared_data->mConstraintTargetType) 979 switch(shared_data->mConstraintTargetType)
979 { 980 {
980 case TYPE_GROUND: 981 case CONSTRAINT_TARGET_TYPE_GROUND:
981 norm = constraint->mGroundNorm; 982 norm = constraint->mGroundNorm;
982 break; 983 break;
983 case TYPE_BODY: 984 case CONSTRAINT_TARGET_TYPE_BODY:
984 target_jointp = mCharacter->findCollisionVolume(shared_data->mTargetConstraintVolume); 985 target_jointp = mCharacter->findCollisionVolume(shared_data->mTargetConstraintVolume);
985 if (target_jointp) 986 if (target_jointp)
986 { 987 {
@@ -1226,6 +1227,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1226 llwarns << "can't read duration" << llendl; 1227 llwarns << "can't read duration" << llendl;
1227 return FALSE; 1228 return FALSE;
1228 } 1229 }
1230
1231 if (mJointMotionList->mDuration > MAX_ANIM_DURATION )
1232 {
1233 llwarns << "invalid animation duration" << llendl;
1234 return FALSE;
1235 }
1229 1236
1230 //------------------------------------------------------------------------- 1237 //-------------------------------------------------------------------------
1231 // get emote (optional) 1238 // get emote (optional)
@@ -1281,6 +1288,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1281 llwarns << "can't read hand pose" << llendl; 1288 llwarns << "can't read hand pose" << llendl;
1282 return FALSE; 1289 return FALSE;
1283 } 1290 }
1291
1292 if(word > LLHandMotion::NUM_HAND_POSES)
1293 {
1294 llwarns << "invalid LLHandMotion::eHandPose index: " << word << llendl;
1295 return FALSE;
1296 }
1297
1284 mJointMotionList->mHandPose = (LLHandMotion::eHandPose)word; 1298 mJointMotionList->mHandPose = (LLHandMotion::eHandPose)word;
1285 1299
1286 //------------------------------------------------------------------------- 1300 //-------------------------------------------------------------------------
@@ -1324,7 +1338,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1324 llwarns << "can't read joint name" << llendl; 1338 llwarns << "can't read joint name" << llendl;
1325 return FALSE; 1339 return FALSE;
1326 } 1340 }
1327 1341
1342 if (joint_name == "mScreen" || joint_name == "mRoot")
1343 {
1344 llwarns << "attempted to animate special " << joint_name << " joint" << llendl;
1345 return FALSE;
1346 }
1347
1328 //--------------------------------------------------------------------- 1348 //---------------------------------------------------------------------
1329 // find the corresponding joint 1349 // find the corresponding joint
1330 //--------------------------------------------------------------------- 1350 //---------------------------------------------------------------------
@@ -1408,6 +1428,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1408 } 1428 }
1409 1429
1410 time = U16_to_F32(time_short, 0.f, mJointMotionList->mDuration); 1430 time = U16_to_F32(time_short, 0.f, mJointMotionList->mDuration);
1431
1432 if (time < 0 || time > mJointMotionList->mDuration)
1433 {
1434 llwarns << "invalid frame time" << llendl;
1435 return FALSE;
1436 }
1411 } 1437 }
1412 1438
1413 RotationKey rot_key; 1439 RotationKey rot_key;
@@ -1437,6 +1463,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1437 rot_key.mRotation.unpackFromVector3(rot_vec); 1463 rot_key.mRotation.unpackFromVector3(rot_vec);
1438 } 1464 }
1439 1465
1466 if( !(rot_key.mRotation.isFinite()) )
1467 {
1468 llwarns << "non-finite angle in rotation key" << llendl;
1469 success = FALSE;
1470 }
1471
1440 if (!success) 1472 if (!success)
1441 { 1473 {
1442 llwarns << "can't read rotation key (" << k << ")" << llendl; 1474 llwarns << "can't read rotation key (" << k << ")" << llendl;
@@ -1508,7 +1540,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1508 pos_key.mPosition.mV[VY] = U16_to_F32(y, -LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET); 1540 pos_key.mPosition.mV[VY] = U16_to_F32(y, -LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET);
1509 pos_key.mPosition.mV[VZ] = U16_to_F32(z, -LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET); 1541 pos_key.mPosition.mV[VZ] = U16_to_F32(z, -LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET);
1510 } 1542 }
1511 1543
1544 if( !(pos_key.mPosition.isFinite()) )
1545 {
1546 llwarns << "non-finite position in key" << llendl;
1547 success = FALSE;
1548 }
1549
1512 if (!success) 1550 if (!success)
1513 { 1551 {
1514 llwarns << "can't read position key (" << k << ")" << llendl; 1552 llwarns << "can't read position key (" << k << ")" << llendl;
@@ -1538,7 +1576,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1538 1576
1539 if (num_constraints > MAX_CONSTRAINTS) 1577 if (num_constraints > MAX_CONSTRAINTS)
1540 { 1578 {
1541 llwarns << "Too many constraints...ignoring" << llendl; 1579 llwarns << "Too many constraints... ignoring" << llendl;
1542 } 1580 }
1543 else 1581 else
1544 { 1582 {
@@ -1560,12 +1598,26 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1560 } 1598 }
1561 constraintp->mChainLength = (S32) byte; 1599 constraintp->mChainLength = (S32) byte;
1562 1600
1601 if((U32)constraintp->mChainLength > mJointMotionList->getNumJointMotions())
1602 {
1603 llwarns << "invalid constraint chain length" << llendl;
1604 delete constraintp;
1605 return FALSE;
1606 }
1607
1563 if (!dp.unpackU8(byte, "constraint_type")) 1608 if (!dp.unpackU8(byte, "constraint_type"))
1564 { 1609 {
1565 llwarns << "can't read constraint type" << llendl; 1610 llwarns << "can't read constraint type" << llendl;
1566 delete constraintp; 1611 delete constraintp;
1567 return FALSE; 1612 return FALSE;
1568 } 1613 }
1614
1615 if( byte >= NUM_CONSTRAINT_TYPES )
1616 {
1617 llwarns << "invalid constraint type" << llendl;
1618 delete constraintp;
1619 return FALSE;
1620 }
1569 constraintp->mConstraintType = (EConstraintType)byte; 1621 constraintp->mConstraintType = (EConstraintType)byte;
1570 1622
1571 const S32 BIN_DATA_LENGTH = 16; 1623 const S32 BIN_DATA_LENGTH = 16;
@@ -1587,7 +1639,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1587 delete constraintp; 1639 delete constraintp;
1588 return FALSE; 1640 return FALSE;
1589 } 1641 }
1590 1642
1643 if( !(constraintp->mSourceConstraintOffset.isFinite()) )
1644 {
1645 llwarns << "non-finite constraint source offset" << llendl;
1646 delete constraintp;
1647 return FALSE;
1648 }
1649
1591 if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume")) 1650 if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume"))
1592 { 1651 {
1593 llwarns << "can't read target volume name" << llendl; 1652 llwarns << "can't read target volume name" << llendl;
@@ -1600,11 +1659,11 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1600 if (str == "GROUND") 1659 if (str == "GROUND")
1601 { 1660 {
1602 // constrain to ground 1661 // constrain to ground
1603 constraintp->mConstraintTargetType = TYPE_GROUND; 1662 constraintp->mConstraintTargetType = CONSTRAINT_TARGET_TYPE_GROUND;
1604 } 1663 }
1605 else 1664 else
1606 { 1665 {
1607 constraintp->mConstraintTargetType = TYPE_BODY; 1666 constraintp->mConstraintTargetType = CONSTRAINT_TARGET_TYPE_BODY;
1608 constraintp->mTargetConstraintVolume = mCharacter->getCollisionVolumeID(str); 1667 constraintp->mTargetConstraintVolume = mCharacter->getCollisionVolumeID(str);
1609 } 1668 }
1610 1669
@@ -1615,6 +1674,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1615 return FALSE; 1674 return FALSE;
1616 } 1675 }
1617 1676
1677 if( !(constraintp->mTargetConstraintOffset.isFinite()) )
1678 {
1679 llwarns << "non-finite constraint target offset" << llendl;
1680 delete constraintp;
1681 return FALSE;
1682 }
1683
1618 if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir")) 1684 if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir"))
1619 { 1685 {
1620 llwarns << "can't read constraint target direction" << llendl; 1686 llwarns << "can't read constraint target direction" << llendl;
@@ -1622,6 +1688,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1622 return FALSE; 1688 return FALSE;
1623 } 1689 }
1624 1690
1691 if( !(constraintp->mTargetConstraintDir.isFinite()) )
1692 {
1693 llwarns << "non-finite constraint target direction" << llendl;
1694 delete constraintp;
1695 return FALSE;
1696 }
1697
1625 if (!constraintp->mTargetConstraintDir.isExactlyZero()) 1698 if (!constraintp->mTargetConstraintDir.isExactlyZero())
1626 { 1699 {
1627 constraintp->mUseTargetOffset = TRUE; 1700 constraintp->mUseTargetOffset = TRUE;
@@ -1685,8 +1758,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
1685 break; 1758 break;
1686 } 1759 }
1687 } 1760 }
1761 if (constraintp->mJointStateIndices[i] < 0 )
1762 {
1763 llwarns << "No joint index for constraint " << i << llendl;
1764 delete constraintp;
1765 return FALSE;
1766 }
1688 } 1767 }
1689
1690 } 1768 }
1691 } 1769 }
1692 1770
@@ -1776,7 +1854,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
1776 mCharacter->findCollisionVolume(shared_constraintp->mSourceConstraintVolume)->getName().c_str()); 1854 mCharacter->findCollisionVolume(shared_constraintp->mSourceConstraintVolume)->getName().c_str());
1777 success &= dp.packBinaryDataFixed((U8*)volume_name, 16, "source_volume"); 1855 success &= dp.packBinaryDataFixed((U8*)volume_name, 16, "source_volume");
1778 success &= dp.packVector3(shared_constraintp->mSourceConstraintOffset, "source_offset"); 1856 success &= dp.packVector3(shared_constraintp->mSourceConstraintOffset, "source_offset");
1779 if (shared_constraintp->mConstraintTargetType == TYPE_GROUND) 1857 if (shared_constraintp->mConstraintTargetType == CONSTRAINT_TARGET_TYPE_GROUND)
1780 { 1858 {
1781 snprintf(volume_name,sizeof(volume_name), "%s", "GROUND"); /* Flawfinder: ignore */ 1859 snprintf(volume_name,sizeof(volume_name), "%s", "GROUND"); /* Flawfinder: ignore */
1782 } 1860 }
diff --git a/linden/indra/llcharacter/llkeyframemotion.h b/linden/indra/llcharacter/llkeyframemotion.h
index 3c78090..7e8c844 100644
--- a/linden/indra/llcharacter/llkeyframemotion.h
+++ b/linden/indra/llcharacter/llkeyframemotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -47,6 +48,7 @@
47#include "v3dmath.h" 48#include "v3dmath.h"
48#include "v3math.h" 49#include "v3math.h"
49#include "llapr.h" 50#include "llapr.h"
51#include "llbvhconsts.h"
50 52
51class LLKeyframeDataCache; 53class LLKeyframeDataCache;
52class LLVFS; 54class LLVFS;
@@ -197,18 +199,6 @@ public:
197 199
198 static void flushKeyframeCache(); 200 static void flushKeyframeCache();
199 201
200 typedef enum e_constraint_type
201 {
202 TYPE_POINT,
203 TYPE_PLANE
204 } EConstraintType;
205
206 typedef enum e_constraint_target_type
207 {
208 TYPE_BODY,
209 TYPE_GROUND
210 } EConstraintTargetType;
211
212protected: 202protected:
213 //------------------------------------------------------------------------- 203 //-------------------------------------------------------------------------
214 // JointConstraintSharedData 204 // JointConstraintSharedData
@@ -223,8 +213,8 @@ protected:
223 mEaseOutStartTime(0.f), 213 mEaseOutStartTime(0.f),
224 mEaseOutStopTime(0.f), 214 mEaseOutStopTime(0.f),
225 mUseTargetOffset(FALSE), 215 mUseTargetOffset(FALSE),
226 mConstraintType(TYPE_POINT), 216 mConstraintType(CONSTRAINT_TYPE_POINT),
227 mConstraintTargetType(TYPE_BODY), 217 mConstraintTargetType(CONSTRAINT_TARGET_TYPE_BODY),
228 mSourceConstraintVolume(0), 218 mSourceConstraintVolume(0),
229 mTargetConstraintVolume(0), 219 mTargetConstraintVolume(0),
230 mJointStateIndices(NULL) 220 mJointStateIndices(NULL)
diff --git a/linden/indra/llcharacter/llkeyframemotionparam.cpp b/linden/indra/llcharacter/llkeyframemotionparam.cpp
index 385a848..a9c1f6f 100644
--- a/linden/indra/llcharacter/llkeyframemotionparam.cpp
+++ b/linden/indra/llcharacter/llkeyframemotionparam.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -353,7 +354,9 @@ BOOL LLKeyframeMotionParam::loadMotions()
353 // open the file 354 // open the file
354 //------------------------------------------------------------------------- 355 //-------------------------------------------------------------------------
355 S32 fileSize = 0; 356 S32 fileSize = 0;
356 apr_file_t* fp = ll_apr_file_open(path, LL_APR_R, &fileSize); 357 LLAPRFile infile ;
358 infile.open(path, LL_APR_R, NULL, &fileSize);
359 apr_file_t* fp = infile.getFileHandle() ;
357 if (!fp || fileSize == 0) 360 if (!fp || fileSize == 0)
358 { 361 {
359 llinfos << "ERROR: can't open: " << path << llendl; 362 llinfos << "ERROR: can't open: " << path << llendl;
@@ -365,7 +368,6 @@ BOOL LLKeyframeMotionParam::loadMotions()
365 if ( !text ) 368 if ( !text )
366 { 369 {
367 llinfos << "ERROR: can't allocated keyframe text buffer." << llendl; 370 llinfos << "ERROR: can't allocated keyframe text buffer." << llendl;
368 apr_file_close(fp);
369 return FALSE; 371 return FALSE;
370 } 372 }
371 373
@@ -392,7 +394,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
392 //------------------------------------------------------------------------- 394 //-------------------------------------------------------------------------
393 // close the file 395 // close the file
394 //------------------------------------------------------------------------- 396 //-------------------------------------------------------------------------
395 apr_file_close( fp ); 397 infile.close();
396 398
397 //------------------------------------------------------------------------- 399 //-------------------------------------------------------------------------
398 // check for error 400 // check for error
diff --git a/linden/indra/llcharacter/llkeyframemotionparam.h b/linden/indra/llcharacter/llkeyframemotionparam.h
index 849e869..f74aea2 100644
--- a/linden/indra/llcharacter/llkeyframemotionparam.h
+++ b/linden/indra/llcharacter/llkeyframemotionparam.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llkeyframestandmotion.cpp b/linden/indra/llcharacter/llkeyframestandmotion.cpp
index 21bef08..1d42298 100644
--- a/linden/indra/llcharacter/llkeyframestandmotion.cpp
+++ b/linden/indra/llcharacter/llkeyframestandmotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llkeyframestandmotion.h b/linden/indra/llcharacter/llkeyframestandmotion.h
index 102dcc3..b0500dc 100644
--- a/linden/indra/llcharacter/llkeyframestandmotion.h
+++ b/linden/indra/llcharacter/llkeyframestandmotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llkeyframewalkmotion.cpp b/linden/indra/llcharacter/llkeyframewalkmotion.cpp
index 59c09f2..b5817e5 100644
--- a/linden/indra/llcharacter/llkeyframewalkmotion.cpp
+++ b/linden/indra/llcharacter/llkeyframewalkmotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llkeyframewalkmotion.h b/linden/indra/llcharacter/llkeyframewalkmotion.h
index b836c3c..90dd4db 100644
--- a/linden/indra/llcharacter/llkeyframewalkmotion.h
+++ b/linden/indra/llcharacter/llkeyframewalkmotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llmotion.cpp b/linden/indra/llcharacter/llmotion.cpp
index af9ff58..ce926a3 100644
--- a/linden/indra/llcharacter/llmotion.cpp
+++ b/linden/indra/llcharacter/llmotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llmotion.h b/linden/indra/llcharacter/llmotion.h
index 34bc9c7..d6628fd 100644
--- a/linden/indra/llcharacter/llmotion.h
+++ b/linden/indra/llcharacter/llmotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llmotioncontroller.cpp b/linden/indra/llcharacter/llmotioncontroller.cpp
index 9afb8c7..006d2b5 100644
--- a/linden/indra/llcharacter/llmotioncontroller.cpp
+++ b/linden/indra/llcharacter/llmotioncontroller.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llmotioncontroller.h b/linden/indra/llcharacter/llmotioncontroller.h
index 51b4018..9271483 100644
--- a/linden/indra/llcharacter/llmotioncontroller.h
+++ b/linden/indra/llcharacter/llmotioncontroller.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llmultigesture.cpp b/linden/indra/llcharacter/llmultigesture.cpp
index c9285a1..7fe21db 100644
--- a/linden/indra/llcharacter/llmultigesture.cpp
+++ b/linden/indra/llcharacter/llmultigesture.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llmultigesture.h b/linden/indra/llcharacter/llmultigesture.h
index e1a6019..eb15f60 100644
--- a/linden/indra/llcharacter/llmultigesture.h
+++ b/linden/indra/llcharacter/llmultigesture.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -107,6 +108,8 @@ public:
107}; 108};
108 109
109 110
111// Order must match the library_list in floater_preview_gesture.xml!
112
110enum EStepType 113enum EStepType
111{ 114{
112 STEP_ANIMATION = 0, 115 STEP_ANIMATION = 0,
diff --git a/linden/indra/llcharacter/llpose.cpp b/linden/indra/llcharacter/llpose.cpp
index f7fee28..93255d7 100644
--- a/linden/indra/llcharacter/llpose.cpp
+++ b/linden/indra/llcharacter/llpose.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llpose.h b/linden/indra/llcharacter/llpose.h
index ebf6a87..5698f21 100644
--- a/linden/indra/llcharacter/llpose.h
+++ b/linden/indra/llcharacter/llpose.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llstatemachine.cpp b/linden/indra/llcharacter/llstatemachine.cpp
index 5643603..73c6951 100644
--- a/linden/indra/llcharacter/llstatemachine.cpp
+++ b/linden/indra/llcharacter/llstatemachine.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -208,7 +209,9 @@ LLFSMState* LLStateDiagram::getState(U32 state_id)
208 209
209BOOL LLStateDiagram::saveDotFile(const std::string& filename) 210BOOL LLStateDiagram::saveDotFile(const std::string& filename)
210{ 211{
211 apr_file_t* dot_file = ll_apr_file_open(filename, LL_APR_W); 212 LLAPRFile outfile ;
213 outfile.open(filename, LL_APR_W);
214 apr_file_t* dot_file = outfile.getFileHandle() ;
212 215
213 if (!dot_file) 216 if (!dot_file)
214 { 217 {
@@ -257,8 +260,6 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename)
257 260
258 apr_file_printf(dot_file, "}\n"); 261 apr_file_printf(dot_file, "}\n");
259 262
260 apr_file_close(dot_file);
261
262 return TRUE; 263 return TRUE;
263} 264}
264 265
diff --git a/linden/indra/llcharacter/llstatemachine.h b/linden/indra/llcharacter/llstatemachine.h
index 9d9de9b..42e4995 100644
--- a/linden/indra/llcharacter/llstatemachine.h
+++ b/linden/indra/llcharacter/llstatemachine.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lltargetingmotion.cpp b/linden/indra/llcharacter/lltargetingmotion.cpp
index 07850b2..a330b22 100644
--- a/linden/indra/llcharacter/lltargetingmotion.cpp
+++ b/linden/indra/llcharacter/lltargetingmotion.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/lltargetingmotion.h b/linden/indra/llcharacter/lltargetingmotion.h
index 07a2a99..1ec9f80 100644
--- a/linden/indra/llcharacter/lltargetingmotion.h
+++ b/linden/indra/llcharacter/lltargetingmotion.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llvisualparam.cpp b/linden/indra/llcharacter/llvisualparam.cpp
index 4a4ad8b..d7a144e 100644
--- a/linden/indra/llcharacter/llvisualparam.cpp
+++ b/linden/indra/llcharacter/llvisualparam.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
diff --git a/linden/indra/llcharacter/llvisualparam.h b/linden/indra/llcharacter/llvisualparam.h
index 13850b6..3a0c1bb 100644
--- a/linden/indra/llcharacter/llvisualparam.h
+++ b/linden/indra/llcharacter/llvisualparam.h
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,