aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcharacter/llcharacter.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcharacter/llcharacter.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/linden/indra/llcharacter/llcharacter.cpp b/linden/indra/llcharacter/llcharacter.cpp
index 45f692c..6e9327f 100644
--- a/linden/indra/llcharacter/llcharacter.cpp
+++ b/linden/indra/llcharacter/llcharacter.cpp
@@ -38,13 +38,7 @@
38 38
39LLStringTable LLCharacter::sVisualParamNames(1024); 39LLStringTable LLCharacter::sVisualParamNames(1024);
40 40
41// helper functions 41std::vector< LLCharacter* > LLCharacter::sInstances;
42BOOL larger_screen_area( LLCharacter* data_new, LLCharacter* data_tested )
43{
44 return data_new->getPixelArea() > data_tested->getPixelArea();
45}
46
47LLLinkedList< LLCharacter > LLCharacter::sInstances( larger_screen_area );
48 42
49 43
50//----------------------------------------------------------------------------- 44//-----------------------------------------------------------------------------
@@ -59,7 +53,7 @@ LLCharacter::LLCharacter()
59 mSkeletonSerialNum( 0 ) 53 mSkeletonSerialNum( 0 )
60{ 54{
61 mMotionController.setCharacter( this ); 55 mMotionController.setCharacter( this );
62 sInstances.addData(this); 56 sInstances.push_back(this);
63 mPauseRequest = new LLPauseRequestHandle(); 57 mPauseRequest = new LLPauseRequestHandle();
64} 58}
65 59
@@ -76,7 +70,11 @@ LLCharacter::~LLCharacter()
76 { 70 {
77 delete param; 71 delete param;
78 } 72 }
79 sInstances.removeData(this); 73 std::vector<LLCharacter*>::iterator iter = std::find(sInstances.begin(), sInstances.end(), this);
74 if (iter != sInstances.end())
75 {
76 sInstances.erase(iter);
77 }
80} 78}
81 79
82 80
@@ -85,7 +83,7 @@ LLCharacter::~LLCharacter()
85//----------------------------------------------------------------------------- 83//-----------------------------------------------------------------------------
86LLJoint *LLCharacter::getJoint( const std::string &name ) 84LLJoint *LLCharacter::getJoint( const std::string &name )
87{ 85{
88 LLJoint *joint = NULL; 86 LLJoint* joint = NULL;
89 87
90 LLJoint *root = getRootJoint(); 88 LLJoint *root = getRootJoint();
91 if (root) 89 if (root)
@@ -202,7 +200,7 @@ void LLCharacter::flushAllMotions()
202//----------------------------------------------------------------------------- 200//-----------------------------------------------------------------------------
203// dumpCharacter() 201// dumpCharacter()
204//----------------------------------------------------------------------------- 202//-----------------------------------------------------------------------------
205void LLCharacter::dumpCharacter( LLJoint *joint ) 203void LLCharacter::dumpCharacter( LLJoint* joint )
206{ 204{
207 // handle top level entry into recursion 205 // handle top level entry into recursion
208 if (joint == NULL) 206 if (joint == NULL)
@@ -217,11 +215,11 @@ void LLCharacter::dumpCharacter( LLJoint *joint )
217 llinfos << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << llendl; 215 llinfos << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << llendl;
218 216
219 // recurse 217 // recurse
220 for ( LLJoint *j = joint->mChildren.getFirstData(); 218 for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin();
221 j != NULL; 219 iter != joint->mChildren.end(); ++iter)
222 j = joint->mChildren.getNextData() )
223 { 220 {
224 dumpCharacter(j); 221 LLJoint* child_joint = *iter;
222 dumpCharacter(child_joint);
225 } 223 }
226} 224}
227 225