summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/llbvhloader.cpp13
-rw-r--r--indra/llcharacter/llbvhloader.h7
-rw-r--r--indra/llcharacter/llgesture.cpp2
-rw-r--r--indra/llcharacter/lljointsolverrp3.cpp2
4 files changed, 20 insertions, 4 deletions
diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp
index 24391eb8f3..3dd54b4760 100644
--- a/indra/llcharacter/llbvhloader.cpp
+++ b/indra/llcharacter/llbvhloader.cpp
@@ -91,7 +91,9 @@ const char *LLBVHLoader::ST_NO_XLT_EASEIN = "Can't get easeIn values.";
const char *LLBVHLoader::ST_NO_XLT_EASEOUT = "Can't get easeOut values.";
const char *LLBVHLoader::ST_NO_XLT_HAND = "Can't get hand morph value.";
const char *LLBVHLoader::ST_NO_XLT_EMOTE = "Can't read emote name.";
+const char *LLBVHLoader::ST_BAD_ROOT = "Illegal ROOT joint.";
*/
+
//------------------------------------------------------------------------
// find_next_whitespace()
//------------------------------------------------------------------------
@@ -777,6 +779,17 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 &
return E_ST_NO_NAME;
}
+ //---------------------------------------------------------------
+ // we require the root joint be "hip" - DEV-26188
+ //---------------------------------------------------------------
+ const char* FORCED_ROOT_NAME = "hip";
+ if ( (mJoints.size() == 0 ) && ( !strstr(jointName, FORCED_ROOT_NAME) ) )
+ {
+ strncpy(error_text, line.c_str(), 127); /* Flawfinder: ignore */
+ return E_ST_BAD_ROOT;
+ }
+
+
//----------------------------------------------------------------
// add a set of keyframes for this joint
//----------------------------------------------------------------
diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h
index ecdfc95478..85ab035e61 100644
--- a/indra/llcharacter/llbvhloader.h
+++ b/indra/llcharacter/llbvhloader.h
@@ -216,7 +216,8 @@ typedef enum e_load_status
E_ST_NO_XLT_EASEIN,
E_ST_NO_XLT_EASEOUT,
E_ST_NO_XLT_HAND,
- E_ST_NO_XLT_EMOTE
+ E_ST_NO_XLT_EMOTE,
+ E_ST_BAD_ROOT
} ELoadStatus;
//------------------------------------------------------------------------
@@ -235,7 +236,7 @@ public:
/*
// Status Codes
- typedef const char *Status;
+ typedef const char *status_t;
static const char *ST_OK;
static const char *ST_EOF;
static const char *ST_NO_CONSTRAINT;
@@ -267,6 +268,7 @@ public:
static const char *ST_NO_XLT_EASEOUT;
static const char *ST_NO_XLT_HAND;
static const char *ST_NO_XLT_EMOTE;
+ static const char *ST_BAD_ROOT;
*/
// Loads the specified translation table.
ELoadStatus loadTranslationTable(const char *fileName);
@@ -325,6 +327,7 @@ protected:
BOOL mInitialized;
ELoadStatus mStatus;
+
// computed values
F32 mDuration;
};
diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp
index 4ee29fe100..83e4e35b00 100644
--- a/indra/llcharacter/llgesture.cpp
+++ b/indra/llcharacter/llgesture.cpp
@@ -304,7 +304,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask)
}
else
{
- llwarns << "NULL gesture in gesture list (" << i << ")" << llendl
+ llwarns << "NULL gesture in gesture list (" << i << ")" << llendl;
}
}
return FALSE;
diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp
index 0ea92a2d77..6599a76b16 100644
--- a/indra/llcharacter/lljointsolverrp3.cpp
+++ b/indra/llcharacter/lljointsolverrp3.cpp
@@ -211,7 +211,7 @@ void LLJointSolverRP3::solve()
//-------------------------------------------------------------------------
LLVector3 abacCompOrthoVec = abVec - acVec * ((abVec * acVec)/(acVec * acVec));
-// llinfos << "abacCompOrthoVec : " << abacCompOrthoVec << llendl
+// llinfos << "abacCompOrthoVec : " << abacCompOrthoVec << llendl;
//-------------------------------------------------------------------------
// compute the normal of the original ABC plane (and store for later)