aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/doc/contributions.txt3
-rw-r--r--linden/indra/llcharacter/llcharacter.cpp47
-rw-r--r--linden/indra/llcharacter/llcharacter.h13
-rw-r--r--linden/indra/llcharacter/llkeyframemotion.cpp10
-rw-r--r--linden/indra/llcharacter/llkeyframemotionparam.cpp53
-rw-r--r--linden/indra/llcharacter/llkeyframemotionparam.h15
-rw-r--r--linden/indra/llcharacter/llmotion.cpp17
-rw-r--r--linden/indra/llcharacter/llmotion.h25
-rw-r--r--linden/indra/llcharacter/llmotioncontroller.cpp461
-rw-r--r--linden/indra/llcharacter/llmotioncontroller.h58
-rw-r--r--linden/indra/llcommon/llversionviewer.h2
-rwxr-xr-xlinden/indra/llcrashlogger/llcrashlogger.cpp10
-rw-r--r--linden/indra/llimage/llimage.cpp4
-rw-r--r--linden/indra/llrender/llimagegl.cpp8
-rw-r--r--linden/indra/llrender/llimagegl.h3
-rw-r--r--linden/indra/llwindow/llgl.cpp6
-rw-r--r--linden/indra/llwindow/llwindowwin32.cpp3
-rw-r--r--linden/indra/newview/app_settings/settings.xml2
-rw-r--r--linden/indra/newview/gpu_table.txt2
-rw-r--r--linden/indra/newview/llagent.cpp9
-rw-r--r--linden/indra/newview/llappviewer.cpp16
-rw-r--r--linden/indra/newview/llappviewer.h2
-rw-r--r--linden/indra/newview/lldrawable.cpp10
-rw-r--r--linden/indra/newview/lldrawpoolalpha.cpp1
-rw-r--r--linden/indra/newview/lldrawpoolavatar.cpp2
-rw-r--r--linden/indra/newview/lldrawpoolbump.cpp9
-rw-r--r--linden/indra/newview/lldriverparam.cpp1
-rw-r--r--linden/indra/newview/lldriverparam.h3
-rw-r--r--linden/indra/newview/llface.cpp4
-rw-r--r--linden/indra/newview/llface.h3
-rw-r--r--linden/indra/newview/llfloateranimpreview.cpp191
-rw-r--r--linden/indra/newview/llfloateranimpreview.h1
-rw-r--r--linden/indra/newview/llfloateravatarinfo.cpp8
-rw-r--r--linden/indra/newview/llfloatercustomize.h1
-rw-r--r--linden/indra/newview/llfloatergroups.cpp3
-rw-r--r--linden/indra/newview/llhudeffectlookat.cpp6
-rw-r--r--linden/indra/newview/llhudeffectpointat.cpp6
-rw-r--r--linden/indra/newview/llinventoryactions.cpp1
-rw-r--r--linden/indra/newview/llinventorybridge.cpp1
-rw-r--r--linden/indra/newview/llmemoryview.cpp23
-rw-r--r--linden/indra/newview/llmutelist.cpp28
-rw-r--r--linden/indra/newview/llmutelist.h5
-rw-r--r--linden/indra/newview/llpreviewanim.cpp1
-rw-r--r--linden/indra/newview/llselectmgr.cpp9
-rw-r--r--linden/indra/newview/llstartup.cpp16
-rw-r--r--linden/indra/newview/lltexlayer.h1
-rw-r--r--linden/indra/newview/llviewerimagelist.cpp7
-rw-r--r--linden/indra/newview/llviewerjoint.cpp304
-rw-r--r--linden/indra/newview/llviewerjoint.h14
-rw-r--r--linden/indra/newview/llviewerjointattachment.cpp1
-rw-r--r--linden/indra/newview/llviewerjointattachment.h2
-rw-r--r--linden/indra/newview/llviewerjointmesh.cpp2
-rw-r--r--linden/indra/newview/llviewerjointmesh.h2
-rw-r--r--linden/indra/newview/llviewernetwork.cpp11
-rw-r--r--linden/indra/newview/llviewerobjectlist.cpp1
-rw-r--r--linden/indra/newview/llviewerstats.cpp1
-rw-r--r--linden/indra/newview/llviewerwindow.cpp1
-rw-r--r--linden/indra/newview/llvoavatar.cpp142
-rw-r--r--linden/indra/newview/llvoavatar.h7
-rw-r--r--linden/indra/newview/llvoiceclient.h2
-rw-r--r--linden/indra/newview/llwebbrowserctrl.cpp2
-rw-r--r--linden/indra/newview/macview.xcodeproj/project.pbxproj1
-rw-r--r--linden/indra/newview/pipeline.cpp13
-rw-r--r--linden/indra/newview/releasenotes.txt56
-rw-r--r--linden/indra/newview/skins/xui/de/teleport_strings.xml2
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_buy_land.xml8
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_directory.xml7
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_hud.xml2
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_url_entry.xml2
-rw-r--r--linden/indra/newview/skins/xui/en-us/teleport_strings.xml2
-rw-r--r--linden/indra/newview/skins/xui/ja/menu_viewer.xml2
-rw-r--r--linden/indra/newview/skins/xui/ja/teleport_strings.xml2
-rw-r--r--linden/indra/newview/skins/xui/ko/teleport_strings.xml2
73 files changed, 899 insertions, 802 deletions
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index 7c5b54c..d688df6 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -53,6 +53,7 @@ Alissa Sabre
53 VWR-7153 53 VWR-7153
54 VWR-7168 54 VWR-7168
55 VWR-7087 55 VWR-7087
56 VWR-7086
56Angus Boyd 57Angus Boyd
57 VWR-592 58 VWR-592
58Argent Stonecutter 59Argent Stonecutter
@@ -361,6 +362,8 @@ Tharax Ferraris
361Thraxis Epsilon 362Thraxis Epsilon
362 SVC-371 363 SVC-371
363 VWR-383 364 VWR-383
365Wilton Lundquist
366 VWR-7682
364Whoops Babii 367Whoops Babii
365 VWR-631 368 VWR-631
366 VWR-1640 369 VWR-1640
diff --git a/linden/indra/llcharacter/llcharacter.cpp b/linden/indra/llcharacter/llcharacter.cpp
index ad648f8..83487bc 100644
--- a/linden/indra/llcharacter/llcharacter.cpp
+++ b/linden/indra/llcharacter/llcharacter.cpp
@@ -103,11 +103,11 @@ LLJoint *LLCharacter::getJoint( const std::string &name )
103} 103}
104 104
105//----------------------------------------------------------------------------- 105//-----------------------------------------------------------------------------
106// addMotion() 106// registerMotion()
107//----------------------------------------------------------------------------- 107//-----------------------------------------------------------------------------
108BOOL LLCharacter::addMotion( const LLUUID& id, LLMotionConstructor create ) 108BOOL LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create )
109{ 109{
110 return mMotionController.addMotion(id, create); 110 return mMotionController.registerMotion(id, create);
111} 111}
112 112
113//----------------------------------------------------------------------------- 113//-----------------------------------------------------------------------------
@@ -119,7 +119,16 @@ void LLCharacter::removeMotion( const LLUUID& id )
119} 119}
120 120
121//----------------------------------------------------------------------------- 121//-----------------------------------------------------------------------------
122// getMotion() 122// findMotion()
123//-----------------------------------------------------------------------------
124LLMotion* LLCharacter::findMotion( const LLUUID &id )
125{
126 return mMotionController.findMotion( id );
127}
128
129//-----------------------------------------------------------------------------
130// createMotion()
131// NOTE: Always assign the result to a LLPointer!
123//----------------------------------------------------------------------------- 132//-----------------------------------------------------------------------------
124LLMotion* LLCharacter::createMotion( const LLUUID &id ) 133LLMotion* LLCharacter::createMotion( const LLUUID &id )
125{ 134{
@@ -168,26 +177,24 @@ void LLCharacter::requestStopMotion( LLMotion* motion)
168 177
169 178
170//----------------------------------------------------------------------------- 179//-----------------------------------------------------------------------------
171// updateMotion() 180// updateMotions()
172//----------------------------------------------------------------------------- 181//-----------------------------------------------------------------------------
173void LLCharacter::updateMotion(BOOL force_update) 182void LLCharacter::updateMotions(e_update_t update_type)
174{ 183{
175 // unpause if we're forcing an update or 184 LLFastTimer t(LLFastTimer::FTM_UPDATE_ANIMATION);
176 // number of outstanding pause requests has dropped 185 if (update_type == HIDDEN_UPDATE)
177 // to the initial one
178 if (mMotionController.isPaused() &&
179 (force_update || mPauseRequest->getNumRefs() == 1))
180 { 186 {
181 mMotionController.unpause(); 187 mMotionController.updateMotionsMinimal();
182 } 188 }
183 189 else
184 mMotionController.updateMotion();
185
186 // pause once again, after forced update, if there are outstanding
187 // pause requests
188 if (force_update && mPauseRequest->getNumRefs() > 1)
189 { 190 {
190 mMotionController.pause(); 191 // unpause if the number of outstanding pause requests has dropped to the initial one
192 if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1)
193 {
194 mMotionController.unpauseAllMotions();
195 }
196 bool force_update = (update_type == FORCE_UPDATE);
197 mMotionController.updateMotions(force_update);
191 } 198 }
192} 199}
193 200
@@ -499,7 +506,7 @@ void LLCharacter::updateVisualParams()
499 506
500LLAnimPauseRequest LLCharacter::requestPause() 507LLAnimPauseRequest LLCharacter::requestPause()
501{ 508{
502 mMotionController.pause(); 509 mMotionController.pauseAllMotions();
503 return mPauseRequest; 510 return mPauseRequest;
504} 511}
505 512
diff --git a/linden/indra/llcharacter/llcharacter.h b/linden/indra/llcharacter/llcharacter.h
index 7a841ef..ba807bc 100644
--- a/linden/indra/llcharacter/llcharacter.h
+++ b/linden/indra/llcharacter/llcharacter.h
@@ -137,13 +137,16 @@ public:
137 //------------------------------------------------------------------------- 137 //-------------------------------------------------------------------------
138 // registers a motion with the character 138 // registers a motion with the character
139 // returns true if successfull 139 // returns true if successfull
140 BOOL addMotion( const LLUUID& id, LLMotionConstructor create ); 140 BOOL registerMotion( const LLUUID& id, LLMotionConstructor create );
141 141
142 void removeMotion( const LLUUID& id ); 142 void removeMotion( const LLUUID& id );
143 143
144 // returns an instance of a registered motion 144 // returns an instance of a registered motion, creating one if necessary
145 LLMotion* createMotion( const LLUUID &id ); 145 LLMotion* createMotion( const LLUUID &id );
146 146
147 // returns an existing instance of a registered motion
148 LLMotion* findMotion( const LLUUID &id );
149
147 // start a motion 150 // start a motion
148 // returns true if successful, false if an error occurred 151 // returns true if successful, false if an error occurred
149 virtual BOOL startMotion( const LLUUID& id, F32 start_offset = 0.f); 152 virtual BOOL startMotion( const LLUUID& id, F32 start_offset = 0.f);
@@ -161,12 +164,16 @@ public:
161 virtual void requestStopMotion( LLMotion* motion ); 164 virtual void requestStopMotion( LLMotion* motion );
162 165
163 // periodic update function, steps the motion controller 166 // periodic update function, steps the motion controller
164 void updateMotion(BOOL force_update = FALSE); 167 enum e_update_t { NORMAL_UPDATE, HIDDEN_UPDATE, FORCE_UPDATE };
168 void updateMotions(e_update_t update_type);
165 169
166 LLAnimPauseRequest requestPause(); 170 LLAnimPauseRequest requestPause();
167 BOOL areAnimationsPaused() { return mMotionController.isPaused(); } 171 BOOL areAnimationsPaused() { return mMotionController.isPaused(); }
168 void setAnimTimeFactor(F32 factor) { mMotionController.setTimeFactor(factor); } 172 void setAnimTimeFactor(F32 factor) { mMotionController.setTimeFactor(factor); }
169 void setTimeStep(F32 time_step) { mMotionController.setTimeStep(time_step); } 173 void setTimeStep(F32 time_step) { mMotionController.setTimeStep(time_step); }
174
175 LLMotionController& getMotionController() { return mMotionController; }
176
170 // Releases all motion instances which should result in 177 // Releases all motion instances which should result in
171 // no cached references to character joint data. This is 178 // no cached references to character joint data. This is
172 // useful if a character wants to rebuild it's skeleton. 179 // useful if a character wants to rebuild it's skeleton.
diff --git a/linden/indra/llcharacter/llkeyframemotion.cpp b/linden/indra/llcharacter/llkeyframemotion.cpp
index 0138860..34decd6 100644
--- a/linden/indra/llcharacter/llkeyframemotion.cpp
+++ b/linden/indra/llcharacter/llkeyframemotion.cpp
@@ -1977,9 +1977,8 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
1977 1977
1978 LLCharacter* character = *char_iter; 1978 LLCharacter* character = *char_iter;
1979 1979
1980 // create an instance of this motion (it may or may not already exist) 1980 // look for an existing instance of this motion
1981 LLKeyframeMotion* motionp = (LLKeyframeMotion*) character->createMotion(asset_uuid); 1981 LLKeyframeMotion* motionp = (LLKeyframeMotion*) character->findMotion(asset_uuid);
1982
1983 if (motionp) 1982 if (motionp)
1984 { 1983 {
1985 if (0 == status) 1984 if (0 == status)
@@ -2008,7 +2007,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
2008 motionp->mAssetStatus = ASSET_FETCH_FAILED; 2007 motionp->mAssetStatus = ASSET_FETCH_FAILED;
2009 } 2008 }
2010 2009
2011 delete []buffer; 2010 delete[] buffer;
2012 } 2011 }
2013 else 2012 else
2014 { 2013 {
@@ -2018,8 +2017,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
2018 } 2017 }
2019 else 2018 else
2020 { 2019 {
2021 // motionp is NULL 2020 llwarns << "No existing motion for asset data. UUID: " << asset_uuid << llendl;
2022 llwarns << "Failed to createMotion() for asset UUID " << asset_uuid << llendl;
2023 } 2021 }
2024} 2022}
2025 2023
diff --git a/linden/indra/llcharacter/llkeyframemotionparam.cpp b/linden/indra/llcharacter/llkeyframemotionparam.cpp
index 106c02c..0e7388c 100644
--- a/linden/indra/llcharacter/llkeyframemotionparam.cpp
+++ b/linden/indra/llcharacter/llkeyframemotionparam.cpp
@@ -76,7 +76,7 @@ LLKeyframeMotionParam::~LLKeyframeMotionParam()
76 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) 76 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2)
77 { 77 {
78 const ParameterizedMotion& paramMotion = *iter2; 78 const ParameterizedMotion& paramMotion = *iter2;
79 delete paramMotion.first; // note - deletes the structure; ParameterizedMotion pair remains intact 79 delete paramMotion.mMotion;
80 } 80 }
81 motionList.clear(); 81 motionList.clear();
82 } 82 }
@@ -102,32 +102,32 @@ LLMotion::LLMotionInitStatus LLKeyframeMotionParam::onInitialize(LLCharacter *ch
102 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) 102 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2)
103 { 103 {
104 const ParameterizedMotion& paramMotion = *iter2; 104 const ParameterizedMotion& paramMotion = *iter2;
105 LLMotion* motion = paramMotion.mMotion;
106 motion->onInitialize(character);
105 107
106 paramMotion.first->onInitialize(character); 108 if (motion->getDuration() > mEaseInDuration)
107
108 if (paramMotion.first->getDuration() > mEaseInDuration)
109 { 109 {
110 mEaseInDuration = paramMotion.first->getEaseInDuration(); 110 mEaseInDuration = motion->getEaseInDuration();
111 } 111 }
112 112
113 if (paramMotion.first->getEaseOutDuration() > mEaseOutDuration) 113 if (motion->getEaseOutDuration() > mEaseOutDuration)
114 { 114 {
115 mEaseOutDuration = paramMotion.first->getEaseOutDuration(); 115 mEaseOutDuration = motion->getEaseOutDuration();
116 } 116 }
117 117
118 if (paramMotion.first->getDuration() > mDuration) 118 if (motion->getDuration() > mDuration)
119 { 119 {
120 mDuration = paramMotion.first->getDuration(); 120 mDuration = motion->getDuration();
121 } 121 }
122 122
123 if (paramMotion.first->getPriority() > mPriority) 123 if (motion->getPriority() > mPriority)
124 { 124 {
125 mPriority = paramMotion.first->getPriority(); 125 mPriority = motion->getPriority();
126 } 126 }
127 127
128 LLPose *pose = paramMotion.first->getPose(); 128 LLPose *pose = motion->getPose();
129 129
130 mPoseBlender.addMotion(paramMotion.first); 130 mPoseBlender.addMotion(motion);
131 for (LLJointState *jsp = pose->getFirstJointState(); jsp; jsp = pose->getNextJointState()) 131 for (LLJointState *jsp = pose->getFirstJointState(); jsp; jsp = pose->getNextJointState())
132 { 132 {
133 LLPose *blendedPose = mPoseBlender.getBlendedPose(); 133 LLPose *blendedPose = mPoseBlender.getBlendedPose();
@@ -151,7 +151,7 @@ BOOL LLKeyframeMotionParam::onActivate()
151 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) 151 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2)
152 { 152 {
153 const ParameterizedMotion& paramMotion = *iter2; 153 const ParameterizedMotion& paramMotion = *iter2;
154 paramMotion.first->activate(); 154 paramMotion.mMotion->activate(mActivationTimestamp);
155 } 155 }
156 } 156 }
157 return TRUE; 157 return TRUE;
@@ -173,8 +173,8 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
173 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) 173 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2)
174 { 174 {
175 const ParameterizedMotion& paramMotion = *iter2; 175 const ParameterizedMotion& paramMotion = *iter2;
176// llinfos << "Weight for pose " << paramMotion.first->getName() << " is " << paramMotion.first->getPose()->getWeight() << llendl; 176// llinfos << "Weight for pose " << paramMotion.mMotion->getName() << " is " << paramMotion.mMotion->getPose()->getWeight() << llendl;
177 paramMotion.first->getPose()->setWeight(0.f); 177 paramMotion.mMotion->getPose()->setWeight(0.f);
178 } 178 }
179 } 179 }
180 180
@@ -190,6 +190,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
190 continue; 190 continue;
191 } 191 }
192 192
193 // DANGER! Do not modify mParameterizedMotions while using these pointers!
193 const ParameterizedMotion* firstMotion = NULL; 194 const ParameterizedMotion* firstMotion = NULL;
194 const ParameterizedMotion* secondMotion = NULL; 195 const ParameterizedMotion* secondMotion = NULL;
195 196
@@ -197,9 +198,9 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
197 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) 198 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2)
198 { 199 {
199 const ParameterizedMotion& paramMotion = *iter2; 200 const ParameterizedMotion& paramMotion = *iter2;
200 paramMotion.first->onUpdate(time, joint_mask); 201 paramMotion.mMotion->onUpdate(time, joint_mask);
201 202
202 F32 distToParam = paramMotion.second - *paramValue; 203 F32 distToParam = paramMotion.mParam - *paramValue;
203 204
204 if ( distToParam <= 0.f) 205 if ( distToParam <= 0.f)
205 { 206 {
@@ -227,12 +228,12 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
227 LLPose *secondPose; 228 LLPose *secondPose;
228 229
229 if (firstMotion) 230 if (firstMotion)
230 firstPose = firstMotion->first->getPose(); 231 firstPose = firstMotion->mMotion->getPose();
231 else 232 else
232 firstPose = NULL; 233 firstPose = NULL;
233 234
234 if (secondMotion) 235 if (secondMotion)
235 secondPose = secondMotion->first->getPose(); 236 secondPose = secondMotion->mMotion->getPose();
236 else 237 else
237 secondPose = NULL; 238 secondPose = NULL;
238 239
@@ -243,7 +244,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
243 { 244 {
244 firstPose->setWeight(weightFactor); 245 firstPose->setWeight(weightFactor);
245 } 246 }
246 else if (firstMotion->second == secondMotion->second) 247 else if (firstMotion->mParam == secondMotion->mParam)
247 { 248 {
248 firstPose->setWeight(0.5f * weightFactor); 249 firstPose->setWeight(0.5f * weightFactor);
249 secondPose->setWeight(0.5f * weightFactor); 250 secondPose->setWeight(0.5f * weightFactor);
@@ -251,8 +252,8 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
251 else 252 else
252 { 253 {
253 F32 first_weight = 1.f - 254 F32 first_weight = 1.f -
254 ((llclamp(*paramValue - firstMotion->second, 0.f, (secondMotion->second - firstMotion->second))) / 255 ((llclamp(*paramValue - firstMotion->mParam, 0.f, (secondMotion->mParam - firstMotion->mParam))) /
255 (secondMotion->second - firstMotion->second)); 256 (secondMotion->mParam - firstMotion->mParam));
256 first_weight = llclamp(first_weight, 0.f, 1.f); 257 first_weight = llclamp(first_weight, 0.f, 1.f);
257 258
258 F32 second_weight = 1.f - first_weight; 259 F32 second_weight = 1.f - first_weight;
@@ -290,7 +291,7 @@ void LLKeyframeMotionParam::onDeactivate()
290 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) 291 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2)
291 { 292 {
292 const ParameterizedMotion& paramMotion = *iter2; 293 const ParameterizedMotion& paramMotion = *iter2;
293 paramMotion.first->onDeactivate(); 294 paramMotion.mMotion->onDeactivate();
294 } 295 }
295 } 296 }
296} 297}
@@ -328,9 +329,9 @@ void LLKeyframeMotionParam::setDefaultKeyframeMotion(char *name)
328 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2) 329 for (motion_list_t::iterator iter2 = motionList.begin(); iter2 != motionList.end(); ++iter2)
329 { 330 {
330 const ParameterizedMotion& paramMotion = *iter2; 331 const ParameterizedMotion& paramMotion = *iter2;
331 if (paramMotion.first->getName() == name) 332 if (paramMotion.mMotion->getName() == name)
332 { 333 {
333 mDefaultKeyframeMotion = paramMotion.first; 334 mDefaultKeyframeMotion = paramMotion.mMotion;
334 } 335 }
335 } 336 }
336 } 337 }
diff --git a/linden/indra/llcharacter/llkeyframemotionparam.h b/linden/indra/llcharacter/llkeyframemotionparam.h
index f509e6a..0d17141 100644
--- a/linden/indra/llcharacter/llkeyframemotionparam.h
+++ b/linden/indra/llcharacter/llkeyframemotionparam.h
@@ -126,7 +126,12 @@ protected:
126 //------------------------------------------------------------------------- 126 //-------------------------------------------------------------------------
127 // new functions defined by this subclass 127 // new functions defined by this subclass
128 //------------------------------------------------------------------------- 128 //-------------------------------------------------------------------------
129 typedef std::pair<LLMotion*, F32> ParameterizedMotion; 129 struct ParameterizedMotion
130 {
131 ParameterizedMotion(LLMotion* motion, F32 param) : mMotion(motion), mParam(param) {}
132 LLMotion* mMotion;
133 F32 mParam;
134 };
130 135
131 // add a motion and associated parameter triplet 136 // add a motion and associated parameter triplet
132 BOOL addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value); 137 BOOL addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value);
@@ -134,8 +139,6 @@ protected:
134 // set default motion for LOD and retrieving blend constants 139 // set default motion for LOD and retrieving blend constants
135 void setDefaultKeyframeMotion(char *); 140 void setDefaultKeyframeMotion(char *);
136 141
137 static BOOL sortFunc(ParameterizedMotion *new_motion, ParameterizedMotion *tested_motion);
138
139 BOOL loadMotions(); 142 BOOL loadMotions();
140 143
141protected: 144protected:
@@ -147,10 +150,10 @@ protected:
147 { 150 {
148 bool operator() (const ParameterizedMotion& a, const ParameterizedMotion& b) const 151 bool operator() (const ParameterizedMotion& a, const ParameterizedMotion& b) const
149 { 152 {
150 if (a.second != b.second) 153 if (a.mParam != b.mParam)
151 return (a.second < b.second); 154 return (a.mParam < b.mParam);
152 else 155 else
153 return a.first < b.first; 156 return a.mMotion < b.mMotion;
154 } 157 }
155 }; 158 };
156 159
diff --git a/linden/indra/llcharacter/llmotion.cpp b/linden/indra/llcharacter/llmotion.cpp
index f7b8f1f..54fcaa5 100644
--- a/linden/indra/llcharacter/llmotion.cpp
+++ b/linden/indra/llcharacter/llmotion.cpp
@@ -127,6 +127,13 @@ void LLMotion::setDeactivateCallback( void (*cb)(void *), void* userdata )
127 mDeactivateCallbackUserData = userdata; 127 mDeactivateCallbackUserData = userdata;
128} 128}
129 129
130//virtual
131void LLMotion::setStopTime(F32 time)
132{
133 mStopTimestamp = time;
134 mStopped = TRUE;
135}
136
130BOOL LLMotion::isBlending() 137BOOL LLMotion::isBlending()
131{ 138{
132 return mPose.getWeight() < 1.f; 139 return mPose.getWeight() < 1.f;
@@ -135,8 +142,9 @@ BOOL LLMotion::isBlending()
135//----------------------------------------------------------------------------- 142//-----------------------------------------------------------------------------
136// activate() 143// activate()
137//----------------------------------------------------------------------------- 144//-----------------------------------------------------------------------------
138void LLMotion::activate() 145void LLMotion::activate(F32 time)
139{ 146{
147 mActivationTimestamp = time;
140 mStopped = FALSE; 148 mStopped = FALSE;
141 mActive = TRUE; 149 mActive = TRUE;
142 onActivate(); 150 onActivate();
@@ -150,7 +158,12 @@ void LLMotion::deactivate()
150 mActive = FALSE; 158 mActive = FALSE;
151 mPose.setWeight(0.f); 159 mPose.setWeight(0.f);
152 160
153 if (mDeactivateCallback) (*mDeactivateCallback)(mDeactivateCallbackUserData); 161 if (mDeactivateCallback)
162 {
163 (*mDeactivateCallback)(mDeactivateCallbackUserData);
164 mDeactivateCallback = NULL; // only call callback once
165 mDeactivateCallbackUserData = NULL;
166 }
154 167
155 onDeactivate(); 168 onDeactivate();
156} 169}
diff --git a/linden/indra/llcharacter/llmotion.h b/linden/indra/llcharacter/llmotion.h
index c7bb55d..5a622a8 100644
--- a/linden/indra/llcharacter/llmotion.h
+++ b/linden/indra/llcharacter/llmotion.h
@@ -48,6 +48,8 @@ class LLCharacter;
48//----------------------------------------------------------------------------- 48//-----------------------------------------------------------------------------
49class LLMotion 49class LLMotion
50{ 50{
51 friend class LLMotionController;
52
51public: 53public:
52 typedef enum LLMotionBlendType 54 typedef enum LLMotionBlendType
53 { 55 {
@@ -73,10 +75,6 @@ public:
73 // functions to support MotionController and MotionRegistry 75 // functions to support MotionController and MotionRegistry
74 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
75 77
76 // static constructor
77 // all subclasses must implement such a function and register it
78 static LLMotion *create(const LLUUID &id) { return NULL; }
79
80 // get the name of this instance 78 // get the name of this instance
81 const std::string &getName() const { return mName; } 79 const std::string &getName() const { return mName; }
82 80
@@ -96,7 +94,7 @@ public:
96 94
97 F32 getStopTime() const { return mStopTimestamp; } 95 F32 getStopTime() const { return mStopTimestamp; }
98 96
99 virtual void setStopTime(F32 time) { mStopTimestamp = time; mStopped = TRUE; } 97 virtual void setStopTime(F32 time);
100 98
101 BOOL isStopped() const { return mStopped; } 99 BOOL isStopped() const { return mStopped; }
102 100
@@ -104,12 +102,18 @@ public:
104 102
105 BOOL isBlending(); 103 BOOL isBlending();
106 104
107 void activate(); 105 // Activation functions.
108 106 // It is OK for other classes to activate a motion,
107 // but only the controller can deactivate it.
108 // Thus, if mActive == TRUE, the motion *may* be on the controllers active list,
109 // but if mActive == FALSE, the motion is gauranteed not to be on the active list.
110protected:
111 // Used by LLMotionController only
109 void deactivate(); 112 void deactivate();
110
111 BOOL isActive() { return mActive; } 113 BOOL isActive() { return mActive; }
112 114public:
115 void activate(F32 time);
116
113public: 117public:
114 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
115 // animation callbacks to be implemented by subclasses 119 // animation callbacks to be implemented by subclasses
@@ -170,14 +174,13 @@ protected:
170 BOOL mStopped; // motion has been stopped; 174 BOOL mStopped; // motion has been stopped;
171 BOOL mActive; // motion is on active list (can be stopped or not stopped) 175 BOOL mActive; // motion is on active list (can be stopped or not stopped)
172 176
173public:
174 //------------------------------------------------------------------------- 177 //-------------------------------------------------------------------------
175 // these are set implicitly by the motion controller and 178 // these are set implicitly by the motion controller and
176 // may be referenced (read only) in the above handlers. 179 // may be referenced (read only) in the above handlers.
177 //------------------------------------------------------------------------- 180 //-------------------------------------------------------------------------
178 std::string mName; // instance name assigned by motion controller 181 std::string mName; // instance name assigned by motion controller
179 LLUUID mID; 182 LLUUID mID;
180 183
181 F32 mActivationTimestamp; // time when motion was activated 184 F32 mActivationTimestamp; // time when motion was activated
182 F32 mStopTimestamp; // time when motion was told to stop 185 F32 mStopTimestamp; // time when motion was told to stop
183 F32 mSendStopTimestamp; // time when simulator should be told to stop this motion 186 F32 mSendStopTimestamp; // time when simulator should be told to stop this motion
diff --git a/linden/indra/llcharacter/llmotioncontroller.cpp b/linden/indra/llcharacter/llmotioncontroller.cpp
index 028cf22..90a3d74 100644
--- a/linden/indra/llcharacter/llmotioncontroller.cpp
+++ b/linden/indra/llcharacter/llmotioncontroller.cpp
@@ -34,6 +34,8 @@
34//----------------------------------------------------------------------------- 34//-----------------------------------------------------------------------------
35#include "linden_common.h" 35#include "linden_common.h"
36 36
37#include "llmemtype.h"
38
37#include "llmotioncontroller.h" 39#include "llmotioncontroller.h"
38#include "llkeyframemotion.h" 40#include "llkeyframemotion.h"
39#include "llmath.h" 41#include "llmath.h"
@@ -50,32 +52,6 @@ const U32 MAX_MOTION_INSTANCES = 32;
50LLMotionRegistry LLMotionController::sRegistry; 52LLMotionRegistry LLMotionController::sRegistry;
51 53
52//----------------------------------------------------------------------------- 54//-----------------------------------------------------------------------------
53// LLMotionTableEntry()
54//-----------------------------------------------------------------------------
55LLMotionTableEntry::LLMotionTableEntry()
56{
57 mConstructor = NULL;
58 mID.setNull();
59}
60
61LLMotionTableEntry::LLMotionTableEntry(LLMotionConstructor constructor, const LLUUID& id)
62 : mConstructor(constructor), mID(id)
63{
64
65}
66
67//-----------------------------------------------------------------------------
68// create()
69//-----------------------------------------------------------------------------
70LLMotion* LLMotionTableEntry::create(const LLUUID &id)
71{
72 LLMotion* motionp = mConstructor(id);
73
74 return motionp;
75}
76
77
78//-----------------------------------------------------------------------------
79//----------------------------------------------------------------------------- 55//-----------------------------------------------------------------------------
80// LLMotionRegistry class 56// LLMotionRegistry class
81//----------------------------------------------------------------------------- 57//-----------------------------------------------------------------------------
@@ -85,7 +61,7 @@ LLMotion* LLMotionTableEntry::create(const LLUUID &id)
85// LLMotionRegistry() 61// LLMotionRegistry()
86// Class Constructor 62// Class Constructor
87//----------------------------------------------------------------------------- 63//-----------------------------------------------------------------------------
88LLMotionRegistry::LLMotionRegistry() : mMotionTable(LLMotionTableEntry::uuidEq, LLMotionTableEntry()) 64LLMotionRegistry::LLMotionRegistry()
89{ 65{
90 66
91} 67}
@@ -97,19 +73,19 @@ LLMotionRegistry::LLMotionRegistry() : mMotionTable(LLMotionTableEntry::uuidEq,
97//----------------------------------------------------------------------------- 73//-----------------------------------------------------------------------------
98LLMotionRegistry::~LLMotionRegistry() 74LLMotionRegistry::~LLMotionRegistry()
99{ 75{
100 mMotionTable.removeAll(); 76 mMotionTable.clear();
101} 77}
102 78
103 79
104//----------------------------------------------------------------------------- 80//-----------------------------------------------------------------------------
105// addMotion() 81// addMotion()
106//----------------------------------------------------------------------------- 82//-----------------------------------------------------------------------------
107BOOL LLMotionRegistry::addMotion( const LLUUID& id, LLMotionConstructor constructor ) 83BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
108{ 84{
109// llinfos << "Registering motion: " << name << llendl; 85 // llinfos << "Registering motion: " << name << llendl;
110 if (!mMotionTable.check(id)) 86 if (!is_in_map(mMotionTable, id))
111 { 87 {
112 mMotionTable.set(id, LLMotionTableEntry(constructor, id)); 88 mMotionTable[id] = constructor;
113 return TRUE; 89 return TRUE;
114 } 90 }
115 91
@@ -121,7 +97,7 @@ BOOL LLMotionRegistry::addMotion( const LLUUID& id, LLMotionConstructor construc
121//----------------------------------------------------------------------------- 97//-----------------------------------------------------------------------------
122void LLMotionRegistry::markBad( const LLUUID& id ) 98void LLMotionRegistry::markBad( const LLUUID& id )
123{ 99{
124 mMotionTable.set(id, LLMotionTableEntry()); 100 mMotionTable[id] = LLMotionConstructor(NULL);
125} 101}
126 102
127//----------------------------------------------------------------------------- 103//-----------------------------------------------------------------------------
@@ -129,17 +105,17 @@ void LLMotionRegistry::markBad( const LLUUID& id )
129//----------------------------------------------------------------------------- 105//-----------------------------------------------------------------------------
130LLMotion *LLMotionRegistry::createMotion( const LLUUID &id ) 106LLMotion *LLMotionRegistry::createMotion( const LLUUID &id )
131{ 107{
132 LLMotionTableEntry motion_entry = mMotionTable.get(id); 108 LLMotionConstructor constructor = get_if_there(mMotionTable, id, LLMotionConstructor(NULL));
133 LLMotion* motion = NULL; 109 LLMotion* motion = NULL;
134 110
135 if ( motion_entry.getID().isNull() ) 111 if ( constructor == NULL )
136 { 112 {
137 // *FIX: need to replace with a better default scheme. RN 113 // *FIX: need to replace with a better default scheme. RN
138 motion = LLKeyframeMotion::create(id); 114 motion = LLKeyframeMotion::create(id);
139 } 115 }
140 else 116 else
141 { 117 {
142 motion = motion_entry.create(id); 118 motion = constructor(id);
143 } 119 }
144 120
145 return motion; 121 return motion;
@@ -155,18 +131,19 @@ LLMotion *LLMotionRegistry::createMotion( const LLUUID &id )
155// LLMotionController() 131// LLMotionController()
156// Class Constructor 132// Class Constructor
157//----------------------------------------------------------------------------- 133//-----------------------------------------------------------------------------
158LLMotionController::LLMotionController( ) 134LLMotionController::LLMotionController()
135 : mTimeFactor(1.f),
136 mCharacter(NULL),
137 mAnimTime(0.f),
138 mPrevTimerElapsed(0.f),
139 mLastTime(0.0f),
140 mHasRunOnce(FALSE),
141 mPaused(FALSE),
142 mPauseTime(0.f),
143 mTimeStep(0.f),
144 mTimeStepCount(0),
145 mLastInterp(0.f)
159{ 146{
160 mTime = 0.f;
161 mTimeOffset = 0.f;
162 mLastTime = 0.0f;
163 mHasRunOnce = FALSE;
164 mPaused = FALSE;
165 mPauseTime = 0.f;
166 mTimeStep = 0.f;
167 mTimeStepCount = 0;
168 mLastInterp = 0.f;
169 mTimeFactor = 1.f;
170} 147}
171 148
172 149
@@ -179,6 +156,15 @@ LLMotionController::~LLMotionController()
179 deleteAllMotions(); 156 deleteAllMotions();
180} 157}
181 158
159void LLMotionController::incMotionCounts(S32& num_motions, S32& num_loading_motions, S32& num_loaded_motions, S32& num_active_motions, S32& num_deprecated_motions)
160{
161 num_motions += mAllMotions.size();
162 num_loading_motions += mLoadingMotions.size();
163 num_loaded_motions += mLoadedMotions.size();
164 num_active_motions += mActiveMotions.size();
165 num_deprecated_motions += mDeprecatedMotions.size();
166}
167
182//----------------------------------------------------------------------------- 168//-----------------------------------------------------------------------------
183// deleteAllMotions() 169// deleteAllMotions()
184//----------------------------------------------------------------------------- 170//-----------------------------------------------------------------------------
@@ -193,24 +179,38 @@ void LLMotionController::deleteAllMotions()
193} 179}
194 180
195//----------------------------------------------------------------------------- 181//-----------------------------------------------------------------------------
196// addLoadedMotion() 182// purgeExcessMotion()
197//----------------------------------------------------------------------------- 183//-----------------------------------------------------------------------------
198void LLMotionController::addLoadedMotion(LLMotion* motionp) 184void LLMotionController::purgeExcessMotions()
199{ 185{
200 std::set<LLUUID> motions_to_kill; 186 if (mLoadedMotions.size() > MAX_MOTION_INSTANCES)
187 {
188 // clean up deprecated motions
189 for (motion_set_t::iterator deprecated_motion_it = mDeprecatedMotions.begin();
190 deprecated_motion_it != mDeprecatedMotions.end(); )
191 {
192 motion_set_t::iterator cur_iter = deprecated_motion_it++;
193 LLMotion* cur_motionp = *cur_iter;
194 if (!isMotionActive(cur_motionp))
195 {
196 // Motion is deprecated so we know it's not cannonical,
197 // we can safely remove the instance
198 removeMotionInstance(cur_motionp); // modifies mDeprecatedMotions
199 mDeprecatedMotions.erase(cur_iter);
200 }
201 }
202 }
201 203
202 // gather all inactive, loaded motions 204 std::set<LLUUID> motions_to_kill;
203 if (mLoadedMotions.size() > MAX_MOTION_INSTANCES) 205 if (mLoadedMotions.size() > MAX_MOTION_INSTANCES)
204 { 206 {
205 // too many motions active this frame, kill all blenders 207 // too many motions active this frame, kill all blenders
206 mPoseBlender.clearBlenders(); 208 mPoseBlender.clearBlenders();
207 209 for (motion_set_t::iterator loaded_motion_it = mLoadedMotions.begin();
208 for (motion_list_t::iterator loaded_motion_it = mLoadedMotions.begin(); 210 loaded_motion_it != mLoadedMotions.end();
209 loaded_motion_it != mLoadedMotions.end(); 211 ++loaded_motion_it)
210 ++loaded_motion_it)
211 { 212 {
212 LLMotion* cur_motionp = *loaded_motion_it; 213 LLMotion* cur_motionp = *loaded_motion_it;
213
214 // motion isn't playing, delete it 214 // motion isn't playing, delete it
215 if (!isMotionActive(cur_motionp)) 215 if (!isMotionActive(cur_motionp))
216 { 216 {
@@ -218,7 +218,7 @@ void LLMotionController::addLoadedMotion(LLMotion* motionp)
218 } 218 }
219 } 219 }
220 } 220 }
221 221
222 // clean up all inactive, loaded motions 222 // clean up all inactive, loaded motions
223 for (std::set<LLUUID>::iterator motion_it = motions_to_kill.begin(); 223 for (std::set<LLUUID>::iterator motion_it = motions_to_kill.begin();
224 motion_it != motions_to_kill.end(); 224 motion_it != motions_to_kill.end();
@@ -234,8 +234,28 @@ void LLMotionController::addLoadedMotion(LLMotion* motionp)
234 } 234 }
235 } 235 }
236 236
237 // add new motion to loaded list 237 if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES)
238 mLoadedMotions.push_back(motionp); 238 {
239 LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << llendl;
240 }
241}
242
243//-----------------------------------------------------------------------------
244// deactivateStoppedMotions()
245//-----------------------------------------------------------------------------
246void LLMotionController::deactivateStoppedMotions()
247{
248 // Since we're hidden, deactivate any stopped motions.
249 for (motion_list_t::iterator iter = mActiveMotions.begin();
250 iter != mActiveMotions.end(); )
251 {
252 motion_list_t::iterator curiter = iter++;
253 LLMotion* motionp = *curiter;
254 if (motionp->isStopped())
255 {
256 deactivateMotionInstance(motionp);
257 }
258 }
239} 259}
240 260
241//----------------------------------------------------------------------------- 261//-----------------------------------------------------------------------------
@@ -252,9 +272,10 @@ void LLMotionController::setTimeStep(F32 step)
252 iter != mActiveMotions.end(); ++iter) 272 iter != mActiveMotions.end(); ++iter)
253 { 273 {
254 LLMotion* motionp = *iter; 274 LLMotion* motionp = *iter;
255 motionp->mActivationTimestamp = (F32)llfloor(motionp->mActivationTimestamp / step) * step; 275 F32 activation_time = motionp->mActivationTimestamp;
276 motionp->mActivationTimestamp = (F32)(llfloor(activation_time / step)) * step;
256 BOOL stopped = motionp->isStopped(); 277 BOOL stopped = motionp->isStopped();
257 motionp->setStopTime((F32)llfloor(motionp->getStopTime() / step) * step); 278 motionp->setStopTime((F32)(llfloor(motionp->getStopTime() / step)) * step);
258 motionp->setStopped(stopped); 279 motionp->setStopped(stopped);
259 motionp->mSendStopTimestamp = (F32)llfloor(motionp->mSendStopTimestamp / step) * step; 280 motionp->mSendStopTimestamp = (F32)llfloor(motionp->mSendStopTimestamp / step) * step;
260 } 281 }
@@ -266,7 +287,6 @@ void LLMotionController::setTimeStep(F32 step)
266//----------------------------------------------------------------------------- 287//-----------------------------------------------------------------------------
267void LLMotionController::setTimeFactor(F32 time_factor) 288void LLMotionController::setTimeFactor(F32 time_factor)
268{ 289{
269 mTimeOffset += mTimer.getElapsedTimeAndResetF32() * mTimeFactor;
270 mTimeFactor = time_factor; 290 mTimeFactor = time_factor;
271} 291}
272 292
@@ -280,11 +300,11 @@ void LLMotionController::setCharacter(LLCharacter *character)
280 300
281 301
282//----------------------------------------------------------------------------- 302//-----------------------------------------------------------------------------
283// addMotion() 303// registerMotion()
284//----------------------------------------------------------------------------- 304//-----------------------------------------------------------------------------
285BOOL LLMotionController::addMotion( const LLUUID& id, LLMotionConstructor constructor ) 305BOOL LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
286{ 306{
287 return sRegistry.addMotion(id, constructor); 307 return sRegistry.registerMotion(id, constructor);
288} 308}
289 309
290//----------------------------------------------------------------------------- 310//-----------------------------------------------------------------------------
@@ -293,10 +313,8 @@ BOOL LLMotionController::addMotion( const LLUUID& id, LLMotionConstructor constr
293void LLMotionController::removeMotion( const LLUUID& id) 313void LLMotionController::removeMotion( const LLUUID& id)
294{ 314{
295 LLMotion* motionp = findMotion(id); 315 LLMotion* motionp = findMotion(id);
296
297 removeMotionInstance(motionp);
298
299 mAllMotions.erase(id); 316 mAllMotions.erase(id);
317 removeMotionInstance(motionp);
300} 318}
301 319
302// removes instance of a motion from all runtime structures, but does 320// removes instance of a motion from all runtime structures, but does
@@ -306,10 +324,11 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp)
306{ 324{
307 if (motionp) 325 if (motionp)
308 { 326 {
309 stopMotionInstance(motionp, TRUE); 327 llassert(findMotion(motionp->getID()) != motionp);
310 328 if (motionp->isActive())
329 motionp->deactivate();
311 mLoadingMotions.erase(motionp); 330 mLoadingMotions.erase(motionp);
312 mLoadedMotions.remove(motionp); 331 mLoadedMotions.erase(motionp);
313 mActiveMotions.remove(motionp); 332 mActiveMotions.remove(motionp);
314 delete motionp; 333 delete motionp;
315 } 334 }
@@ -320,6 +339,7 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp)
320//----------------------------------------------------------------------------- 339//-----------------------------------------------------------------------------
321LLMotion* LLMotionController::createMotion( const LLUUID &id ) 340LLMotion* LLMotionController::createMotion( const LLUUID &id )
322{ 341{
342 LLMemType mt(LLMemType::MTYPE_ANIMATION);
323 // do we have an instance of this motion for this character? 343 // do we have an instance of this motion for this character?
324 LLMotion *motion = findMotion(id); 344 LLMotion *motion = findMotion(id);
325 345
@@ -353,8 +373,8 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id )
353 mLoadingMotions.insert(motion); 373 mLoadingMotions.insert(motion);
354 break; 374 break;
355 case LLMotion::STATUS_SUCCESS: 375 case LLMotion::STATUS_SUCCESS:
356 // add motion to our list 376 // add motion to our list
357 addLoadedMotion(motion); 377 mLoadedMotions.insert(motion);
358 break; 378 break;
359 default: 379 default:
360 llerrs << "Invalid initialization status" << llendl; 380 llerrs << "Invalid initialization status" << llendl;
@@ -377,6 +397,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
377 // motion that is stopping will be allowed to stop but 397 // motion that is stopping will be allowed to stop but
378 // replaced by a new instance of that motion 398 // replaced by a new instance of that motion
379 if (motion 399 if (motion
400 && !mPaused
380 && motion->canDeprecate() 401 && motion->canDeprecate()
381 && motion->getFadeWeight() > 0.01f // not LOD-ed out 402 && motion->getFadeWeight() > 0.01f // not LOD-ed out
382 && (motion->isBlending() || motion->getStopTime() != 0.f)) 403 && (motion->isBlending() || motion->getStopTime() != 0.f))
@@ -403,7 +424,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
403 } 424 }
404 425
405// llinfos << "Starting motion " << name << llendl; 426// llinfos << "Starting motion " << name << llendl;
406 return activateMotionInstance(motion, mTime - start_offset); 427 return activateMotionInstance(motion, mAnimTime - start_offset);
407} 428}
408 429
409 430
@@ -414,7 +435,6 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate
414{ 435{
415 // if already inactive, return false 436 // if already inactive, return false
416 LLMotion *motion = findMotion(id); 437 LLMotion *motion = findMotion(id);
417
418 return stopMotionInstance(motion, stop_immediate); 438 return stopMotionInstance(motion, stop_immediate);
419} 439}
420 440
@@ -428,12 +448,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat
428 // If on active list, stop it 448 // If on active list, stop it
429 if (isMotionActive(motion) && !motion->isStopped()) 449 if (isMotionActive(motion) && !motion->isStopped())
430 { 450 {
431 // when using timesteps, set stop time to last frame's time, otherwise grab current timer value 451 motion->setStopTime(mAnimTime);
432 // *FIX: should investigate this inconsistency...hints of obscure bugs
433
434 F32 stop_time = (mTimeStep != 0.f || mPaused) ? (mTime) : mTimeOffset + (mTimer.getElapsedTimeF32() * mTimeFactor);
435 motion->setStopTime(stop_time);
436
437 if (stop_immediate) 452 if (stop_immediate)
438 { 453 {
439 deactivateMotionInstance(motion); 454 deactivateMotionInstance(motion);
@@ -449,7 +464,6 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat
449 return FALSE; 464 return FALSE;
450} 465}
451 466
452
453//----------------------------------------------------------------------------- 467//-----------------------------------------------------------------------------
454// updateRegularMotions() 468// updateRegularMotions()
455//----------------------------------------------------------------------------- 469//-----------------------------------------------------------------------------
@@ -476,6 +490,59 @@ void LLMotionController::resetJointSignatures()
476} 490}
477 491
478//----------------------------------------------------------------------------- 492//-----------------------------------------------------------------------------
493// updateIdleMotion()
494// minimal updates for active motions
495//-----------------------------------------------------------------------------
496void LLMotionController::updateIdleMotion(LLMotion* motionp)
497{
498 if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration())
499 {
500 deactivateMotionInstance(motionp);
501 }
502 else if (motionp->isStopped() && mAnimTime > motionp->getStopTime())
503 {
504 // is this the first iteration in the ease out phase?
505 if (mLastTime <= motionp->getStopTime())
506 {
507 // store residual weight for this motion
508 motionp->mResidualWeight = motionp->getPose()->getWeight();
509 }
510 }
511 else if (mAnimTime > motionp->mSendStopTimestamp)
512 {
513 // notify character of timed stop event on first iteration past sendstoptimestamp
514 // this will only be called when an animation stops itself (runs out of time)
515 if (mLastTime <= motionp->mSendStopTimestamp)
516 {
517 mCharacter->requestStopMotion( motionp );
518 stopMotionInstance(motionp, FALSE);
519 }
520 }
521 else if (mAnimTime >= motionp->mActivationTimestamp)
522 {
523 if (mLastTime < motionp->mActivationTimestamp)
524 {
525 motionp->mResidualWeight = motionp->getPose()->getWeight();
526 }
527 }
528}
529
530//-----------------------------------------------------------------------------
531// updateIdleActiveMotions()
532// Call this instead of updateMotionsByType for hidden avatars
533//-----------------------------------------------------------------------------
534void LLMotionController::updateIdleActiveMotions()
535{
536 for (motion_list_t::iterator iter = mActiveMotions.begin();
537 iter != mActiveMotions.end(); )
538 {
539 motion_list_t::iterator curiter = iter++;
540 LLMotion* motionp = *curiter;
541 updateIdleMotion(motionp);
542 }
543}
544
545//-----------------------------------------------------------------------------
479// updateMotionsByType() 546// updateMotionsByType()
480//----------------------------------------------------------------------------- 547//-----------------------------------------------------------------------------
481void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) 548void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
@@ -530,36 +597,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
530 597
531 if (!update_motion) 598 if (!update_motion)
532 { 599 {
533 if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) 600 updateIdleMotion(motionp);
534 {
535 deactivateMotionInstance(motionp);
536 }
537 else if (motionp->isStopped() && mTime > motionp->getStopTime())
538 {
539 // is this the first iteration in the ease out phase?
540 if (mLastTime <= motionp->getStopTime())
541 {
542 // store residual weight for this motion
543 motionp->mResidualWeight = motionp->getPose()->getWeight();
544 }
545 }
546 else if (mTime > motionp->mSendStopTimestamp)
547 {
548 // notify character of timed stop event on first iteration past sendstoptimestamp
549 // this will only be called when an animation stops itself (runs out of time)
550 if (mLastTime <= motionp->mSendStopTimestamp)
551 {
552 mCharacter->requestStopMotion( motionp );
553 stopMotionInstance(motionp, FALSE);
554 }
555 }
556 else if (mTime >= motionp->mActivationTimestamp)
557 {
558 if (mLastTime < motionp->mActivationTimestamp)
559 {
560 motionp->mResidualWeight = motionp->getPose()->getWeight();
561 }
562 }
563 continue; 601 continue;
564 } 602 }
565 603
@@ -571,7 +609,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
571 motionp->fadeOut(); 609 motionp->fadeOut();
572 610
573 //should we notify the simulator that this motion should be stopped (check even if skipped by LOD logic) 611 //should we notify the simulator that this motion should be stopped (check even if skipped by LOD logic)
574 if (mTime > motionp->mSendStopTimestamp) 612 if (mAnimTime > motionp->mSendStopTimestamp)
575 { 613 {
576 // notify character of timed stop event on first iteration past sendstoptimestamp 614 // notify character of timed stop event on first iteration past sendstoptimestamp
577 // this will only be called when an animation stops itself (runs out of time) 615 // this will only be called when an animation stops itself (runs out of time)
@@ -584,7 +622,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
584 622
585 if (motionp->getFadeWeight() < 0.01f) 623 if (motionp->getFadeWeight() < 0.01f)
586 { 624 {
587 if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) 625 if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration())
588 { 626 {
589 posep->setWeight(0.f); 627 posep->setWeight(0.f);
590 deactivateMotionInstance(motionp); 628 deactivateMotionInstance(motionp);
@@ -600,7 +638,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
600 //********************** 638 //**********************
601 // MOTION INACTIVE 639 // MOTION INACTIVE
602 //********************** 640 //**********************
603 if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) 641 if (motionp->isStopped() && mAnimTime > motionp->getStopTime() + motionp->getEaseOutDuration())
604 { 642 {
605 // this motion has gone on too long, deactivate it 643 // this motion has gone on too long, deactivate it
606 // did we have a chance to stop it? 644 // did we have a chance to stop it?
@@ -622,7 +660,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
622 //********************** 660 //**********************
623 // MOTION EASE OUT 661 // MOTION EASE OUT
624 //********************** 662 //**********************
625 else if (motionp->isStopped() && mTime > motionp->getStopTime()) 663 else if (motionp->isStopped() && mAnimTime > motionp->getStopTime())
626 { 664 {
627 // is this the first iteration in the ease out phase? 665 // is this the first iteration in the ease out phase?
628 if (mLastTime <= motionp->getStopTime()) 666 if (mLastTime <= motionp->getStopTime())
@@ -637,22 +675,22 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
637 } 675 }
638 else 676 else
639 { 677 {
640 posep->setWeight(motionp->getFadeWeight() * motionp->mResidualWeight * cubic_step(1.f - ((mTime - motionp->getStopTime()) / motionp->getEaseOutDuration()))); 678 posep->setWeight(motionp->getFadeWeight() * motionp->mResidualWeight * cubic_step(1.f - ((mAnimTime - motionp->getStopTime()) / motionp->getEaseOutDuration())));
641 } 679 }
642 680
643 // perform motion update 681 // perform motion update
644 update_result = motionp->onUpdate(mTime - motionp->mActivationTimestamp, last_joint_signature); 682 update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
645 } 683 }
646 684
647 //********************** 685 //**********************
648 // MOTION ACTIVE 686 // MOTION ACTIVE
649 //********************** 687 //**********************
650 else if (mTime > motionp->mActivationTimestamp + motionp->getEaseInDuration()) 688 else if (mAnimTime > motionp->mActivationTimestamp + motionp->getEaseInDuration())
651 { 689 {
652 posep->setWeight(motionp->getFadeWeight()); 690 posep->setWeight(motionp->getFadeWeight());
653 691
654 //should we notify the simulator that this motion should be stopped? 692 //should we notify the simulator that this motion should be stopped?
655 if (mTime > motionp->mSendStopTimestamp) 693 if (mAnimTime > motionp->mSendStopTimestamp)
656 { 694 {
657 // notify character of timed stop event on first iteration past sendstoptimestamp 695 // notify character of timed stop event on first iteration past sendstoptimestamp
658 // this will only be called when an animation stops itself (runs out of time) 696 // this will only be called when an animation stops itself (runs out of time)
@@ -664,13 +702,13 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
664 } 702 }
665 703
666 // perform motion update 704 // perform motion update
667 update_result = motionp->onUpdate(mTime - motionp->mActivationTimestamp, last_joint_signature); 705 update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
668 } 706 }
669 707
670 //********************** 708 //**********************
671 // MOTION EASE IN 709 // MOTION EASE IN
672 //********************** 710 //**********************
673 else if (mTime >= motionp->mActivationTimestamp) 711 else if (mAnimTime >= motionp->mActivationTimestamp)
674 { 712 {
675 if (mLastTime < motionp->mActivationTimestamp) 713 if (mLastTime < motionp->mActivationTimestamp)
676 { 714 {
@@ -683,10 +721,10 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
683 else 721 else
684 { 722 {
685 // perform motion update 723 // perform motion update
686 posep->setWeight(motionp->getFadeWeight() * motionp->mResidualWeight + (1.f - motionp->mResidualWeight) * cubic_step((mTime - motionp->mActivationTimestamp) / motionp->getEaseInDuration())); 724 posep->setWeight(motionp->getFadeWeight() * motionp->mResidualWeight + (1.f - motionp->mResidualWeight) * cubic_step((mAnimTime - motionp->mActivationTimestamp) / motionp->getEaseInDuration()));
687 } 725 }
688 // perform motion update 726 // perform motion update
689 update_result = motionp->onUpdate(mTime - motionp->mActivationTimestamp, last_joint_signature); 727 update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
690 } 728 }
691 else 729 else
692 { 730 {
@@ -697,7 +735,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
697 // allow motions to deactivate themselves 735 // allow motions to deactivate themselves
698 if (!update_result) 736 if (!update_result)
699 { 737 {
700 if (!motionp->isStopped() || motionp->getStopTime() > mTime) 738 if (!motionp->isStopped() || motionp->getStopTime() > mAnimTime)
701 { 739 {
702 // animation has stopped itself due to internal logic 740 // animation has stopped itself due to internal logic
703 // propagate this to the network 741 // propagate this to the network
@@ -713,18 +751,68 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
713 } 751 }
714} 752}
715 753
754//-----------------------------------------------------------------------------
755// updateLoadingMotions()
756//-----------------------------------------------------------------------------
757void LLMotionController::updateLoadingMotions()
758{
759 // query pending motions for completion
760 for (motion_set_t::iterator iter = mLoadingMotions.begin();
761 iter != mLoadingMotions.end(); )
762 {
763 motion_set_t::iterator curiter = iter++;
764 LLMotion* motionp = *curiter;
765 if( !motionp)
766 {
767 continue; // maybe shouldn't happen but i've seen it -MG
768 }
769 LLMotion::LLMotionInitStatus status = motionp->onInitialize(mCharacter);
770 if (status == LLMotion::STATUS_SUCCESS)
771 {
772 mLoadingMotions.erase(curiter);
773 // add motion to our loaded motion list
774 mLoadedMotions.insert(motionp);
775 // this motion should be playing
776 if (!motionp->isStopped())
777 {
778 activateMotionInstance(motionp, mAnimTime);
779 }
780 }
781 else if (status == LLMotion::STATUS_FAILURE)
782 {
783 llinfos << "Motion " << motionp->getID() << " init failed." << llendl;
784 sRegistry.markBad(motionp->getID());
785 mLoadingMotions.erase(curiter);
786 mAllMotions.erase(motionp->getID());
787 delete motionp;
788 }
789 }
790}
791
792//-----------------------------------------------------------------------------
793// call updateMotion() or updateMotionsMinimal() every frame
794//-----------------------------------------------------------------------------
716 795
717//----------------------------------------------------------------------------- 796//-----------------------------------------------------------------------------
718// updateMotion() 797// updateMotion()
719//----------------------------------------------------------------------------- 798//-----------------------------------------------------------------------------
720void LLMotionController::updateMotion() 799void LLMotionController::updateMotions(bool force_update)
721{ 800{
722 BOOL use_quantum = (mTimeStep != 0.f); 801 BOOL use_quantum = (mTimeStep != 0.f);
723 802
803 // Always update mPrevTimerElapsed
804 F32 cur_time = mTimer.getElapsedTimeF32();
805 F32 delta_time = cur_time - mPrevTimerElapsed;
806 mPrevTimerElapsed = cur_time;
807 mLastTime = mAnimTime;
808
809 // Always cap the number of loaded motions
810 purgeExcessMotions();
811
724 // Update timing info for this time step. 812 // Update timing info for this time step.
725 if (!mPaused) 813 if (!mPaused)
726 { 814 {
727 F32 update_time = mTimeOffset + (mTimer.getElapsedTimeF32() * mTimeFactor); 815 F32 update_time = mAnimTime + delta_time * mTimeFactor;
728 if (use_quantum) 816 if (use_quantum)
729 { 817 {
730 F32 time_interval = fmodf(update_time, mTimeStep); 818 F32 time_interval = fmodf(update_time, mTimeStep);
@@ -740,7 +828,8 @@ void LLMotionController::updateMotion()
740 mPoseBlender.interpolate(interp - mLastInterp); 828 mPoseBlender.interpolate(interp - mLastInterp);
741 mLastInterp = interp; 829 mLastInterp = interp;
742 } 830 }
743 831
832 updateLoadingMotions();
744 return; 833 return;
745 } 834 }
746 835
@@ -749,53 +838,24 @@ void LLMotionController::updateMotion()
749 clearBlenders(); 838 clearBlenders();
750 839
751 mTimeStepCount = quantum_count; 840 mTimeStepCount = quantum_count;
752 mLastTime = mTime; 841 mAnimTime = (F32)quantum_count * mTimeStep;
753 mTime = (F32)quantum_count * mTimeStep;
754 mLastInterp = 0.f; 842 mLastInterp = 0.f;
755 } 843 }
756 else 844 else
757 { 845 {
758 mLastTime = mTime; 846 mAnimTime = update_time;
759 mTime = update_time;
760 } 847 }
761 } 848 }
762 849
763 // query pending motions for completion 850 updateLoadingMotions();
764 for (motion_set_t::iterator iter = mLoadingMotions.begin();
765 iter != mLoadingMotions.end(); )
766 {
767 motion_set_t::iterator curiter = iter++;
768 LLMotion* motionp = *curiter;
769 if( !motionp)
770 {
771 continue; // maybe shouldn't happen but i've seen it -MG
772 }
773 LLMotion::LLMotionInitStatus status = motionp->onInitialize(mCharacter);
774 if (status == LLMotion::STATUS_SUCCESS)
775 {
776 mLoadingMotions.erase(curiter);
777 // add motion to our loaded motion list
778 addLoadedMotion(motionp);
779 // this motion should be playing
780 if (!motionp->isStopped())
781 {
782 activateMotionInstance(motionp, mTime);
783 }
784 }
785 else if (status == LLMotion::STATUS_FAILURE)
786 {
787 llinfos << "Motion " << motionp->getID() << " init failed." << llendl;
788 sRegistry.markBad(motionp->getID());
789 mLoadingMotions.erase(curiter);
790
791 mAllMotions.erase(motionp->getID());
792 delete motionp;
793 }
794 }
795 851
796 resetJointSignatures(); 852 resetJointSignatures();
797 853
798 if (!mPaused) 854 if (mPaused && !force_update)
855 {
856 updateIdleActiveMotions();
857 }
858 else
799 { 859 {
800 // update additive motions 860 // update additive motions
801 updateAdditiveMotions(); 861 updateAdditiveMotions();
@@ -818,6 +878,23 @@ void LLMotionController::updateMotion()
818// llinfos << "Motion controller time " << motionTimer.getElapsedTimeF32() << llendl; 878// llinfos << "Motion controller time " << motionTimer.getElapsedTimeF32() << llendl;
819} 879}
820 880
881//-----------------------------------------------------------------------------
882// updateMotionsMinimal()
883// minimal update (e.g. while hidden)
884//-----------------------------------------------------------------------------
885void LLMotionController::updateMotionsMinimal()
886{
887 // Always update mPrevTimerElapsed
888 mPrevTimerElapsed = mTimer.getElapsedTimeF32();
889
890 purgeExcessMotions();
891 updateLoadingMotions();
892 resetJointSignatures();
893
894 deactivateStoppedMotions();
895
896 mHasRunOnce = TRUE;
897}
821 898
822//----------------------------------------------------------------------------- 899//-----------------------------------------------------------------------------
823// activateMotionInstance() 900// activateMotionInstance()
@@ -840,7 +917,6 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
840 } 917 }
841 918
842 motion->mResidualWeight = motion->getPose()->getWeight(); 919 motion->mResidualWeight = motion->getPose()->getWeight();
843 motion->mActivationTimestamp = time;
844 920
845 // set stop time based on given duration and ease out time 921 // set stop time based on given duration and ease out time
846 if (motion->getDuration() != 0.f && !motion->getLoop()) 922 if (motion->getDuration() != 0.f && !motion->getLoop())
@@ -861,13 +937,26 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
861 { 937 {
862 motion->mSendStopTimestamp = F32_MAX; 938 motion->mSendStopTimestamp = F32_MAX;
863 } 939 }
864 940
865 mActiveMotions.remove(motion); // in case it is already in the active list 941 if (motion->isActive())
942 {
943 mActiveMotions.remove(motion);
944 }
866 mActiveMotions.push_front(motion); 945 mActiveMotions.push_front(motion);
867 946
868 motion->activate(); 947 motion->activate(time);
869 motion->onUpdate(0.f, mJointSignature[1]); 948 motion->onUpdate(0.f, mJointSignature[1]);
870 949
950 if (mAnimTime >= motion->mSendStopTimestamp)
951 {
952 motion->setStopTime(motion->mSendStopTimestamp);
953 if (motion->mResidualWeight == 0.0f)
954 {
955 // bit of a hack; if newly activating a motion while easing out, weight should = 1
956 motion->mResidualWeight = 1.f;
957 }
958 }
959
871 return TRUE; 960 return TRUE;
872} 961}
873 962
@@ -924,9 +1013,17 @@ bool LLMotionController::isMotionLoading(LLMotion* motion)
924//----------------------------------------------------------------------------- 1013//-----------------------------------------------------------------------------
925// findMotion() 1014// findMotion()
926//----------------------------------------------------------------------------- 1015//-----------------------------------------------------------------------------
927LLMotion *LLMotionController::findMotion(const LLUUID& id) 1016LLMotion* LLMotionController::findMotion(const LLUUID& id)
928{ 1017{
929 return get_if_there<LLUUID, LLMotion*>(mAllMotions, id, NULL); 1018 motion_map_t::iterator iter = mAllMotions.find(id);
1019 if(iter == mAllMotions.end())
1020 {
1021 return NULL;
1022 }
1023 else
1024 {
1025 return iter->second;
1026 }
930} 1027}
931 1028
932//----------------------------------------------------------------------------- 1029//-----------------------------------------------------------------------------
@@ -934,16 +1031,12 @@ LLMotion *LLMotionController::findMotion(const LLUUID& id)
934//----------------------------------------------------------------------------- 1031//-----------------------------------------------------------------------------
935void LLMotionController::deactivateAllMotions() 1032void LLMotionController::deactivateAllMotions()
936{ 1033{
937 //They must all die, precious. 1034 for (motion_map_t::iterator iter = mAllMotions.begin();
938 for (std::map<LLUUID, LLMotion*>::iterator iter = mAllMotions.begin();
939 iter != mAllMotions.end(); iter++) 1035 iter != mAllMotions.end(); iter++)
940 { 1036 {
941 LLMotion* motionp = iter->second; 1037 LLMotion* motionp = iter->second;
942 if (motionp) motionp->deactivate(); 1038 deactivateMotionInstance(motionp);
943 } 1039 }
944
945 // delete all motion instances
946 deleteAllMotions();
947} 1040}
948 1041
949 1042
@@ -959,11 +1052,12 @@ void LLMotionController::flushAllMotions()
959 { 1052 {
960 motion_list_t::iterator curiter = iter++; 1053 motion_list_t::iterator curiter = iter++;
961 LLMotion* motionp = *curiter; 1054 LLMotion* motionp = *curiter;
962 F32 dtime = mTime - motionp->mActivationTimestamp; 1055 F32 dtime = mAnimTime - motionp->mActivationTimestamp;
963 active_motions.push_back(std::make_pair(motionp->getID(),dtime)); 1056 active_motions.push_back(std::make_pair(motionp->getID(),dtime));
964 motionp->deactivate(); 1057 motionp->deactivate(); // don't call deactivateMotionInstance() because we are going to reactivate it
965 } 1058 }
966 1059 mActiveMotions.clear();
1060
967 // delete all motion instances 1061 // delete all motion instances
968 deleteAllMotions(); 1062 deleteAllMotions();
969 1063
@@ -982,12 +1076,11 @@ void LLMotionController::flushAllMotions()
982//----------------------------------------------------------------------------- 1076//-----------------------------------------------------------------------------
983// pause() 1077// pause()
984//----------------------------------------------------------------------------- 1078//-----------------------------------------------------------------------------
985void LLMotionController::pause() 1079void LLMotionController::pauseAllMotions()
986{ 1080{
987 if (!mPaused) 1081 if (!mPaused)
988 { 1082 {
989 //llinfos << "Pausing animations..." << llendl; 1083 //llinfos << "Pausing animations..." << llendl;
990 mPauseTime = mTimer.getElapsedTimeF32();
991 mPaused = TRUE; 1084 mPaused = TRUE;
992 } 1085 }
993 1086
@@ -996,13 +1089,11 @@ void LLMotionController::pause()
996//----------------------------------------------------------------------------- 1089//-----------------------------------------------------------------------------
997// unpause() 1090// unpause()
998//----------------------------------------------------------------------------- 1091//-----------------------------------------------------------------------------
999void LLMotionController::unpause() 1092void LLMotionController::unpauseAllMotions()
1000{ 1093{
1001 if (mPaused) 1094 if (mPaused)
1002 { 1095 {
1003 //llinfos << "Unpausing animations..." << llendl; 1096 //llinfos << "Unpausing animations..." << llendl;
1004 mTimer.reset();
1005 mTimer.setAge(mPauseTime);
1006 mPaused = FALSE; 1097 mPaused = FALSE;
1007 } 1098 }
1008} 1099}
diff --git a/linden/indra/llcharacter/llmotioncontroller.h b/linden/indra/llcharacter/llmotioncontroller.h
index 48e184d..209f689 100644
--- a/linden/indra/llcharacter/llmotioncontroller.h
+++ b/linden/indra/llcharacter/llmotioncontroller.h
@@ -57,30 +57,6 @@ class LLCharacter;
57//----------------------------------------------------------------------------- 57//-----------------------------------------------------------------------------
58typedef LLMotion*(*LLMotionConstructor)(const LLUUID &id); 58typedef LLMotion*(*LLMotionConstructor)(const LLUUID &id);
59 59
60class LLMotionTableEntry
61{
62public:
63 LLMotionTableEntry();
64 LLMotionTableEntry(LLMotionConstructor constructor, const LLUUID& id);
65 ~LLMotionTableEntry(){};
66
67 LLMotion* create(const LLUUID& id);
68 static BOOL uuidEq(const LLUUID &uuid, const LLMotionTableEntry &id_pair)
69 {
70 if (uuid == id_pair.mID)
71 {
72 return TRUE;
73 }
74 return FALSE;
75 }
76
77 const LLUUID& getID() { return mID; }
78
79protected:
80 LLMotionConstructor mConstructor;
81 LLUUID mID;
82};
83
84class LLMotionRegistry 60class LLMotionRegistry
85{ 61{
86public: 62public:
@@ -92,7 +68,7 @@ public:
92 68
93 // adds motion classes to the registry 69 // adds motion classes to the registry
94 // returns true if successfull 70 // returns true if successfull
95 BOOL addMotion( const LLUUID& id, LLMotionConstructor create); 71 BOOL registerMotion( const LLUUID& id, LLMotionConstructor create);
96 72
97 // creates a new instance of a named motion 73 // creates a new instance of a named motion
98 // returns NULL motion is not registered 74 // returns NULL motion is not registered
@@ -103,7 +79,8 @@ public:
103 79
104 80
105protected: 81protected:
106 LLUUIDHashMap<LLMotionTableEntry, 32> mMotionTable; 82 typedef std::map<LLUUID, LLMotionConstructor> motion_map_t;
83 motion_map_t mMotionTable;
107}; 84};
108 85
109//----------------------------------------------------------------------------- 86//-----------------------------------------------------------------------------
@@ -130,7 +107,7 @@ public:
130 // registers a motion with the controller 107 // registers a motion with the controller
131 // (actually just forwards call to motion registry) 108 // (actually just forwards call to motion registry)
132 // returns true if successfull 109 // returns true if successfull
133 BOOL addMotion( const LLUUID& id, LLMotionConstructor create ); 110 BOOL registerMotion( const LLUUID& id, LLMotionConstructor create );
134 111
135 // creates a motion from the registry 112 // creates a motion from the registry
136 LLMotion *createMotion( const LLUUID &id ); 113 LLMotion *createMotion( const LLUUID &id );
@@ -151,11 +128,17 @@ public:
151 // returns true if successful 128 // returns true if successful
152 BOOL stopMotionLocally( const LLUUID &id, BOOL stop_immediate ); 129 BOOL stopMotionLocally( const LLUUID &id, BOOL stop_immediate );
153 130
131 // Move motions from loading to loaded
132 void updateLoadingMotions();
133
154 // update motions 134 // update motions
155 // invokes the update handlers for each active motion 135 // invokes the update handlers for each active motion
156 // activates sequenced motions 136 // activates sequenced motions
157 // deactivates terminated motions` 137 // deactivates terminated motions`
158 void updateMotion(); 138 void updateMotions(bool force_update = false);
139
140 // minimal update (e.g. while hidden)
141 void updateMotionsMinimal();
159 142
160 void clearBlenders() { mPoseBlender.clearBlenders(); } 143 void clearBlenders() { mPoseBlender.clearBlenders(); }
161 144
@@ -167,8 +150,8 @@ public:
167 void deactivateAllMotions(); 150 void deactivateAllMotions();
168 151
169 // pause and continue all motions 152 // pause and continue all motions
170 void pause(); 153 void pauseAllMotions();
171 void unpause(); 154 void unpauseAllMotions();
172 BOOL isPaused() { return mPaused; } 155 BOOL isPaused() { return mPaused; }
173 156
174 void setTimeStep(F32 step); 157 void setTimeStep(F32 step);
@@ -178,6 +161,8 @@ public:
178 161
179 motion_list_t& getActiveMotions() { return mActiveMotions; } 162 motion_list_t& getActiveMotions() { return mActiveMotions; }
180 163
164 void incMotionCounts(S32& num_motions, S32& num_loading_motions, S32& num_loaded_motions, S32& num_active_motions, S32& num_deprecated_motions);
165
181//protected: 166//protected:
182 bool isMotionActive( LLMotion *motion ); 167 bool isMotionActive( LLMotion *motion );
183 bool isMotionLoading( LLMotion *motion ); 168 bool isMotionLoading( LLMotion *motion );
@@ -187,7 +172,6 @@ protected:
187 // internal operations act on motion instances directly 172 // internal operations act on motion instances directly
188 // as there can be duplicate motions per id during blending overlap 173 // as there can be duplicate motions per id during blending overlap
189 void deleteAllMotions(); 174 void deleteAllMotions();
190 void addLoadedMotion(LLMotion *motion);
191 BOOL activateMotionInstance(LLMotion *motion, F32 time); 175 BOOL activateMotionInstance(LLMotion *motion, F32 time);
192 BOOL deactivateMotionInstance(LLMotion *motion); 176 BOOL deactivateMotionInstance(LLMotion *motion);
193 void deprecateMotionInstance(LLMotion* motion); 177 void deprecateMotionInstance(LLMotion* motion);
@@ -197,6 +181,10 @@ protected:
197 void updateAdditiveMotions(); 181 void updateAdditiveMotions();
198 void resetJointSignatures(); 182 void resetJointSignatures();
199 void updateMotionsByType(LLMotion::LLMotionBlendType motion_type); 183 void updateMotionsByType(LLMotion::LLMotionBlendType motion_type);
184 void updateIdleMotion(LLMotion* motionp);
185 void updateIdleActiveMotions();
186 void purgeExcessMotions();
187 void deactivateStoppedMotions();
200 188
201protected: 189protected:
202 F32 mTimeFactor; 190 F32 mTimeFactor;
@@ -210,20 +198,20 @@ protected:
210// Animations are instantiated and immediately put in the mAllMotions map for their entire lifetime. 198// Animations are instantiated and immediately put in the mAllMotions map for their entire lifetime.
211// If the animations depend on any asset data, the appropriate data is fetched from the data server, 199// If the animations depend on any asset data, the appropriate data is fetched from the data server,
212// and the animation is put on the mLoadingMotions list. 200// and the animation is put on the mLoadingMotions list.
213// Once an animations is loaded, it will be initialized and put on the mLoadedMotions deque. 201// Once an animations is loaded, it will be initialized and put on the mLoadedMotions list.
214// Any animation that is currently playing also sits in the mActiveMotions list. 202// Any animation that is currently playing also sits in the mActiveMotions list.
215 203
216 typedef std::map<LLUUID, LLMotion*> motion_map_t; 204 typedef std::map<LLUUID, LLMotion*> motion_map_t;
217 motion_map_t mAllMotions; 205 motion_map_t mAllMotions;
218 206
219 motion_set_t mLoadingMotions; 207 motion_set_t mLoadingMotions;
220 motion_list_t mLoadedMotions; 208 motion_set_t mLoadedMotions;
221 motion_list_t mActiveMotions; 209 motion_list_t mActiveMotions;
222 motion_set_t mDeprecatedMotions; 210 motion_set_t mDeprecatedMotions;
223 211
224 LLFrameTimer mTimer; 212 LLFrameTimer mTimer;
225 F32 mTime; 213 F32 mPrevTimerElapsed;
226 F32 mTimeOffset; 214 F32 mAnimTime;
227 F32 mLastTime; 215 F32 mLastTime;
228 BOOL mHasRunOnce; 216 BOOL mHasRunOnce;
229 BOOL mPaused; 217 BOOL mPaused;
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h
index 75cc463..4121eb5 100644
--- a/linden/indra/llcommon/llversionviewer.h
+++ b/linden/indra/llcommon/llversionviewer.h
@@ -34,7 +34,7 @@
34 34
35const S32 LL_VERSION_MAJOR = 1; 35const S32 LL_VERSION_MAJOR = 1;
36const S32 LL_VERSION_MINOR = 20; 36const S32 LL_VERSION_MINOR = 20;
37const S32 LL_VERSION_PATCH = 10; 37const S32 LL_VERSION_PATCH = 11;
38const S32 LL_VERSION_BUILD = 0; 38const S32 LL_VERSION_BUILD = 0;
39 39
40const char * const LL_CHANNEL = "Second Life Release"; 40const char * const LL_CHANNEL = "Second Life Release";
diff --git a/linden/indra/llcrashlogger/llcrashlogger.cpp b/linden/indra/llcrashlogger/llcrashlogger.cpp
index 0fd8f63..306046a 100755
--- a/linden/indra/llcrashlogger/llcrashlogger.cpp
+++ b/linden/indra/llcrashlogger/llcrashlogger.cpp
@@ -158,7 +158,15 @@ void LLCrashLogger::gatherFiles()
158 LLSDSerialize::fromXML(mDebugLog, debug_log_file); 158 LLSDSerialize::fromXML(mDebugLog, debug_log_file);
159 mFileMap["SecondLifeLog"] = mDebugLog["SLLog"].asString(); 159 mFileMap["SecondLifeLog"] = mDebugLog["SLLog"].asString();
160 mFileMap["SettingsXml"] = mDebugLog["SettingsFilename"].asString(); 160 mFileMap["SettingsXml"] = mDebugLog["SettingsFilename"].asString();
161 LLCurl::setCAFile(mDebugLog["CAFilename"].asString()); 161 if(mDebugLog.has("CAFilename"))
162 {
163 LLCurl::setCAFile(mDebugLog["CAFilename"].asString());
164 }
165 else
166 {
167 LLCurl::setCAFile(gDirUtilp->getCAFile());
168 }
169
162 llinfos << "Using log file from debug log " << mFileMap["SecondLifeLog"] << llendl; 170 llinfos << "Using log file from debug log " << mFileMap["SecondLifeLog"] << llendl;
163 llinfos << "Using settings file from debug log " << mFileMap["SettingsXml"] << llendl; 171 llinfos << "Using settings file from debug log " << mFileMap["SettingsXml"] << llendl;
164 } 172 }
diff --git a/linden/indra/llimage/llimage.cpp b/linden/indra/llimage/llimage.cpp
index 65d19de..508be01 100644
--- a/linden/indra/llimage/llimage.cpp
+++ b/linden/indra/llimage/llimage.cpp
@@ -842,8 +842,8 @@ void LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
842 U8* temp_buffer = new U8[ temp_data_size ]; 842 U8* temp_buffer = new U8[ temp_data_size ];
843 if (!temp_buffer) 843 if (!temp_buffer)
844 { 844 {
845 llerrs << "Out of memory in LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )" << llendl; 845 llerrs << "Out of memory in LLImageRaw::scale: old (w, h, c) = (" << old_width << ", " << old_height << ", " << (S32)getComponents() <<
846 return; 846 ") ; new (w, h, c) = (" << new_width << ", " << new_height << ", " << (S32)getComponents() << ")" << llendl;
847 } 847 }
848 memcpy(temp_buffer, getData(), temp_data_size); /* Flawfinder: ignore */ 848 memcpy(temp_buffer, getData(), temp_data_size); /* Flawfinder: ignore */
849 849
diff --git a/linden/indra/llrender/llimagegl.cpp b/linden/indra/llrender/llimagegl.cpp
index 454a5bb..a402814 100644
--- a/linden/indra/llrender/llimagegl.cpp
+++ b/linden/indra/llrender/llimagegl.cpp
@@ -61,8 +61,6 @@ S32 LLImageGL::sCount = 0;
61BOOL LLImageGL::sGlobalUseAnisotropic = FALSE; 61BOOL LLImageGL::sGlobalUseAnisotropic = FALSE;
62F32 LLImageGL::sLastFrameTime = 0.f; 62F32 LLImageGL::sLastFrameTime = 0.f;
63 63
64BOOL LLImageGL::sRefCheck = TRUE ;
65
66std::set<LLImageGL*> LLImageGL::sImageList; 64std::set<LLImageGL*> LLImageGL::sImageList;
67 65
68//---------------------------------------------------------------------------- 66//----------------------------------------------------------------------------
@@ -279,9 +277,7 @@ LLImageGL::LLImageGL(const LLImageRaw* imageraw, BOOL usemipmaps)
279 sImageList.insert(this); 277 sImageList.insert(this);
280 sCount++; 278 sCount++;
281 279
282 sRefCheck = FALSE ;
283 createGLTexture(0, imageraw); 280 createGLTexture(0, imageraw);
284 sRefCheck = TRUE ;
285} 281}
286 282
287LLImageGL::~LLImageGL() 283LLImageGL::~LLImageGL()
@@ -426,9 +422,7 @@ void LLImageGL::dump()
426//---------------------------------------------------------------------------- 422//----------------------------------------------------------------------------
427 423
428BOOL LLImageGL::bindTextureInternal(const S32 stage) const 424BOOL LLImageGL::bindTextureInternal(const S32 stage) const
429{ 425{
430 llassert_always(!sRefCheck || (getNumRefs() > 0 && getNumRefs() < 100000)) ;
431
432 if (gGLManager.mIsDisabled) 426 if (gGLManager.mIsDisabled)
433 { 427 {
434 llwarns << "Trying to bind a texture while GL is disabled!" << llendl; 428 llwarns << "Trying to bind a texture while GL is disabled!" << llendl;
diff --git a/linden/indra/llrender/llimagegl.h b/linden/indra/llrender/llimagegl.h
index 99a6e49..3f231ee 100644
--- a/linden/indra/llrender/llimagegl.h
+++ b/linden/indra/llrender/llimagegl.h
@@ -207,9 +207,6 @@ public:
207#else 207#else
208 BOOL getMissed() const { return FALSE; }; 208 BOOL getMissed() const { return FALSE; };
209#endif 209#endif
210
211private://paranoia error check
212 static BOOL sRefCheck ;
213}; 210};
214 211
215#endif // LL_LLIMAGEGL_H 212#endif // LL_LLIMAGEGL_H
diff --git a/linden/indra/llwindow/llgl.cpp b/linden/indra/llwindow/llgl.cpp
index e8169b6..debf2e3 100644
--- a/linden/indra/llwindow/llgl.cpp
+++ b/linden/indra/llwindow/llgl.cpp
@@ -990,6 +990,12 @@ void LLGLState::initClass()
990{ 990{
991 sStateMap[GL_DITHER] = GL_TRUE; 991 sStateMap[GL_DITHER] = GL_TRUE;
992 sStateMap[GL_TEXTURE_2D] = GL_TRUE; 992 sStateMap[GL_TEXTURE_2D] = GL_TRUE;
993
994 //make sure vertex arrays are enabled
995 glEnableClientState(GL_VERTEX_ARRAY);
996
997 //make sure multi sampling is disabled by default
998 glDisable(GL_MULTISAMPLE_ARB);
993} 999}
994 1000
995//static 1001//static
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp
index 70487b7..2001899 100644
--- a/linden/indra/llwindow/llwindowwin32.cpp
+++ b/linden/indra/llwindow/llwindowwin32.cpp
@@ -1346,9 +1346,6 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
1346 SetWindowLong(mWindowHandle, GWL_USERDATA, (U32)this); 1346 SetWindowLong(mWindowHandle, GWL_USERDATA, (U32)this);
1347 show(); 1347 show();
1348 1348
1349 //make sure multi sampling is disabled by default
1350 glDisable(GL_MULTISAMPLE_ARB);
1351
1352 //register joystick timer callback 1349 //register joystick timer callback
1353 SetTimer( mWindowHandle, 0, 1000 / 30, NULL ); // 30 fps timer 1350 SetTimer( mWindowHandle, 0, 1000 / 30, NULL ); // 30 fps timer
1354 1351
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 18ca143..9d074ad 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -9921,7 +9921,7 @@
9921 <key>Type</key> 9921 <key>Type</key>
9922 <string>Boolean</string> 9922 <string>Boolean</string>
9923 <key>Value</key> 9923 <key>Value</key>
9924 <integer>0</integer> 9924 <integer>1</integer>
9925 </map> 9925 </map>
9926 <key>WaterEditPresets</key> 9926 <key>WaterEditPresets</key>
9927 <map> 9927 <map>
diff --git a/linden/indra/newview/gpu_table.txt b/linden/indra/newview/gpu_table.txt
index f0b0f0c..f038e0f 100644
--- a/linden/indra/newview/gpu_table.txt
+++ b/linden/indra/newview/gpu_table.txt
@@ -186,6 +186,7 @@ NVIDIA GeForce Go 6700 .*NVIDIA.*GeForce Go 67.* 1 1
186NVIDIA GeForce Go 6800 .*NVIDIA.*GeForce Go 68.* 1 1 186NVIDIA GeForce Go 6800 .*NVIDIA.*GeForce Go 68.* 1 1
187NVIDIA GeForce Go 7200 .*NVIDIA.*GeForce Go 72.* 1 1 187NVIDIA GeForce Go 7200 .*NVIDIA.*GeForce Go 72.* 1 1
188NVIDIA GeForce Go 7300 .*NVIDIA.*GeForce Go 73.* 1 1 188NVIDIA GeForce Go 7300 .*NVIDIA.*GeForce Go 73.* 1 1
189NVIDIA GeForce Go 7300 LE .*NVIDIA.*GeForce Go 73.*LE.* 0 1
189NVIDIA GeForce Go 7400 .*NVIDIA.*GeForce Go 74.* 1 1 190NVIDIA GeForce Go 7400 .*NVIDIA.*GeForce Go 74.* 1 1
190NVIDIA GeForce Go 7600 .*NVIDIA.*GeForce Go 76.* 2 1 191NVIDIA GeForce Go 7600 .*NVIDIA.*GeForce Go 76.* 2 1
191NVIDIA GeForce Go 7700 .*NVIDIA.*GeForce Go 77.* 2 1 192NVIDIA GeForce Go 7700 .*NVIDIA.*GeForce Go 77.* 2 1
@@ -194,6 +195,7 @@ NVIDIA GeForce Go 7900 .*NVIDIA.*GeForce Go 79.* 2 1
194NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1 195NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1
195NVIDIA GeForce PCX .*GeForce PCX.* 0 1 196NVIDIA GeForce PCX .*GeForce PCX.* 0 1
196NVIDIA Generic .*NVIDIA.*Unknown.* 0 0 197NVIDIA Generic .*NVIDIA.*Unknown.* 0 0
198NVIDIA NV34 .*NVIDIA.*NV34.* 0 1
197NVIDIA NV43 .*NVIDIA.*NV43.* 1 1 199NVIDIA NV43 .*NVIDIA.*NV43.* 1 1
198NVIDIA MCP78 .*NVIDIA.*MCP78.* 1 1 200NVIDIA MCP78 .*NVIDIA.*MCP78.* 1 1
199NVIDIA Quadro2 .*Quadro2.* 0 1 201NVIDIA Quadro2 .*Quadro2.* 0 1
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index 1d3c5d4..b65a1f6 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -6429,6 +6429,7 @@ BOOL LLAgent::isWearingItem( const LLUUID& item_id )
6429 return (getWearableFromWearableItem( item_id ) != NULL); 6429 return (getWearableFromWearableItem( item_id ) != NULL);
6430} 6430}
6431 6431
6432extern LLString gInitialOutfit;
6432 6433
6433// static 6434// static
6434void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void** user_data ) 6435void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void** user_data )
@@ -6468,8 +6469,12 @@ void LLAgent::processAgentInitialWearablesUpdate( LLMessageSystem* mesgsys, void
6468 //avatar->createStandardWearables(); 6469 //avatar->createStandardWearables();
6469 6470
6470 // no, deal with it by noting that we need to choose a 6471 // no, deal with it by noting that we need to choose a
6471 // gender. 6472 // gender, but only if an initial outfit load isn't happening.
6472 gAgent.setGenderChosen(FALSE); 6473 // This whole check (num_wearables < 4) can probably be deleted. JC
6474 if (gInitialOutfit.empty())
6475 {
6476 gAgent.setGenderChosen(FALSE);
6477 }
6473 return; 6478 return;
6474 } 6479 }
6475 6480
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 96d96dc..1ec2c14 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -530,7 +530,7 @@ void LLAppViewer::initGridChoice()
530 LLString custom_server = gSavedSettings.getString("CustomServer"); 530 LLString custom_server = gSavedSettings.getString("CustomServer");
531 LLViewerLogin::getInstance()->setGridChoice(custom_server); 531 LLViewerLogin::getInstance()->setGridChoice(custom_server);
532 } 532 }
533 else if(server != 0) 533 else if(server != (S32)GRID_INFO_NONE)
534 { 534 {
535 LLViewerLogin::getInstance()->setGridChoice((EGridInfo)server); 535 LLViewerLogin::getInstance()->setGridChoice((EGridInfo)server);
536 } 536 }
@@ -1139,12 +1139,12 @@ bool LLAppViewer::cleanup()
1139 1139
1140 llinfos << "Cleaning Up" << llendflush; 1140 llinfos << "Cleaning Up" << llendflush;
1141 1141
1142 LLKeyframeDataCache::clear();
1143
1144 // Must clean up texture references before viewer window is destroyed. 1142 // Must clean up texture references before viewer window is destroyed.
1145 LLHUDObject::cleanupHUDObjects(); 1143 LLHUDObject::cleanupHUDObjects();
1146 llinfos << "HUD Objects cleaned up" << llendflush; 1144 llinfos << "HUD Objects cleaned up" << llendflush;
1147 1145
1146 LLKeyframeDataCache::clear();
1147
1148 // End TransferManager before deleting systems it depends on (Audio, VFS, AssetStorage) 1148 // End TransferManager before deleting systems it depends on (Audio, VFS, AssetStorage)
1149#if 0 // this seems to get us stuck in an infinite loop... 1149#if 0 // this seems to get us stuck in an infinite loop...
1150 gTransferManager.cleanup(); 1150 gTransferManager.cleanup();
@@ -1322,7 +1322,7 @@ bool LLAppViewer::cleanup()
1322 1322
1323 removeMarkerFile(); // Any crashes from here on we'll just have to ignore 1323 removeMarkerFile(); // Any crashes from here on we'll just have to ignore
1324 1324
1325 closeDebug(); 1325 writeDebugInfo();
1326 1326
1327 // Let threads finish 1327 // Let threads finish
1328 LLTimer idleTimer; 1328 LLTimer idleTimer;
@@ -2139,7 +2139,7 @@ bool LLAppViewer::initWindow()
2139 return true; 2139 return true;
2140} 2140}
2141 2141
2142void LLAppViewer::closeDebug() 2142void LLAppViewer::writeDebugInfo()
2143{ 2143{
2144 std::string debug_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log"); 2144 std::string debug_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log");
2145 llinfos << "Opening debug file " << debug_filename << llendl; 2145 llinfos << "Opening debug file " << debug_filename << llendl;
@@ -2219,6 +2219,8 @@ void LLAppViewer::writeSystemInfo()
2219 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; 2219 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
2220 gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; 2220 gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
2221 2221
2222 gDebugInfo["CAFilename"] = gDirUtilp->getCAFile();
2223
2222 gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString(); 2224 gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString();
2223 gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily(); 2225 gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily();
2224 gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz(); 2226 gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz();
@@ -2257,6 +2259,8 @@ void LLAppViewer::writeSystemInfo()
2257 LL_INFOS("SystemInfo") << "Memory info:\n" << gSysMemory << LL_ENDL; 2259 LL_INFOS("SystemInfo") << "Memory info:\n" << gSysMemory << LL_ENDL;
2258 LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL; 2260 LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL;
2259 LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL; 2261 LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL;
2262
2263 writeDebugInfo(); // Save out debug_info.log early, in case of crash.
2260} 2264}
2261 2265
2262void LLAppViewer::handleSyncViewerCrash() 2266void LLAppViewer::handleSyncViewerCrash()
@@ -2376,7 +2380,7 @@ void LLAppViewer::handleViewerCrash()
2376 LLWorld::getInstance()->getInfo(gDebugInfo); 2380 LLWorld::getInstance()->getInfo(gDebugInfo);
2377 2381
2378 // Close the debug file 2382 // Close the debug file
2379 pApp->closeDebug(); 2383 pApp->writeDebugInfo();
2380 2384
2381 LLError::logToFile(""); 2385 LLError::logToFile("");
2382 2386
diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h
index 02406be..c98be41 100644
--- a/linden/indra/newview/llappviewer.h
+++ b/linden/indra/newview/llappviewer.h
@@ -70,7 +70,7 @@ public:
70 bool quitRequested() { return mQuitRequested; } 70 bool quitRequested() { return mQuitRequested; }
71 bool logoutRequestSent() { return mLogoutRequestSent; } 71 bool logoutRequestSent() { return mLogoutRequestSent; }
72 72
73 void closeDebug(); 73 void writeDebugInfo();
74 74
75 const LLOSInfo& getOSInfo() const { return mSysOSInfo; } 75 const LLOSInfo& getOSInfo() const { return mSysOSInfo; }
76 76
diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp
index a228f68..71c9ebb 100644
--- a/linden/indra/newview/lldrawable.cpp
+++ b/linden/indra/newview/lldrawable.cpp
@@ -127,7 +127,6 @@ void LLDrawable::destroy()
127 llerrs << "Illegal deletion of LLDrawable!" << llendl; 127 llerrs << "Illegal deletion of LLDrawable!" << llendl;
128 } 128 }
129 129
130 LLFace::sDeleteLock = mFaces.size() ;
131 std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); 130 std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
132 mFaces.clear(); 131 mFaces.clear();
133 132
@@ -190,7 +189,6 @@ void LLDrawable::cleanupReferences()
190{ 189{
191 LLFastTimer t(LLFastTimer::FTM_PIPELINE); 190 LLFastTimer t(LLFastTimer::FTM_PIPELINE);
192 191
193 LLFace::sDeleteLock = mFaces.size() ;
194 std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); 192 std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
195 mFaces.clear(); 193 mFaces.clear();
196 194
@@ -284,7 +282,6 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImag
284 } 282 }
285 else if (newFaces < (S32)mFaces.size()) 283 else if (newFaces < (S32)mFaces.size())
286 { 284 {
287 LLFace::sDeleteLock = (S32)mFaces.size() - newFaces ;
288 std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer()); 285 std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer());
289 mFaces.erase(mFaces.begin() + newFaces, mFaces.end()); 286 mFaces.erase(mFaces.begin() + newFaces, mFaces.end());
290 } 287 }
@@ -308,7 +305,6 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer
308 } 305 }
309 else if (newFaces < (S32)mFaces.size()) 306 else if (newFaces < (S32)mFaces.size())
310 { 307 {
311 LLFace::sDeleteLock = (S32)mFaces.size() - newFaces ;
312 std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer()); 308 std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer());
313 mFaces.erase(mFaces.begin() + newFaces, mFaces.end()); 309 mFaces.erase(mFaces.begin() + newFaces, mFaces.end());
314 } 310 }
@@ -343,12 +339,8 @@ void LLDrawable::deleteFaces(S32 offset, S32 count)
343 face_list_t::iterator face_begin = mFaces.begin() + offset; 339 face_list_t::iterator face_begin = mFaces.begin() + offset;
344 face_list_t::iterator face_end = face_begin + count; 340 face_list_t::iterator face_end = face_begin + count;
345 341
346 S32 end = (S32)mFaces.size() ;
347 LLFace::sDeleteLock = count ;
348 std::for_each(face_begin, face_end, DeletePointer()); 342 std::for_each(face_begin, face_end, DeletePointer());
349 mFaces.erase(face_begin, face_end); 343 mFaces.erase(face_begin, face_end);
350
351 llassert_always(mFaces.size() == end - count) ;
352} 344}
353 345
354void LLDrawable::update() 346void LLDrawable::update()
@@ -526,7 +518,7 @@ F32 LLDrawable::updateXform(BOOL undamped)
526 } 518 }
527 519
528 if ((mCurrentScale != target_scale) || 520 if ((mCurrentScale != target_scale) ||
529 (!isRoot() && (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED*camdist2))) 521 (!isRoot() && (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED) || !mVObjp->getAngularVelocity().isExactlyZero()))
530 { //child prim moving or scale change requires immediate rebuild 522 { //child prim moving or scale change requires immediate rebuild
531 gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); 523 gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE);
532 } 524 }
diff --git a/linden/indra/newview/lldrawpoolalpha.cpp b/linden/indra/newview/lldrawpoolalpha.cpp
index efe774f..ca8f3b4 100644
--- a/linden/indra/newview/lldrawpoolalpha.cpp
+++ b/linden/indra/newview/lldrawpoolalpha.cpp
@@ -230,7 +230,6 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
230 230
231 if (texture && params.mTexture.notNull()) 231 if (texture && params.mTexture.notNull())
232 { 232 {
233 llassert_always(gGL.getTexUnit(0)) ;
234 gGL.getTexUnit(0)->activate(); 233 gGL.getTexUnit(0)->activate();
235 params.mTexture->bind(); 234 params.mTexture->bind();
236 params.mTexture->addTextureStats(params.mVSize); 235 params.mTexture->addTextureStats(params.mVSize);
diff --git a/linden/indra/newview/lldrawpoolavatar.cpp b/linden/indra/newview/lldrawpoolavatar.cpp
index fe5d4cd..4e1e390 100644
--- a/linden/indra/newview/lldrawpoolavatar.cpp
+++ b/linden/indra/newview/lldrawpoolavatar.cpp
@@ -452,7 +452,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
452 return; 452 return;
453 } 453 }
454 454
455 if (single_avatar && avatarp->mSpecialRenderMode >= 2) // 2=image preview, 3=morph view 455 if (single_avatar && avatarp->mSpecialRenderMode >= 1) // 1=anim preview, 2=image preview, 3=morph view
456 { 456 {
457 gPipeline.enableLightsAvatarEdit(LLColor4(.5f, .5f, .5f, 1.f)); 457 gPipeline.enableLightsAvatarEdit(LLColor4(.5f, .5f, .5f, 1.f));
458 } 458 }
diff --git a/linden/indra/newview/lldrawpoolbump.cpp b/linden/indra/newview/lldrawpoolbump.cpp
index 6154c5b..68fa934 100644
--- a/linden/indra/newview/lldrawpoolbump.cpp
+++ b/linden/indra/newview/lldrawpoolbump.cpp
@@ -584,10 +584,6 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params)
584 if( tex ) 584 if( tex )
585 { 585 {
586 bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code ); 586 bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code );
587 //------------------------------------------
588 //error check to make sure bump is valid
589 llassert_always(!bump || bump->getNumRefs() == 1) ;
590 //------------------------------------------
591 } 587 }
592 break; 588 break;
593 589
@@ -602,11 +598,6 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params)
602 598
603 if (bump) 599 if (bump)
604 { 600 {
605 //------------------------------------------
606 //error check to make sure bump is valid
607 llassert_always(bump->getNumRefs() > 0 && bump->getNumRefs() < 100000) ;
608 //------------------------------------------
609
610 bump->bind(1); 601 bump->bind(1);
611 bump->bind(0); 602 bump->bind(0);
612 return TRUE; 603 return TRUE;
diff --git a/linden/indra/newview/lldriverparam.cpp b/linden/indra/newview/lldriverparam.cpp
index dcae69d..4809182 100644
--- a/linden/indra/newview/lldriverparam.cpp
+++ b/linden/indra/newview/lldriverparam.cpp
@@ -34,6 +34,7 @@
34#include "lldriverparam.h" 34#include "lldriverparam.h"
35 35
36#include "llfasttimer.h" 36#include "llfasttimer.h"
37#include "llvoavatar.h"
37 38
38//----------------------------------------------------------------------------- 39//-----------------------------------------------------------------------------
39// LLDriverParamInfo 40// LLDriverParamInfo
diff --git a/linden/indra/newview/lldriverparam.h b/linden/indra/newview/lldriverparam.h
index d767d6b..afcda9c 100644
--- a/linden/indra/newview/lldriverparam.h
+++ b/linden/indra/newview/lldriverparam.h
@@ -32,9 +32,10 @@
32#ifndef LL_LLDRIVERPARAM_H 32#ifndef LL_LLDRIVERPARAM_H
33#define LL_LLDRIVERPARAM_H 33#define LL_LLDRIVERPARAM_H
34 34
35#include "llvoavatar.h"
36#include "llviewervisualparam.h" 35#include "llviewervisualparam.h"
37 36
37class LLVOAvatar;
38
38//----------------------------------------------------------------------------- 39//-----------------------------------------------------------------------------
39 40
40struct LLDrivenEntryInfo 41struct LLDrivenEntryInfo
diff --git a/linden/indra/newview/llface.cpp b/linden/indra/newview/llface.cpp
index 77251ce..3e0c5b2 100644
--- a/linden/indra/newview/llface.cpp
+++ b/linden/indra/newview/llface.cpp
@@ -57,7 +57,6 @@
57extern BOOL gPickFaces; 57extern BOOL gPickFaces;
58 58
59BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE 59BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE
60S32 LLFace::sDeleteLock = 0 ;
61 60
62#define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2]) 61#define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2])
63 62
@@ -178,9 +177,6 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
178 177
179void LLFace::destroy() 178void LLFace::destroy()
180{ 179{
181 llassert_always(sDeleteLock >= 1);
182 --sDeleteLock;
183
184 mDrawablep = NULL; 180 mDrawablep = NULL;
185 mVObjp = NULL; 181 mVObjp = NULL;
186 182
diff --git a/linden/indra/newview/llface.h b/linden/indra/newview/llface.h
index 35063a0..533851c 100644
--- a/linden/indra/newview/llface.h
+++ b/linden/indra/newview/llface.h
@@ -296,9 +296,6 @@ public:
296 lhs->getTexture() < rhs->getTexture(); 296 lhs->getTexture() < rhs->getTexture();
297 } 297 }
298 }; 298 };
299
300public://paranoia check only
301 static S32 sDeleteLock ;
302}; 299};
303 300
304#endif // LL_LLFACE_H 301#endif // LL_LLFACE_H
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp
index ca6982b..41a1a35 100644
--- a/linden/indra/newview/llfloateranimpreview.cpp
+++ b/linden/indra/newview/llfloateranimpreview.cpp
@@ -76,13 +76,14 @@ const F32 PREVIEW_CAMERA_DISTANCE = 4.f;
76const F32 MIN_CAMERA_ZOOM = 0.5f; 76const F32 MIN_CAMERA_ZOOM = 0.5f;
77const F32 MAX_CAMERA_ZOOM = 10.f; 77const F32 MAX_CAMERA_ZOOM = 10.f;
78 78
79const F32 BASE_ANIM_TIME_OFFSET = 5.f;
80
79//----------------------------------------------------------------------------- 81//-----------------------------------------------------------------------------
80// LLFloaterAnimPreview() 82// LLFloaterAnimPreview()
81//----------------------------------------------------------------------------- 83//-----------------------------------------------------------------------------
82LLFloaterAnimPreview::LLFloaterAnimPreview(const char* filename) : 84LLFloaterAnimPreview::LLFloaterAnimPreview(const char* filename) :
83 LLFloaterNameDesc(filename) 85 LLFloaterNameDesc(filename)
84{ 86{
85 mLastSliderValue = 0.f;
86 mLastMouseX = 0; 87 mLastMouseX = 0;
87 mLastMouseY = 0; 88 mLastMouseY = 0;
88 89
@@ -413,20 +414,32 @@ void LLFloaterAnimPreview::resetMotion()
413 LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); 414 LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
414 BOOL paused = avatarp->areAnimationsPaused(); 415 BOOL paused = avatarp->areAnimationsPaused();
415 416
416 mPauseRequest = NULL; 417 // *TODO: Fix awful casting hack
418 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID);
419
420 // Set emotion
421 std::string emote = childGetValue("emote_combo").asString();
422 motionp->setEmote(mIDList[emote]);
417 423
418 LLUUID anim_id = mIDList[childGetValue("preview_base_anim").asString()]; 424 LLUUID base_id = mIDList[childGetValue("preview_base_anim").asString()];
419 avatarp->stopMotion(anim_id, TRUE); 425 avatarp->deactivateAllMotions();
420 avatarp->stopMotion(mMotionID, TRUE); 426 avatarp->startMotion(base_id, BASE_ANIM_TIME_OFFSET);
421 avatarp->startMotion(anim_id, 5.f); 427 avatarp->startMotion(mMotionID, 0.0f);
422 avatarp->startMotion(mMotionID); 428 childSetValue("playback_slider", 0.0f);
423 childSetValue("playback_slider", 0.0); 429
424 mLastSliderValue = 0.0f; 430 // Set pose
431 std::string handpose = childGetValue("hand_pose_combo").asString();
432 avatarp->startMotion( ANIM_AGENT_HAND_MOTION, 0.0f );
433 motionp->setHandPose(LLHandMotion::getHandPose(handpose));
425 434
426 if (paused) 435 if (paused)
427 { 436 {
428 mPauseRequest = avatarp->requestPause(); 437 mPauseRequest = avatarp->requestPause();
429 } 438 }
439 else
440 {
441 mPauseRequest = NULL;
442 }
430} 443}
431 444
432//----------------------------------------------------------------------------- 445//-----------------------------------------------------------------------------
@@ -537,7 +550,8 @@ void LLFloaterAnimPreview::onMouseCaptureLost()
537void LLFloaterAnimPreview::onBtnPlay(void* user_data) 550void LLFloaterAnimPreview::onBtnPlay(void* user_data)
538{ 551{
539 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; 552 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data;
540 if (!previewp->getEnabled()) return; 553 if (!previewp->getEnabled())
554 return;
541 555
542 if (previewp->mMotionID.notNull() && previewp->mAnimPreview) 556 if (previewp->mMotionID.notNull() && previewp->mAnimPreview)
543 { 557 {
@@ -568,22 +582,14 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data)
568void LLFloaterAnimPreview::onBtnStop(void* user_data) 582void LLFloaterAnimPreview::onBtnStop(void* user_data)
569{ 583{
570 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; 584 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data;
571 if (!previewp->getEnabled()) return; 585 if (!previewp->getEnabled())
586 return;
572 587
573 if (previewp->mMotionID.notNull() && previewp->mAnimPreview) 588 if (previewp->mMotionID.notNull() && previewp->mAnimPreview)
574 { 589 {
575 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 590 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
576 591 previewp->resetMotion();
577 // is the motion looping and have we passed the loop in point? 592 previewp->mPauseRequest = avatarp->requestPause();
578 if (previewp->childGetValue("loop_check").asBoolean() &&
579 (F32)previewp->childGetValue("loop_in_point").asReal() <= (F32)previewp->childGetValue("playback_slider").asReal() * 100.f)
580 {
581 avatarp->stopMotion(previewp->mMotionID, FALSE);
582 }
583 else
584 {
585 avatarp->stopMotion(previewp->mMotionID, FALSE);
586 }
587 } 593 }
588} 594}
589 595
@@ -593,43 +599,24 @@ void LLFloaterAnimPreview::onBtnStop(void* user_data)
593void LLFloaterAnimPreview::onSliderMove(LLUICtrl* ctrl, void*user_data) 599void LLFloaterAnimPreview::onSliderMove(LLUICtrl* ctrl, void*user_data)
594{ 600{
595 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; 601 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data;
596 if (!previewp->getEnabled()) return; 602 if (!previewp->getEnabled())
603 return;
597 604
598 if (previewp->mAnimPreview) 605 if (previewp->mAnimPreview)
599 { 606 {
600 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 607 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
608 F32 slider_value = (F32)previewp->childGetValue("playback_slider").asReal();
609 LLUUID base_id = previewp->mIDList[previewp->childGetValue("preview_base_anim").asString()];
601 LLMotion* motionp = avatarp->findMotion(previewp->mMotionID); 610 LLMotion* motionp = avatarp->findMotion(previewp->mMotionID);
602 LLMotion* base_motionp = 611 F32 duration = motionp->getDuration();// + motionp->getEaseOutDuration();
603 avatarp->findMotion(previewp->mIDList[previewp->childGetValue("preview_base_anim").asString()]); 612 F32 delta_time = duration * slider_value;
604 613 avatarp->deactivateAllMotions();
605 if (motionp && base_motionp) 614 avatarp->startMotion(base_id, delta_time + BASE_ANIM_TIME_OFFSET);
606 { 615 avatarp->startMotion(previewp->mMotionID, delta_time);
607 if (!avatarp->isMotionActive(previewp->mMotionID)) 616 previewp->mPauseRequest = avatarp->requestPause();
608 { 617 previewp->refresh();
609 previewp->resetMotion();
610 }
611
612 previewp->mPauseRequest = avatarp->requestPause();
613 F32 original_activation_time = motionp->mActivationTimestamp;
614 motionp->mActivationTimestamp -= ((F32)previewp->childGetValue("playback_slider").asReal() - previewp->mLastSliderValue) *
615 motionp->getDuration();
616 base_motionp->mActivationTimestamp -= ((F32)previewp->childGetValue("playback_slider").asReal() - previewp->mLastSliderValue) *
617 base_motionp->getDuration();
618
619 if (motionp->mSendStopTimestamp != F32_MIN)
620 {
621 motionp->mSendStopTimestamp = motionp->mSendStopTimestamp - original_activation_time + motionp->mActivationTimestamp;
622 }
623
624 if (motionp->mStopTimestamp != F32_MIN)
625 {
626 motionp->mStopTimestamp = motionp->mStopTimestamp - original_activation_time + motionp->mActivationTimestamp;
627 }
628 previewp->refresh();
629 }
630 } 618 }
631 619
632 previewp->mLastSliderValue = (F32)previewp->childGetValue("playback_slider").asReal();
633} 620}
634 621
635//----------------------------------------------------------------------------- 622//-----------------------------------------------------------------------------
@@ -638,8 +625,8 @@ void LLFloaterAnimPreview::onSliderMove(LLUICtrl* ctrl, void*user_data)
638void LLFloaterAnimPreview::onCommitBaseAnim(LLUICtrl* ctrl, void* data) 625void LLFloaterAnimPreview::onCommitBaseAnim(LLUICtrl* ctrl, void* data)
639{ 626{
640 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 627 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
641 628 if (!previewp->getEnabled())
642 if (!previewp->getEnabled()) return; 629 return;
643 630
644 if (previewp->mAnimPreview) 631 if (previewp->mAnimPreview)
645 { 632 {
@@ -668,8 +655,9 @@ void LLFloaterAnimPreview::onCommitBaseAnim(LLUICtrl* ctrl, void* data)
668void LLFloaterAnimPreview::onCommitLoop(LLUICtrl* ctrl, void* data) 655void LLFloaterAnimPreview::onCommitLoop(LLUICtrl* ctrl, void* data)
669{ 656{
670 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 657 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
671 658 if (!previewp->getEnabled())
672 if (!previewp->getEnabled()) return; 659 return;
660
673 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 661 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
674 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 662 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
675 663
@@ -687,7 +675,8 @@ void LLFloaterAnimPreview::onCommitLoop(LLUICtrl* ctrl, void* data)
687void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data) 675void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data)
688{ 676{
689 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 677 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
690 if (!previewp->getEnabled()) return; 678 if (!previewp->getEnabled())
679 return;
691 680
692 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 681 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
693 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 682 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -707,7 +696,8 @@ void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data)
707void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data) 696void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data)
708{ 697{
709 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 698 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
710 if (!previewp->getEnabled()) return; 699 if (!previewp->getEnabled())
700 return;
711 701
712 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 702 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
713 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 703 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -727,7 +717,8 @@ void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data)
727void LLFloaterAnimPreview::onCommitName(LLUICtrl* ctrl, void* data) 717void LLFloaterAnimPreview::onCommitName(LLUICtrl* ctrl, void* data)
728{ 718{
729 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 719 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
730 if (!previewp->getEnabled()) return; 720 if (!previewp->getEnabled())
721 return;
731 722
732 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 723 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
733 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 724 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -746,13 +737,10 @@ void LLFloaterAnimPreview::onCommitName(LLUICtrl* ctrl, void* data)
746void LLFloaterAnimPreview::onCommitHandPose(LLUICtrl* ctrl, void* data) 737void LLFloaterAnimPreview::onCommitHandPose(LLUICtrl* ctrl, void* data)
747{ 738{
748 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 739 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
749 if (!previewp->getEnabled()) return; 740 if (!previewp->getEnabled())
750 741 return;
751 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
752 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
753 742
754 motionp->setHandPose(LLHandMotion::getHandPose(previewp->childGetValue("hand_pose_combo").asString())); 743 previewp->resetMotion(); // sets hand pose
755 previewp->resetMotion();
756} 744}
757 745
758//----------------------------------------------------------------------------- 746//-----------------------------------------------------------------------------
@@ -761,13 +749,10 @@ void LLFloaterAnimPreview::onCommitHandPose(LLUICtrl* ctrl, void* data)
761void LLFloaterAnimPreview::onCommitEmote(LLUICtrl* ctrl, void* data) 749void LLFloaterAnimPreview::onCommitEmote(LLUICtrl* ctrl, void* data)
762{ 750{
763 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 751 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
764 if (!previewp->getEnabled()) return; 752 if (!previewp->getEnabled())
753 return;
765 754
766 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 755 previewp->resetMotion(); // ssts emote
767 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
768
769 motionp->setEmote(previewp->mIDList[previewp->childGetValue("emote_combo").asString()]);
770 previewp->resetMotion();
771} 756}
772 757
773//----------------------------------------------------------------------------- 758//-----------------------------------------------------------------------------
@@ -776,7 +761,8 @@ void LLFloaterAnimPreview::onCommitEmote(LLUICtrl* ctrl, void* data)
776void LLFloaterAnimPreview::onCommitPriority(LLUICtrl* ctrl, void* data) 761void LLFloaterAnimPreview::onCommitPriority(LLUICtrl* ctrl, void* data)
777{ 762{
778 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 763 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
779 if (!previewp->getEnabled()) return; 764 if (!previewp->getEnabled())
765 return;
780 766
781 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 767 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
782 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 768 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -790,7 +776,8 @@ void LLFloaterAnimPreview::onCommitPriority(LLUICtrl* ctrl, void* data)
790void LLFloaterAnimPreview::onCommitEaseIn(LLUICtrl* ctrl, void* data) 776void LLFloaterAnimPreview::onCommitEaseIn(LLUICtrl* ctrl, void* data)
791{ 777{
792 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 778 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
793 if (!previewp->getEnabled()) return; 779 if (!previewp->getEnabled())
780 return;
794 781
795 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 782 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
796 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 783 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -805,7 +792,8 @@ void LLFloaterAnimPreview::onCommitEaseIn(LLUICtrl* ctrl, void* data)
805void LLFloaterAnimPreview::onCommitEaseOut(LLUICtrl* ctrl, void* data) 792void LLFloaterAnimPreview::onCommitEaseOut(LLUICtrl* ctrl, void* data)
806{ 793{
807 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 794 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
808 if (!previewp->getEnabled()) return; 795 if (!previewp->getEnabled())
796 return;
809 797
810 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 798 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
811 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 799 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -819,9 +807,9 @@ void LLFloaterAnimPreview::onCommitEaseOut(LLUICtrl* ctrl, void* data)
819//----------------------------------------------------------------------------- 807//-----------------------------------------------------------------------------
820BOOL LLFloaterAnimPreview::validateEaseIn(LLUICtrl* spin, void* data) 808BOOL LLFloaterAnimPreview::validateEaseIn(LLUICtrl* spin, void* data)
821{ 809{
822 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 810 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
823 811 if (!previewp->getEnabled())
824 if (!previewp->getEnabled()) return FALSE; 812 return FALSE;
825 813
826 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 814 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
827 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 815 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -842,7 +830,8 @@ BOOL LLFloaterAnimPreview::validateEaseOut(LLUICtrl* spin, void* data)
842{ 830{
843 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 831 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
844 832
845 if (!previewp->getEnabled()) return FALSE; 833 if (!previewp->getEnabled())
834 return FALSE;
846 835
847 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 836 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
848 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 837 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -862,8 +851,8 @@ BOOL LLFloaterAnimPreview::validateEaseOut(LLUICtrl* spin, void* data)
862BOOL LLFloaterAnimPreview::validateLoopIn(LLUICtrl* ctrl, void* data) 851BOOL LLFloaterAnimPreview::validateLoopIn(LLUICtrl* ctrl, void* data)
863{ 852{
864 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 853 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
865 854 if (!previewp->getEnabled())
866 if (!previewp->getEnabled()) return FALSE; 855 return FALSE;
867 856
868 F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal(); 857 F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();
869 F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal(); 858 F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();
@@ -891,8 +880,8 @@ BOOL LLFloaterAnimPreview::validateLoopIn(LLUICtrl* ctrl, void* data)
891BOOL LLFloaterAnimPreview::validateLoopOut(LLUICtrl* spin, void* data) 880BOOL LLFloaterAnimPreview::validateLoopOut(LLUICtrl* spin, void* data)
892{ 881{
893 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 882 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
894 883 if (!previewp->getEnabled())
895 if (!previewp->getEnabled()) return FALSE; 884 return FALSE;
896 885
897 F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal(); 886 F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();
898 F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal(); 887 F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();
@@ -947,11 +936,8 @@ void LLFloaterAnimPreview::refresh()
947 { 936 {
948 if (motionp) 937 if (motionp)
949 { 938 {
950 F32 fraction_complete; 939 F32 fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration();
951 fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration();
952
953 childSetValue("playback_slider", fraction_complete); 940 childSetValue("playback_slider", fraction_complete);
954 mLastSliderValue = fraction_complete;
955 } 941 }
956 mPlayButton->setImages("button_anim_pause.tga", 942 mPlayButton->setImages("button_anim_pause.tga",
957 "button_anim_pause_selected.tga"); 943 "button_anim_pause_selected.tga");
@@ -964,7 +950,7 @@ void LLFloaterAnimPreview::refresh()
964 mPlayButton->setImages("button_anim_play.tga", 950 mPlayButton->setImages("button_anim_play.tga",
965 "button_anim_play_selected.tga"); 951 "button_anim_play_selected.tga");
966 952
967 mStopButton->setEnabled(FALSE); 953 mStopButton->setEnabled(TRUE); // stop also resets, leave enabled.
968 } 954 }
969 childEnable("ok_btn"); 955 childEnable("ok_btn");
970 mAnimPreview->requestUpdate(); 956 mAnimPreview->requestUpdate();
@@ -1037,12 +1023,12 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLDynamicTexture
1037 mDummyAvatar = (LLVOAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion()); 1023 mDummyAvatar = (LLVOAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion());
1038 mDummyAvatar->createDrawable(&gPipeline); 1024 mDummyAvatar->createDrawable(&gPipeline);
1039 mDummyAvatar->mIsDummy = TRUE; 1025 mDummyAvatar->mIsDummy = TRUE;
1040 mDummyAvatar->mSpecialRenderMode = 2; 1026 mDummyAvatar->mSpecialRenderMode = 1;
1041 mDummyAvatar->setPositionAgent(LLVector3::zero); 1027 mDummyAvatar->setPositionAgent(LLVector3::zero);
1042 mDummyAvatar->slamPosition(); 1028 mDummyAvatar->slamPosition();
1043 mDummyAvatar->updateJointLODs(); 1029 mDummyAvatar->updateJointLODs();
1044 mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); 1030 mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
1045 mDummyAvatar->startMotion(ANIM_AGENT_STAND, 5.f); 1031 mDummyAvatar->startMotion(ANIM_AGENT_STAND, BASE_ANIM_TIME_OFFSET);
1046 mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE); 1032 mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE);
1047 gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance()); 1033 gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
1048 1034
@@ -1110,30 +1096,15 @@ BOOL LLPreviewAnimation::render()
1110 1096
1111 //avatarp->setAnimationData("LookAtPoint", (void *)&mCameraRelPos); 1097 //avatarp->setAnimationData("LookAtPoint", (void *)&mCameraRelPos);
1112 1098
1113 //RN: timestep must be zero, because paused animations will never initialize 1099 //SJB: Animation is updated in LLVOAvatar::updateCharacter
1114 // av skeleton otherwise
1115 avatarp->setTimeStep(0.f);
1116 if (avatarp->areAnimationsPaused())
1117 {
1118 avatarp->updateMotion(TRUE);
1119 }
1120 else
1121 {
1122 avatarp->updateMotion();
1123 }
1124 1100
1125 LLVertexBuffer::unbind();
1126 avatarp->updateLOD();
1127
1128
1129 avatarp->mRoot.updateWorldMatrixChildren();
1130
1131 stop_glerror();
1132
1133 LLGLDepthTest gls_depth(GL_TRUE);
1134
1135 if (avatarp->mDrawable.notNull()) 1101 if (avatarp->mDrawable.notNull())
1136 { 1102 {
1103 avatarp->updateLOD();
1104
1105 LLVertexBuffer::unbind();
1106 LLGLDepthTest gls_depth(GL_TRUE);
1107
1137 LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool(); 1108 LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
1138 avatarp->dirtyMesh(); 1109 avatarp->dirtyMesh();
1139 avatarPoolp->renderAvatars(avatarp); // renders only one avatar 1110 avatarPoolp->renderAvatars(avatarp); // renders only one avatar
diff --git a/linden/indra/newview/llfloateranimpreview.h b/linden/indra/newview/llfloateranimpreview.h
index 52c2d6f..99b66d7 100644
--- a/linden/indra/newview/llfloateranimpreview.h
+++ b/linden/indra/newview/llfloateranimpreview.h
@@ -118,7 +118,6 @@ protected:
118 S32 mLastMouseY; 118 S32 mLastMouseY;
119 LLButton* mPlayButton; 119 LLButton* mPlayButton;
120 LLButton* mStopButton; 120 LLButton* mStopButton;
121 F32 mLastSliderValue;
122 LLRect mPreviewRect; 121 LLRect mPreviewRect;
123 LLRectf mPreviewImageRect; 122 LLRectf mPreviewImageRect;
124 LLAssetID mMotionID; 123 LLAssetID mMotionID;
diff --git a/linden/indra/newview/llfloateravatarinfo.cpp b/linden/indra/newview/llfloateravatarinfo.cpp
index d4b0b1c..b740a46 100644
--- a/linden/indra/newview/llfloateravatarinfo.cpp
+++ b/linden/indra/newview/llfloateravatarinfo.cpp
@@ -120,22 +120,14 @@ LLFloaterAvatarInfo::LLFloaterAvatarInfo(const std::string& name, const LLRect &
120 mPanelAvatarp->selectTab(0); 120 mPanelAvatarp->selectTab(0);
121 } 121 }
122 122
123 llassert_always(!gAvatarInfoInstances.checkData(mAvatarID));//if not inserted.
124 gAvatarInfoInstances.addData(avatar_id, this); 123 gAvatarInfoInstances.addData(avatar_id, this);
125
126
127} 124}
128 125
129// virtual 126// virtual
130LLFloaterAvatarInfo::~LLFloaterAvatarInfo() 127LLFloaterAvatarInfo::~LLFloaterAvatarInfo()
131{ 128{
132 llassert_always(gAvatarInfoInstances.checkData(mAvatarID));//if there
133 llinfos << "to remove profile floater for avatar " << mAvatarID << llendl ;
134 // child views automatically deleted 129 // child views automatically deleted
135 gAvatarInfoInstances.removeData(mAvatarID); 130 gAvatarInfoInstances.removeData(mAvatarID);
136
137 llinfos << "successfully removed profile floater for avatar " << mAvatarID << llendl ;
138
139} 131}
140 132
141void LLFloaterAvatarInfo::resetGroupList() 133void LLFloaterAvatarInfo::resetGroupList()
diff --git a/linden/indra/newview/llfloatercustomize.h b/linden/indra/newview/llfloatercustomize.h
index 96db2d2..9ca22d0 100644
--- a/linden/indra/newview/llfloatercustomize.h
+++ b/linden/indra/newview/llfloatercustomize.h
@@ -40,7 +40,6 @@
40#include "lltimer.h" 40#include "lltimer.h"
41#include "llundo.h" 41#include "llundo.h"
42#include "llviewermenu.h" 42#include "llviewermenu.h"
43#include "llvoavatar.h"
44#include "llwearable.h" 43#include "llwearable.h"
45#include "lliconctrl.h" 44#include "lliconctrl.h"
46 45
diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp
index c9ccf1a..f6e226d 100644
--- a/linden/indra/newview/llfloatergroups.cpp
+++ b/linden/indra/newview/llfloatergroups.cpp
@@ -438,7 +438,8 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow
438 { 438 {
439 id = gAgent.mGroups.get(i).mID; 439 id = gAgent.mGroups.get(i).mID;
440 LLGroupData* group_datap = &gAgent.mGroups.get(i); 440 LLGroupData* group_datap = &gAgent.mGroups.get(i);
441 if ((group_datap->mPowers & powers_mask) != 0) { 441 if ((powers_mask == GP_ALL_POWERS) || ((group_datap->mPowers & powers_mask) != 0))
442 {
442 LLString style = "NORMAL"; 443 LLString style = "NORMAL";
443 if(highlight_id == id) 444 if(highlight_id == id)
444 { 445 {
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp
index 88ad5d6..0829fb2 100644
--- a/linden/indra/newview/llhudeffectlookat.cpp
+++ b/linden/indra/newview/llhudeffectlookat.cpp
@@ -501,8 +501,8 @@ void LLHUDEffectLookAt::render()
501 501
502 LLVector3 target = mTargetPos + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->mHeadp->getWorldPosition(); 502 LLVector3 target = mTargetPos + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->mHeadp->getWorldPosition();
503 glMatrixMode(GL_MODELVIEW); 503 glMatrixMode(GL_MODELVIEW);
504 glPushMatrix(); 504 gGL.pushMatrix();
505 glTranslatef(target.mV[VX], target.mV[VY], target.mV[VZ]); 505 gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]);
506 glScalef(0.3f, 0.3f, 0.3f); 506 glScalef(0.3f, 0.3f, 0.3f);
507 gGL.begin(LLVertexBuffer::LINES); 507 gGL.begin(LLVertexBuffer::LINES);
508 { 508 {
@@ -517,7 +517,7 @@ void LLHUDEffectLookAt::render()
517 gGL.vertex3f(0.f, 0.f, -1.f); 517 gGL.vertex3f(0.f, 0.f, -1.f);
518 gGL.vertex3f(0.f, 0.f, 1.f); 518 gGL.vertex3f(0.f, 0.f, 1.f);
519 } gGL.end(); 519 } gGL.end();
520 glPopMatrix(); 520 gGL.popMatrix();
521 } 521 }
522} 522}
523 523
diff --git a/linden/indra/newview/llhudeffectpointat.cpp b/linden/indra/newview/llhudeffectpointat.cpp
index 8cd1023..7ab03f2 100644
--- a/linden/indra/newview/llhudeffectpointat.cpp
+++ b/linden/indra/newview/llhudeffectpointat.cpp
@@ -331,8 +331,8 @@ void LLHUDEffectPointAt::render()
331 LLGLSNoTexture gls_no_texture; 331 LLGLSNoTexture gls_no_texture;
332 332
333 LLVector3 target = mTargetPos + mSourceObject->getRenderPosition(); 333 LLVector3 target = mTargetPos + mSourceObject->getRenderPosition();
334 glPushMatrix(); 334 gGL.pushMatrix();
335 glTranslatef(target.mV[VX], target.mV[VY], target.mV[VZ]); 335 gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]);
336 glScalef(0.3f, 0.3f, 0.3f); 336 glScalef(0.3f, 0.3f, 0.3f);
337 gGL.begin(LLVertexBuffer::LINES); 337 gGL.begin(LLVertexBuffer::LINES);
338 { 338 {
@@ -346,7 +346,7 @@ void LLHUDEffectPointAt::render()
346 gGL.vertex3f(0.f, 0.f, -1.f); 346 gGL.vertex3f(0.f, 0.f, -1.f);
347 gGL.vertex3f(0.f, 0.f, 1.f); 347 gGL.vertex3f(0.f, 0.f, 1.f);
348 } gGL.end(); 348 } gGL.end();
349 glPopMatrix(); 349 gGL.popMatrix();
350 } 350 }
351} 351}
352 352
diff --git a/linden/indra/newview/llinventoryactions.cpp b/linden/indra/newview/llinventoryactions.cpp
index 78b43d5..7f7a15f 100644
--- a/linden/indra/newview/llinventoryactions.cpp
+++ b/linden/indra/newview/llinventoryactions.cpp
@@ -76,6 +76,7 @@
76#include "llviewerinventory.h" 76#include "llviewerinventory.h"
77#include "llviewerobjectlist.h" 77#include "llviewerobjectlist.h"
78#include "llviewerwindow.h" 78#include "llviewerwindow.h"
79#include "llvoavatar.h"
79#include "llwearable.h" 80#include "llwearable.h"
80#include "llwearablelist.h" 81#include "llwearablelist.h"
81#include "llviewermessage.h" 82#include "llviewermessage.h"
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index 1d5cd88..a909262 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -76,6 +76,7 @@
76#include "llviewerinventory.h" 76#include "llviewerinventory.h"
77#include "llviewerobjectlist.h" 77#include "llviewerobjectlist.h"
78#include "llviewerwindow.h" 78#include "llviewerwindow.h"
79#include "llvoavatar.h"
79#include "llwearable.h" 80#include "llwearable.h"
80#include "llwearablelist.h" 81#include "llwearablelist.h"
81#include "llviewermessage.h" 82#include "llviewermessage.h"
diff --git a/linden/indra/newview/llmemoryview.cpp b/linden/indra/newview/llmemoryview.cpp
index ca38a9c..32f5431 100644
--- a/linden/indra/newview/llmemoryview.cpp
+++ b/linden/indra/newview/llmemoryview.cpp
@@ -41,6 +41,7 @@
41#include "llfontgl.h" 41#include "llfontgl.h"
42#include "llmemtype.h" 42#include "llmemtype.h"
43 43
44#include "llcharacter.h"
44#include "llui.h" 45#include "llui.h"
45#include "llviewercontrol.h" 46#include "llviewercontrol.h"
46#include "llstat.h" 47#include "llstat.h"
@@ -120,6 +121,7 @@ static const struct mtv_display_info mtv_display_table[] =
120 { LLMemType::MTYPE_SPACE_PARTITION, "Space Partition", &LLColor4::blue2 }, 121 { LLMemType::MTYPE_SPACE_PARTITION, "Space Partition", &LLColor4::blue2 },
121 { LLMemType::MTYPE_VERTEX_DATA, "Vertex Buffer", &LLColor4::blue3 }, 122 { LLMemType::MTYPE_VERTEX_DATA, "Vertex Buffer", &LLColor4::blue3 },
122 { LLMemType::MTYPE_AVATAR, "Avatar", &LLColor4::purple1 }, 123 { LLMemType::MTYPE_AVATAR, "Avatar", &LLColor4::purple1 },
124 { LLMemType::MTYPE_ANIMATION, "Animation", &LLColor4::purple3 },
123 { LLMemType::MTYPE_REGIONS, "Regions", &LLColor4::blue1 }, 125 { LLMemType::MTYPE_REGIONS, "Regions", &LLColor4::blue1 },
124 { LLMemType::MTYPE_VOLUME, "Volume", &LLColor4::pink1 }, 126 { LLMemType::MTYPE_VOLUME, "Volume", &LLColor4::pink1 },
125 { LLMemType::MTYPE_PRIMITIVE, "Profile", &LLColor4::pink2 }, 127 { LLMemType::MTYPE_PRIMITIVE, "Profile", &LLColor4::pink2 },
@@ -208,10 +210,25 @@ void LLMemoryView::draw()
208 if (textw > labelwidth) 210 if (textw > labelwidth)
209 labelwidth = textw; 211 labelwidth = textw;
210 } 212 }
213
214 S32 num_avatars = 0;
215 S32 num_motions = 0;
216 S32 num_loading_motions = 0;
217 S32 num_loaded_motions = 0;
218 S32 num_active_motions = 0;
219 S32 num_deprecated_motions = 0;
220 for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
221 iter != LLCharacter::sInstances.end(); ++iter)
222 {
223 num_avatars++;
224 (*iter)->getMotionController().incMotionCounts(num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions);
225 }
226
211 x = xleft; 227 x = xleft;
212 tdesc = llformat("Total Bytes: %d MB Overhead: %d KB", 228 tdesc = llformat("Total Bytes: %d MB Overhead: %d KB Avs %d Motions:%d Loading:%d Loaded:%d Active:%d Dep:%d",
213 LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10); 229 LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10,
214 LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); 230 num_avatars, num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions);
231 LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
215 } 232 }
216 233
217 // Bars 234 // Bars
diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp
index 75c7cce..408b70e 100644
--- a/linden/indra/newview/llmutelist.cpp
+++ b/linden/indra/newview/llmutelist.cpp
@@ -72,9 +72,6 @@
72#include "llviewerobjectlist.h" 72#include "llviewerobjectlist.h"
73 73
74 74
75std::map<LLUUID, F32> LLMuteList::sUserVolumeSettings;
76
77
78// "emptymutelist" 75// "emptymutelist"
79class LLDispatchEmptyMuteList : public LLDispatchHandler 76class LLDispatchEmptyMuteList : public LLDispatchHandler
80{ 77{
@@ -182,10 +179,19 @@ LLMuteList* LLMuteList::getInstance()
182// LLMuteList() 179// LLMuteList()
183//----------------------------------------------------------------------------- 180//-----------------------------------------------------------------------------
184LLMuteList::LLMuteList() : 181LLMuteList::LLMuteList() :
185 mIsLoaded(FALSE) 182 mIsLoaded(FALSE),
183 mUserVolumesLoaded(FALSE)
186{ 184{
187 gGenericDispatcher.addHandler("emptymutelist", &sDispatchEmptyMuteList); 185 gGenericDispatcher.addHandler("emptymutelist", &sDispatchEmptyMuteList);
186}
188 187
188void LLMuteList::loadUserVolumes()
189{
190 // call once, after LLDir::setLindenUserDir() has been called
191 if (mUserVolumesLoaded)
192 return;
193 mUserVolumesLoaded = TRUE;
194
189 // load per-resident voice volume information 195 // load per-resident voice volume information
190 // conceptually, this is part of the mute list information, although it is only stored locally 196 // conceptually, this is part of the mute list information, although it is only stored locally
191 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml"); 197 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml");
@@ -201,7 +207,7 @@ LLMuteList::LLMuteList() :
201 for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); 207 for (LLSD::map_const_iterator iter = settings_llsd.beginMap();
202 iter != settings_llsd.endMap(); ++iter) 208 iter != settings_llsd.endMap(); ++iter)
203 { 209 {
204 sUserVolumeSettings.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal())); 210 mUserVolumeSettings.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal()));
205 } 211 }
206} 212}
207 213
@@ -213,7 +219,7 @@ LLMuteList::~LLMuteList()
213 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml"); 219 std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml");
214 LLSD settings_llsd; 220 LLSD settings_llsd;
215 221
216 for(user_volume_map_t::iterator iter = sUserVolumeSettings.begin(); iter != sUserVolumeSettings.end(); ++iter) 222 for(user_volume_map_t::iterator iter = mUserVolumeSettings.begin(); iter != mUserVolumeSettings.end(); ++iter)
217 { 223 {
218 settings_llsd[iter->first.asString()] = iter->second; 224 settings_llsd[iter->first.asString()] = iter->second;
219 } 225 }
@@ -669,6 +675,8 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const LLString& name, U32 flags) cons
669//----------------------------------------------------------------------------- 675//-----------------------------------------------------------------------------
670void LLMuteList::requestFromServer(const LLUUID& agent_id) 676void LLMuteList::requestFromServer(const LLUUID& agent_id)
671{ 677{
678 loadUserVolumes();
679
672 char agent_id_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ 680 char agent_id_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/
673 char filename[LL_MAX_PATH]; /*Flawfinder: ignore*/ 681 char filename[LL_MAX_PATH]; /*Flawfinder: ignore*/
674 agent_id.toString(agent_id_string); 682 agent_id.toString(agent_id_string);
@@ -706,15 +714,15 @@ void LLMuteList::cache(const LLUUID& agent_id)
706void LLMuteList::setSavedResidentVolume(const LLUUID& id, F32 volume) 714void LLMuteList::setSavedResidentVolume(const LLUUID& id, F32 volume)
707{ 715{
708 // store new value in volume settings file 716 // store new value in volume settings file
709 sUserVolumeSettings[id] = volume; 717 mUserVolumeSettings[id] = volume;
710} 718}
711 719
712F32 LLMuteList::getSavedResidentVolume(const LLUUID& id) 720F32 LLMuteList::getSavedResidentVolume(const LLUUID& id)
713{ 721{
714 const F32 DEFAULT_VOLUME = 0.5f; 722 const F32 DEFAULT_VOLUME = 0.5f;
715 723
716 user_volume_map_t::iterator found_it = sUserVolumeSettings.find(id); 724 user_volume_map_t::iterator found_it = mUserVolumeSettings.find(id);
717 if (found_it != sUserVolumeSettings.end()) 725 if (found_it != mUserVolumeSettings.end())
718 { 726 {
719 return found_it->second; 727 return found_it->second;
720 } 728 }
diff --git a/linden/indra/newview/llmutelist.h b/linden/indra/newview/llmutelist.h
index 0a8c6aa..fa38cde 100644
--- a/linden/indra/newview/llmutelist.h
+++ b/linden/indra/newview/llmutelist.h
@@ -131,6 +131,8 @@ public:
131 F32 getSavedResidentVolume(const LLUUID& id); 131 F32 getSavedResidentVolume(const LLUUID& id);
132 132
133private: 133private:
134 void loadUserVolumes();
135
134 BOOL loadFromFile(const LLString& filename); 136 BOOL loadFromFile(const LLString& filename);
135 BOOL saveToFile(const LLString& filename); 137 BOOL saveToFile(const LLString& filename);
136 138
@@ -171,11 +173,12 @@ private:
171 observer_set_t mObservers; 173 observer_set_t mObservers;
172 174
173 BOOL mIsLoaded; 175 BOOL mIsLoaded;
176 BOOL mUserVolumesLoaded;
174 177
175 friend class LLDispatchEmptyMuteList; 178 friend class LLDispatchEmptyMuteList;
176 179
177 typedef std::map<LLUUID, F32> user_volume_map_t; 180 typedef std::map<LLUUID, F32> user_volume_map_t;
178 static user_volume_map_t sUserVolumeSettings; 181 user_volume_map_t mUserVolumeSettings;
179}; 182};
180 183
181class LLMuteListObserver 184class LLMuteListObserver
diff --git a/linden/indra/newview/llpreviewanim.cpp b/linden/indra/newview/llpreviewanim.cpp
index c7b1dc7..9c7fb4a 100644
--- a/linden/indra/newview/llpreviewanim.cpp
+++ b/linden/indra/newview/llpreviewanim.cpp
@@ -194,6 +194,7 @@ void LLPreviewAnim::onClose(bool app_quitting)
194 194
195 if (motion) 195 if (motion)
196 { 196 {
197 // *TODO: minor memory leak here, user data is never deleted (Use real callbacks)
197 motion->setDeactivateCallback(NULL, (void *)NULL); 198 motion->setDeactivateCallback(NULL, (void *)NULL);
198 } 199 }
199 } 200 }
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp
index 1aad3e2..75e1fcc 100644
--- a/linden/indra/newview/llselectmgr.cpp
+++ b/linden/indra/newview/llselectmgr.cpp
@@ -4827,18 +4827,9 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
4827 4827
4828 for (S32 pass = 0; pass < 2; pass++) 4828 for (S32 pass = 0; pass < 2; pass++)
4829 { 4829 {
4830 LLObjectSelection::iterator end_ = mSelectedObjects->end();
4831 S32 num_nodes = mSelectedObjects->getNumNodes() ;
4832 LLObjectSelection::iterator prev_iter = mSelectedObjects->end();
4833 for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); 4830 for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
4834 iter != mSelectedObjects->end(); iter++) 4831 iter != mSelectedObjects->end(); iter++)
4835 { 4832 {
4836 llassert_always(end_ == mSelectedObjects->end()) ;//mSelectedObjects should not grow
4837 llassert_always(prev_iter != iter) ; //iter should move
4838 llassert_always(num_nodes > 0) ; //iter should not circle inside mSelectedObjects.
4839 num_nodes-- ;
4840 prev_iter = iter ;
4841
4842 LLSelectNode* node = *iter; 4833 LLSelectNode* node = *iter;
4843 LLViewerObject* objectp = node->getObject(); 4834 LLViewerObject* objectp = node->getObject();
4844 if (!objectp) 4835 if (!objectp)
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 5a5aa8d..1eb0654 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -2201,6 +2201,18 @@ BOOL idle_startup()
2201 { 2201 {
2202 do_normal_idle = TRUE; 2202 do_normal_idle = TRUE;
2203 2203
2204 // Avoid generic Ruth avatar in Orientation Island by starting
2205 // our outfit load as soon as possible. This will be replaced
2206 // with a more definitive patch from featurettes-4 later. JC
2207 if (gAgent.isFirstLogin()
2208 && !gInitialOutfit.empty() // registration set up an outfit
2209 && gAgent.getAvatarObject() // can't wear clothes until have obj
2210 && !gAgent.isGenderChosen() ) // nothing already loaded
2211 {
2212 llinfos << "Wearing initial outfit " << gInitialOutfit << llendl;
2213 callback_choose_gender(-1, NULL);
2214 }
2215
2204 F32 timeout_frac = timeout.getElapsedTimeF32()/PRECACHING_DELAY; 2216 F32 timeout_frac = timeout.getElapsedTimeF32()/PRECACHING_DELAY;
2205 // wait precache-delay and for agent's avatar or a lot longer. 2217 // wait precache-delay and for agent's avatar or a lot longer.
2206 if(((timeout_frac > 1.f) && gAgent.getAvatarObject()) 2218 if(((timeout_frac > 1.f) && gAgent.getAvatarObject())
@@ -2211,7 +2223,7 @@ BOOL idle_startup()
2211 else 2223 else
2212 { 2224 {
2213 update_texture_fetch(); 2225 update_texture_fetch();
2214 set_startup_status(0.60f + 0.40f * timeout_frac, 2226 set_startup_status(0.60f + 0.20f * timeout_frac,
2215 "Loading world...", 2227 "Loading world...",
2216 gAgent.mMOTD.c_str()); 2228 gAgent.mMOTD.c_str());
2217 } 2229 }
@@ -2241,7 +2253,7 @@ BOOL idle_startup()
2241 else 2253 else
2242 { 2254 {
2243 update_texture_fetch(); 2255 update_texture_fetch();
2244 set_startup_status(0.f + 0.25f * wearables_time / MAX_WEARABLES_TIME, 2256 set_startup_status(0.80f + 0.20f * wearables_time / MAX_WEARABLES_TIME,
2245 LLTrans::getString("LoginDownloadingClothing").c_str(), 2257 LLTrans::getString("LoginDownloadingClothing").c_str(),
2246 gAgent.mMOTD.c_str()); 2258 gAgent.mMOTD.c_str());
2247 } 2259 }
diff --git a/linden/indra/newview/lltexlayer.h b/linden/indra/newview/lltexlayer.h
index 8306071..17cfb7c 100644
--- a/linden/indra/newview/lltexlayer.h
+++ b/linden/indra/newview/lltexlayer.h
@@ -40,7 +40,6 @@
40#include "lluuid.h" 40#include "lluuid.h"
41#include "llviewerimage.h" 41#include "llviewerimage.h"
42#include "llviewervisualparam.h" 42#include "llviewervisualparam.h"
43#include "llvoavatar.h"
44#include "llwearable.h" 43#include "llwearable.h"
45#include "v4color.h" 44#include "v4color.h"
46#include "llfloater.h" 45#include "llfloater.h"
diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp
index 384de83..142e862 100644
--- a/linden/indra/newview/llviewerimagelist.cpp
+++ b/linden/indra/newview/llviewerimagelist.cpp
@@ -47,6 +47,7 @@
47#include "llvfs.h" 47#include "llvfs.h"
48#include "llvfile.h" 48#include "llvfile.h"
49#include "llvfsthread.h" 49#include "llvfsthread.h"
50#include "llxmltree.h"
50#include "message.h" 51#include "message.h"
51 52
52#include "llagent.h" 53#include "llagent.h"
@@ -534,7 +535,7 @@ void LLViewerImageList::updateImagesDecodePriorities()
534 const size_t max_update_count = llmin((S32) (1024*gFrameIntervalSeconds) + 1, 32); //target 1024 textures per second 535 const size_t max_update_count = llmin((S32) (1024*gFrameIntervalSeconds) + 1, 32); //target 1024 textures per second
535 S32 update_counter = llmin(max_update_count, mUUIDMap.size()/10); 536 S32 update_counter = llmin(max_update_count, mUUIDMap.size()/10);
536 uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID); 537 uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID);
537 while(update_counter > 0) 538 while(update_counter > 0 && !mUUIDMap.empty())
538 { 539 {
539 if (iter == mUUIDMap.end()) 540 if (iter == mUUIDMap.end())
540 { 541 {
@@ -715,10 +716,6 @@ void LLViewerImageList::updateImagesUpdateStats()
715 iter != mImageList.end(); ) 716 iter != mImageList.end(); )
716 { 717 {
717 LLViewerImage* imagep = *iter++; 718 LLViewerImage* imagep = *iter++;
718
719 llassert_always(imagep) ;
720 llassert_always(imagep->getNumRefs() > 0 && imagep->getNumRefs() < 100000) ;
721
722 imagep->resetTextureStats(mForceResetTextureStats); 719 imagep->resetTextureStats(mForceResetTextureStats);
723 } 720 }
724 mUpdateStats = FALSE; 721 mUpdateStats = FALSE;
diff --git a/linden/indra/newview/llviewerjoint.cpp b/linden/indra/newview/llviewerjoint.cpp
index 1be6e66..914448e 100644
--- a/linden/indra/newview/llviewerjoint.cpp
+++ b/linden/indra/newview/llviewerjoint.cpp
@@ -118,123 +118,124 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive )
118 118
119//-------------------------------------------------------------------- 119//--------------------------------------------------------------------
120// renderSkeleton() 120// renderSkeleton()
121// DEBUG (UNUSED)
121//-------------------------------------------------------------------- 122//--------------------------------------------------------------------
122void LLViewerJoint::renderSkeleton(BOOL recursive) 123// void LLViewerJoint::renderSkeleton(BOOL recursive)
123{ 124// {
124 F32 nc = 0.57735f; 125// F32 nc = 0.57735f;
125 126
126 //---------------------------------------------------------------- 127// //----------------------------------------------------------------
127 // push matrix stack 128// // push matrix stack
128 //---------------------------------------------------------------- 129// //----------------------------------------------------------------
129 glPushMatrix(); 130// glPushMatrix();
130 131
131 //---------------------------------------------------------------- 132// //----------------------------------------------------------------
132 // render the bone to my parent 133// // render the bone to my parent
133 //---------------------------------------------------------------- 134// //----------------------------------------------------------------
134 if (mComponents & SC_BONE) 135// if (mComponents & SC_BONE)
135 { 136// {
136 drawBone(); 137// drawBone();
137 } 138// }
138 139
139 //---------------------------------------------------------------- 140// //----------------------------------------------------------------
140 // offset to joint position and 141// // offset to joint position and
141 // rotate to our orientation 142// // rotate to our orientation
142 //---------------------------------------------------------------- 143// //----------------------------------------------------------------
143 glLoadIdentity(); 144// glLoadIdentity();
144 glMultMatrixf( &getWorldMatrix().mMatrix[0][0] ); 145// glMultMatrixf( &getWorldMatrix().mMatrix[0][0] );
145 146
146 //---------------------------------------------------------------- 147// //----------------------------------------------------------------
147 // render joint axes 148// // render joint axes
148 //---------------------------------------------------------------- 149// //----------------------------------------------------------------
149 if (mComponents & SC_AXES) 150// if (mComponents & SC_AXES)
150 { 151// {
151 gGL.begin(LLVertexBuffer::LINES); 152// gGL.begin(LLVertexBuffer::LINES);
152 gGL.color3f( 1.0f, 0.0f, 0.0f ); 153// gGL.color3f( 1.0f, 0.0f, 0.0f );
153 gGL.vertex3f( 0.0f, 0.0f, 0.0f ); 154// gGL.vertex3f( 0.0f, 0.0f, 0.0f );
154 gGL.vertex3f( 0.1f, 0.0f, 0.0f ); 155// gGL.vertex3f( 0.1f, 0.0f, 0.0f );
155 156
156 gGL.color3f( 0.0f, 1.0f, 0.0f ); 157// gGL.color3f( 0.0f, 1.0f, 0.0f );
157 gGL.vertex3f( 0.0f, 0.0f, 0.0f ); 158// gGL.vertex3f( 0.0f, 0.0f, 0.0f );
158 gGL.vertex3f( 0.0f, 0.1f, 0.0f ); 159// gGL.vertex3f( 0.0f, 0.1f, 0.0f );
159 160
160 gGL.color3f( 0.0f, 0.0f, 1.0f ); 161// gGL.color3f( 0.0f, 0.0f, 1.0f );
161 gGL.vertex3f( 0.0f, 0.0f, 0.0f ); 162// gGL.vertex3f( 0.0f, 0.0f, 0.0f );
162 gGL.vertex3f( 0.0f, 0.0f, 0.1f ); 163// gGL.vertex3f( 0.0f, 0.0f, 0.1f );
163 gGL.end(); 164// gGL.end();
164 } 165// }
165 166
166 //---------------------------------------------------------------- 167// //----------------------------------------------------------------
167 // render the joint graphic 168// // render the joint graphic
168 //---------------------------------------------------------------- 169// //----------------------------------------------------------------
169 if (mComponents & SC_JOINT) 170// if (mComponents & SC_JOINT)
170 { 171// {
171 gGL.color3f( 1.0f, 1.0f, 0.0f ); 172// gGL.color3f( 1.0f, 1.0f, 0.0f );
172 173
173 gGL.begin(LLVertexBuffer::TRIANGLES); 174// gGL.begin(LLVertexBuffer::TRIANGLES);
174 175
175 // joint top half 176// // joint top half
176 glNormal3f(nc, nc, nc); 177// glNormal3f(nc, nc, nc);
177 gGL.vertex3f(0.0f, 0.0f, 0.05f); 178// gGL.vertex3f(0.0f, 0.0f, 0.05f);
178 gGL.vertex3f(0.05f, 0.0f, 0.0f); 179// gGL.vertex3f(0.05f, 0.0f, 0.0f);
179 gGL.vertex3f(0.0f, 0.05f, 0.0f); 180// gGL.vertex3f(0.0f, 0.05f, 0.0f);
180 181
181 glNormal3f(-nc, nc, nc); 182// glNormal3f(-nc, nc, nc);
182 gGL.vertex3f(0.0f, 0.0f, 0.05f); 183// gGL.vertex3f(0.0f, 0.0f, 0.05f);
183 gGL.vertex3f(0.0f, 0.05f, 0.0f); 184// gGL.vertex3f(0.0f, 0.05f, 0.0f);
184 gGL.vertex3f(-0.05f, 0.0f, 0.0f); 185// gGL.vertex3f(-0.05f, 0.0f, 0.0f);
185 186
186 glNormal3f(-nc, -nc, nc); 187// glNormal3f(-nc, -nc, nc);
187 gGL.vertex3f(0.0f, 0.0f, 0.05f); 188// gGL.vertex3f(0.0f, 0.0f, 0.05f);
188 gGL.vertex3f(-0.05f, 0.0f, 0.0f); 189// gGL.vertex3f(-0.05f, 0.0f, 0.0f);
189 gGL.vertex3f(0.0f, -0.05f, 0.0f); 190// gGL.vertex3f(0.0f, -0.05f, 0.0f);
190 191
191 glNormal3f(nc, -nc, nc); 192// glNormal3f(nc, -nc, nc);
192 gGL.vertex3f(0.0f, 0.0f, 0.05f); 193// gGL.vertex3f(0.0f, 0.0f, 0.05f);
193 gGL.vertex3f(0.0f, -0.05f, 0.0f); 194// gGL.vertex3f(0.0f, -0.05f, 0.0f);
194 gGL.vertex3f(0.05f, 0.0f, 0.0f); 195// gGL.vertex3f(0.05f, 0.0f, 0.0f);
195 196
196 // joint bottom half 197// // joint bottom half
197 glNormal3f(nc, nc, -nc); 198// glNormal3f(nc, nc, -nc);
198 gGL.vertex3f(0.0f, 0.0f, -0.05f); 199// gGL.vertex3f(0.0f, 0.0f, -0.05f);
199 gGL.vertex3f(0.0f, 0.05f, 0.0f); 200// gGL.vertex3f(0.0f, 0.05f, 0.0f);
200 gGL.vertex3f(0.05f, 0.0f, 0.0f); 201// gGL.vertex3f(0.05f, 0.0f, 0.0f);
201 202
202 glNormal3f(-nc, nc, -nc); 203// glNormal3f(-nc, nc, -nc);
203 gGL.vertex3f(0.0f, 0.0f, -0.05f); 204// gGL.vertex3f(0.0f, 0.0f, -0.05f);
204 gGL.vertex3f(-0.05f, 0.0f, 0.0f); 205// gGL.vertex3f(-0.05f, 0.0f, 0.0f);
205 gGL.vertex3f(0.0f, 0.05f, 0.0f); 206// gGL.vertex3f(0.0f, 0.05f, 0.0f);
206 207
207 glNormal3f(-nc, -nc, -nc); 208// glNormal3f(-nc, -nc, -nc);
208 gGL.vertex3f(0.0f, 0.0f, -0.05f); 209// gGL.vertex3f(0.0f, 0.0f, -0.05f);
209 gGL.vertex3f(0.0f, -0.05f, 0.0f); 210// gGL.vertex3f(0.0f, -0.05f, 0.0f);
210 gGL.vertex3f(-0.05f, 0.0f, 0.0f); 211// gGL.vertex3f(-0.05f, 0.0f, 0.0f);
211 212
212 glNormal3f(nc, -nc, -nc); 213// glNormal3f(nc, -nc, -nc);
213 gGL.vertex3f(0.0f, 0.0f, -0.05f); 214// gGL.vertex3f(0.0f, 0.0f, -0.05f);
214 gGL.vertex3f(0.05f, 0.0f, 0.0f); 215// gGL.vertex3f(0.05f, 0.0f, 0.0f);
215 gGL.vertex3f(0.0f, -0.05f, 0.0f); 216// gGL.vertex3f(0.0f, -0.05f, 0.0f);
216 217
217 gGL.end(); 218// gGL.end();
218 } 219// }
219 220
220 //---------------------------------------------------------------- 221// //----------------------------------------------------------------
221 // render children 222// // render children
222 //---------------------------------------------------------------- 223// //----------------------------------------------------------------
223 if (recursive) 224// if (recursive)
224 { 225// {
225 for (child_list_t::iterator iter = mChildren.begin(); 226// for (child_list_t::iterator iter = mChildren.begin();
226 iter != mChildren.end(); ++iter) 227// iter != mChildren.end(); ++iter)
227 { 228// {
228 LLViewerJoint* joint = (LLViewerJoint*)(*iter); 229// LLViewerJoint* joint = (LLViewerJoint*)(*iter);
229 joint->renderSkeleton(); 230// joint->renderSkeleton();
230 } 231// }
231 } 232// }
232 233
233 //---------------------------------------------------------------- 234// //----------------------------------------------------------------
234 // pop matrix stack 235// // pop matrix stack
235 //---------------------------------------------------------------- 236// //----------------------------------------------------------------
236 glPopMatrix(); 237// glPopMatrix();
237} 238// }
238 239
239 240
240//-------------------------------------------------------------------- 241//--------------------------------------------------------------------
@@ -330,59 +331,60 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass )
330 331
331//-------------------------------------------------------------------- 332//--------------------------------------------------------------------
332// drawBone() 333// drawBone()
334// DEBUG (UNUSED)
333//-------------------------------------------------------------------- 335//--------------------------------------------------------------------
334void LLViewerJoint::drawBone() 336// void LLViewerJoint::drawBone()
335{ 337// {
336 if ( mParent == NULL ) 338// if ( mParent == NULL )
337 return; 339// return;
338 340
339 F32 boneSize = 0.02f; 341// F32 boneSize = 0.02f;
340 342
341 // rotate to point to child (bone direction) 343// // rotate to point to child (bone direction)
342 glPushMatrix(); 344// glPushMatrix();
343 345
344 LLVector3 boneX = getPosition(); 346// LLVector3 boneX = getPosition();
345 F32 length = boneX.normVec(); 347// F32 length = boneX.normVec();
346 348
347 LLVector3 boneZ(1.0f, 0.0f, 1.0f); 349// LLVector3 boneZ(1.0f, 0.0f, 1.0f);
348 350
349 LLVector3 boneY = boneZ % boneX; 351// LLVector3 boneY = boneZ % boneX;
350 boneY.normVec(); 352// boneY.normVec();
351 353
352 boneZ = boneX % boneY; 354// boneZ = boneX % boneY;
353 355
354 LLMatrix4 rotateMat; 356// LLMatrix4 rotateMat;
355 rotateMat.setFwdRow( boneX ); 357// rotateMat.setFwdRow( boneX );
356 rotateMat.setLeftRow( boneY ); 358// rotateMat.setLeftRow( boneY );
357 rotateMat.setUpRow( boneZ ); 359// rotateMat.setUpRow( boneZ );
358 glMultMatrixf( &rotateMat.mMatrix[0][0] ); 360// glMultMatrixf( &rotateMat.mMatrix[0][0] );
359 361
360 // render the bone 362// // render the bone
361 gGL.color3f( 0.5f, 0.5f, 0.0f ); 363// gGL.color3f( 0.5f, 0.5f, 0.0f );
362 364
363 gGL.begin(LLVertexBuffer::TRIANGLES); 365// gGL.begin(LLVertexBuffer::TRIANGLES);
364 366
365 gGL.vertex3f( length, 0.0f, 0.0f); 367// gGL.vertex3f( length, 0.0f, 0.0f);
366 gGL.vertex3f( 0.0f, boneSize, 0.0f); 368// gGL.vertex3f( 0.0f, boneSize, 0.0f);
367 gGL.vertex3f( 0.0f, 0.0f, boneSize); 369// gGL.vertex3f( 0.0f, 0.0f, boneSize);
368 370
369 gGL.vertex3f( length, 0.0f, 0.0f); 371// gGL.vertex3f( length, 0.0f, 0.0f);
370 gGL.vertex3f( 0.0f, 0.0f, -boneSize); 372// gGL.vertex3f( 0.0f, 0.0f, -boneSize);
371 gGL.vertex3f( 0.0f, boneSize, 0.0f); 373// gGL.vertex3f( 0.0f, boneSize, 0.0f);
372 374
373 gGL.vertex3f( length, 0.0f, 0.0f); 375// gGL.vertex3f( length, 0.0f, 0.0f);
374 gGL.vertex3f( 0.0f, -boneSize, 0.0f); 376// gGL.vertex3f( 0.0f, -boneSize, 0.0f);
375 gGL.vertex3f( 0.0f, 0.0f, -boneSize); 377// gGL.vertex3f( 0.0f, 0.0f, -boneSize);
376 378
377 gGL.vertex3f( length, 0.0f, 0.0f); 379// gGL.vertex3f( length, 0.0f, 0.0f);
378 gGL.vertex3f( 0.0f, 0.0f, boneSize); 380// gGL.vertex3f( 0.0f, 0.0f, boneSize);
379 gGL.vertex3f( 0.0f, -boneSize, 0.0f); 381// gGL.vertex3f( 0.0f, -boneSize, 0.0f);
380 382
381 gGL.end(); 383// gGL.end();
382 384
383 // restore matrix 385// // restore matrix
384 glPopMatrix(); 386// glPopMatrix();
385} 387// }
386 388
387//-------------------------------------------------------------------- 389//--------------------------------------------------------------------
388// isTransparent() 390// isTransparent()
@@ -437,13 +439,13 @@ void LLViewerJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind)
437 } 439 }
438} 440}
439 441
440void LLViewerJoint::updateGeometry() 442void LLViewerJoint::updateJointGeometry()
441{ 443{
442 for (child_list_t::iterator iter = mChildren.begin(); 444 for (child_list_t::iterator iter = mChildren.begin();
443 iter != mChildren.end(); ++iter) 445 iter != mChildren.end(); ++iter)
444 { 446 {
445 LLViewerJoint* joint = (LLViewerJoint*)(*iter); 447 LLViewerJoint* joint = (LLViewerJoint*)(*iter);
446 joint->updateGeometry(); 448 joint->updateJointGeometry();
447 } 449 }
448} 450}
449 451
diff --git a/linden/indra/newview/llviewerjoint.h b/linden/indra/newview/llviewerjoint.h
index d223c42..f73e705 100644
--- a/linden/indra/newview/llviewerjoint.h
+++ b/linden/indra/newview/llviewerjoint.h
@@ -60,7 +60,12 @@ public:
60 // Primarily for debugging and character setup 60 // Primarily for debugging and character setup
61 // Derived classes may add text/graphic output. 61 // Derived classes may add text/graphic output.
62 // Draw skeleton graphic for debugging and character setup 62 // Draw skeleton graphic for debugging and character setup
63 virtual void renderSkeleton(BOOL recursive=TRUE); 63 void renderSkeleton(BOOL recursive=TRUE); // debug only (unused)
64
65 // Draws a bone graphic to the parent joint.
66 // Derived classes may add text/graphic output.
67 // Called by renderSkeleton().
68 void drawBone(); // debug only (unused)
64 69
65 // Render character hierarchy. 70 // Render character hierarchy.
66 // Traverses the entire joint hierarchy, setting up 71 // Traverses the entire joint hierarchy, setting up
@@ -68,11 +73,6 @@ public:
68 // Derived classes may add text/graphic output. 73 // Derived classes may add text/graphic output.
69 virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE ); // Returns triangle count 74 virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE ); // Returns triangle count
70 75
71 // Draws a bone graphic to the parent joint.
72 // Derived classes may add text/graphic output.
73 // Called by renderSkeleton().
74 virtual void drawBone();
75
76 // Returns true if this object is transparent. 76 // Returns true if this object is transparent.
77 // This is used to determine in which order to draw objects. 77 // This is used to determine in which order to draw objects.
78 virtual BOOL isTransparent(); 78 virtual BOOL isTransparent();
@@ -127,7 +127,7 @@ public:
127 virtual void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area); 127 virtual void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);
128 virtual void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE); 128 virtual void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE);
129 virtual BOOL updateLOD(F32 pixel_area, BOOL activate); 129 virtual BOOL updateLOD(F32 pixel_area, BOOL activate);
130 virtual void updateGeometry(); 130 virtual void updateJointGeometry();
131 virtual void dump(); 131 virtual void dump();
132 132
133 void setVisible( BOOL visible, BOOL recursive ); 133 void setVisible( BOOL visible, BOOL recursive );
diff --git a/linden/indra/newview/llviewerjointattachment.cpp b/linden/indra/newview/llviewerjointattachment.cpp
index f5a5d8a..1cdd10f 100644
--- a/linden/indra/newview/llviewerjointattachment.cpp
+++ b/linden/indra/newview/llviewerjointattachment.cpp
@@ -56,7 +56,6 @@ extern LLPipeline gPipeline;
56// LLViewerJointAttachment() 56// LLViewerJointAttachment()
57//----------------------------------------------------------------------------- 57//-----------------------------------------------------------------------------
58LLViewerJointAttachment::LLViewerJointAttachment() : 58LLViewerJointAttachment::LLViewerJointAttachment() :
59mJoint(NULL),
60mAttachedObject(NULL), 59mAttachedObject(NULL),
61mVisibleInFirst(FALSE), 60mVisibleInFirst(FALSE),
62mGroup(0), 61mGroup(0),
diff --git a/linden/indra/newview/llviewerjointattachment.h b/linden/indra/newview/llviewerjointattachment.h
index 63484c7..8e665aa 100644
--- a/linden/indra/newview/llviewerjointattachment.h
+++ b/linden/indra/newview/llviewerjointattachment.h
@@ -68,7 +68,6 @@ public:
68 // accessors 68 // accessors
69 // 69 //
70 70
71 void setJoint (LLJoint* joint) { mJoint = joint; }
72 void setPieSlice(S32 pie_slice) { mPieSlice = pie_slice; } 71 void setPieSlice(S32 pie_slice) { mPieSlice = pie_slice; }
73 void setVisibleInFirstPerson(BOOL visibility) { mVisibleInFirst = visibility; } 72 void setVisibleInFirstPerson(BOOL visibility) { mVisibleInFirst = visibility; }
74 BOOL getVisibleInFirstPerson() { return mVisibleInFirst; } 73 BOOL getVisibleInFirstPerson() { return mVisibleInFirst; }
@@ -99,7 +98,6 @@ protected:
99 void calcLOD(); 98 void calcLOD();
100 99
101protected: 100protected:
102 LLJoint* mJoint;
103 // Backlink only; don't make this an LLPointer. 101 // Backlink only; don't make this an LLPointer.
104 LLViewerObject* mAttachedObject; 102 LLViewerObject* mAttachedObject;
105 BOOL mVisibleInFirst; 103 BOOL mVisibleInFirst;
diff --git a/linden/indra/newview/llviewerjointmesh.cpp b/linden/indra/newview/llviewerjointmesh.cpp
index 0dcf4ab..9ffeee4 100644
--- a/linden/indra/newview/llviewerjointmesh.cpp
+++ b/linden/indra/newview/llviewerjointmesh.cpp
@@ -873,7 +873,7 @@ void LLViewerJointMesh::updateVectorize()
873 } 873 }
874} 874}
875 875
876void LLViewerJointMesh::updateGeometry() 876void LLViewerJointMesh::updateJointGeometry()
877{ 877{
878 if (!(mValid 878 if (!(mValid
879 && mMesh 879 && mMesh
diff --git a/linden/indra/newview/llviewerjointmesh.h b/linden/indra/newview/llviewerjointmesh.h
index 85f8e97..fd7f550 100644
--- a/linden/indra/newview/llviewerjointmesh.h
+++ b/linden/indra/newview/llviewerjointmesh.h
@@ -142,7 +142,7 @@ public:
142 /*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area); 142 /*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);
143 /*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE); 143 /*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE);
144 /*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate); 144 /*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate);
145 /*virtual*/ void updateGeometry(); 145 /*virtual*/ void updateJointGeometry();
146 /*virtual*/ void dump(); 146 /*virtual*/ void dump();
147 147
148 void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; } 148 void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; }
diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp
index c1de774..42cbe46 100644
--- a/linden/indra/newview/llviewernetwork.cpp
+++ b/linden/indra/newview/llviewernetwork.cpp
@@ -120,13 +120,8 @@ static LLGridData gGridInfo[GRID_INFO_COUNT] =
120 "" } 120 "" }
121}; 121};
122 122
123#if LL_RELEASE_FOR_DOWNLOAD 123const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI;
124 // Default userserver for production builds is agni 124
125 const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI;
126#else
127 // Default userserver for development builds is none
128 const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_NONE;
129#endif
130 125
131unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ 126unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */
132 127
@@ -142,7 +137,7 @@ void LLViewerLogin::setGridChoice(EGridInfo grid)
142 llerrs << "Invalid grid index specified." << llendl; 137 llerrs << "Invalid grid index specified." << llendl;
143 } 138 }
144 139
145 if(mGridChoice != grid) 140 if(mGridChoice != grid || gSavedSettings.getS32("ServerChoice") != grid)
146 { 141 {
147 mGridChoice = grid; 142 mGridChoice = grid;
148 if(GRID_INFO_LOCAL == mGridChoice) 143 if(GRID_INFO_LOCAL == mGridChoice)
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp
index 84475ab..bd8ed97 100644
--- a/linden/indra/newview/llviewerobjectlist.cpp
+++ b/linden/indra/newview/llviewerobjectlist.cpp
@@ -685,7 +685,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
685 idle_iter != idle_list.end(); idle_iter++) 685 idle_iter != idle_list.end(); idle_iter++)
686 { 686 {
687 objectp = *idle_iter; 687 objectp = *idle_iter;
688 llassert_always(objectp) ;
689 if (!objectp->idleUpdate(agent, world, frame_time)) 688 if (!objectp->idleUpdate(agent, world, frame_time))
690 { 689 {
691 // If Idle Update returns false, kill object! 690 // If Idle Update returns false, kill object!
diff --git a/linden/indra/newview/llviewerstats.cpp b/linden/indra/newview/llviewerstats.cpp
index 52b6748..fd56c21 100644
--- a/linden/indra/newview/llviewerstats.cpp
+++ b/linden/indra/newview/llviewerstats.cpp
@@ -52,6 +52,7 @@
52#include "lldebugview.h" 52#include "lldebugview.h"
53#include "llfasttimerview.h" 53#include "llfasttimerview.h"
54#include "llviewerregion.h" 54#include "llviewerregion.h"
55#include "llvoavatar.h"
55#include "llfloaterhtml.h" 56#include "llfloaterhtml.h"
56#include "llviewerwindow.h" // *TODO: remove, only used for width/height 57#include "llviewerwindow.h" // *TODO: remove, only used for width/height
57#include "llworld.h" 58#include "llworld.h"
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index d61fa59..c2fd92c 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -4522,7 +4522,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
4522 else 4522 else
4523 { 4523 {
4524 display(do_rebuild, scale_factor, subimage_x+(subimage_y*llceil(scale_factor)), use_fbo); 4524 display(do_rebuild, scale_factor, subimage_x+(subimage_y*llceil(scale_factor)), use_fbo);
4525 render_ui_and_swap();
4526 } 4525 }
4527 4526
4528 S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width); 4527 S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width);
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index 6b5f066..b4357d8 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -888,52 +888,53 @@ LLVOAvatar::LLVOAvatar(
888 if (LLCharacter::sInstances.size() == 1) 888 if (LLCharacter::sInstances.size() == 1)
889 { 889 {
890 LLKeyframeMotion::setVFS(gStaticVFS); 890 LLKeyframeMotion::setVFS(gStaticVFS);
891 addMotion( ANIM_AGENT_BUSY, LLNullMotion::create ); 891 registerMotion( ANIM_AGENT_BUSY, LLNullMotion::create );
892 addMotion( ANIM_AGENT_CROUCH, LLKeyframeStandMotion::create ); 892 registerMotion( ANIM_AGENT_CROUCH, LLKeyframeStandMotion::create );
893 addMotion( ANIM_AGENT_CROUCHWALK, LLKeyframeWalkMotion::create ); 893 registerMotion( ANIM_AGENT_CROUCHWALK, LLKeyframeWalkMotion::create );
894 addMotion( ANIM_AGENT_EXPRESS_AFRAID, LLEmote::create ); 894 registerMotion( ANIM_AGENT_EXPRESS_AFRAID, LLEmote::create );
895 addMotion( ANIM_AGENT_EXPRESS_ANGER, LLEmote::create ); 895 registerMotion( ANIM_AGENT_EXPRESS_ANGER, LLEmote::create );
896 addMotion( ANIM_AGENT_EXPRESS_BORED, LLEmote::create ); 896 registerMotion( ANIM_AGENT_EXPRESS_BORED, LLEmote::create );
897 addMotion( ANIM_AGENT_EXPRESS_CRY, LLEmote::create ); 897 registerMotion( ANIM_AGENT_EXPRESS_CRY, LLEmote::create );
898 addMotion( ANIM_AGENT_EXPRESS_DISDAIN, LLEmote::create ); 898 registerMotion( ANIM_AGENT_EXPRESS_DISDAIN, LLEmote::create );
899 addMotion( ANIM_AGENT_EXPRESS_EMBARRASSED, LLEmote::create ); 899 registerMotion( ANIM_AGENT_EXPRESS_EMBARRASSED, LLEmote::create );
900 addMotion( ANIM_AGENT_EXPRESS_FROWN, LLEmote::create ); 900 registerMotion( ANIM_AGENT_EXPRESS_FROWN, LLEmote::create );
901 addMotion( ANIM_AGENT_EXPRESS_KISS, LLEmote::create ); 901 registerMotion( ANIM_AGENT_EXPRESS_KISS, LLEmote::create );
902 addMotion( ANIM_AGENT_EXPRESS_LAUGH, LLEmote::create ); 902 registerMotion( ANIM_AGENT_EXPRESS_LAUGH, LLEmote::create );
903 addMotion( ANIM_AGENT_EXPRESS_OPEN_MOUTH, LLEmote::create ); 903 registerMotion( ANIM_AGENT_EXPRESS_OPEN_MOUTH, LLEmote::create );
904 addMotion( ANIM_AGENT_EXPRESS_REPULSED, LLEmote::create ); 904 registerMotion( ANIM_AGENT_EXPRESS_REPULSED, LLEmote::create );
905 addMotion( ANIM_AGENT_EXPRESS_SAD, LLEmote::create ); 905 registerMotion( ANIM_AGENT_EXPRESS_SAD, LLEmote::create );
906 addMotion( ANIM_AGENT_EXPRESS_SHRUG, LLEmote::create ); 906 registerMotion( ANIM_AGENT_EXPRESS_SHRUG, LLEmote::create );
907 addMotion( ANIM_AGENT_EXPRESS_SMILE, LLEmote::create ); 907 registerMotion( ANIM_AGENT_EXPRESS_SMILE, LLEmote::create );
908 addMotion( ANIM_AGENT_EXPRESS_SURPRISE, LLEmote::create ); 908 registerMotion( ANIM_AGENT_EXPRESS_SURPRISE, LLEmote::create );
909 addMotion( ANIM_AGENT_EXPRESS_TONGUE_OUT, LLEmote::create ); 909 registerMotion( ANIM_AGENT_EXPRESS_TONGUE_OUT, LLEmote::create );
910 addMotion( ANIM_AGENT_EXPRESS_TOOTHSMILE, LLEmote::create ); 910 registerMotion( ANIM_AGENT_EXPRESS_TOOTHSMILE, LLEmote::create );
911 addMotion( ANIM_AGENT_EXPRESS_WINK, LLEmote::create ); 911 registerMotion( ANIM_AGENT_EXPRESS_WINK, LLEmote::create );
912 addMotion( ANIM_AGENT_EXPRESS_WORRY, LLEmote::create ); 912 registerMotion( ANIM_AGENT_EXPRESS_WORRY, LLEmote::create );
913 addMotion( ANIM_AGENT_RUN, LLKeyframeWalkMotion::create ); 913 registerMotion( ANIM_AGENT_RUN, LLKeyframeWalkMotion::create );
914 addMotion( ANIM_AGENT_STAND, LLKeyframeStandMotion::create ); 914 registerMotion( ANIM_AGENT_STAND, LLKeyframeStandMotion::create );
915 addMotion( ANIM_AGENT_STAND_1, LLKeyframeStandMotion::create ); 915 registerMotion( ANIM_AGENT_STAND_1, LLKeyframeStandMotion::create );
916 addMotion( ANIM_AGENT_STAND_2, LLKeyframeStandMotion::create ); 916 registerMotion( ANIM_AGENT_STAND_2, LLKeyframeStandMotion::create );
917 addMotion( ANIM_AGENT_STAND_3, LLKeyframeStandMotion::create ); 917 registerMotion( ANIM_AGENT_STAND_3, LLKeyframeStandMotion::create );
918 addMotion( ANIM_AGENT_STAND_4, LLKeyframeStandMotion::create ); 918 registerMotion( ANIM_AGENT_STAND_4, LLKeyframeStandMotion::create );
919 addMotion( ANIM_AGENT_STANDUP, LLKeyframeFallMotion::create ); 919 registerMotion( ANIM_AGENT_STANDUP, LLKeyframeFallMotion::create );
920 addMotion( ANIM_AGENT_TURNLEFT, LLKeyframeWalkMotion::create ); 920 registerMotion( ANIM_AGENT_TURNLEFT, LLKeyframeWalkMotion::create );
921 addMotion( ANIM_AGENT_TURNRIGHT, LLKeyframeWalkMotion::create ); 921 registerMotion( ANIM_AGENT_TURNRIGHT, LLKeyframeWalkMotion::create );
922 addMotion( ANIM_AGENT_WALK, LLKeyframeWalkMotion::create ); 922 registerMotion( ANIM_AGENT_WALK, LLKeyframeWalkMotion::create );
923 923
924 // motions without a start/stop bit 924 // motions without a start/stop bit
925 addMotion( ANIM_AGENT_BODY_NOISE, LLBodyNoiseMotion::create ); 925 registerMotion( ANIM_AGENT_BODY_NOISE, LLBodyNoiseMotion::create );
926 addMotion( ANIM_AGENT_BREATHE_ROT, LLBreatheMotionRot::create ); 926 registerMotion( ANIM_AGENT_BREATHE_ROT, LLBreatheMotionRot::create );
927 addMotion( ANIM_AGENT_EDITING, LLEditingMotion::create ); 927 registerMotion( ANIM_AGENT_EDITING, LLEditingMotion::create );
928 addMotion( ANIM_AGENT_EYE, LLEyeMotion::create ); 928 registerMotion( ANIM_AGENT_EYE, LLEyeMotion::create );
929 addMotion( ANIM_AGENT_FEMALE_WALK, LLKeyframeWalkMotion::create ); 929 registerMotion( ANIM_AGENT_FEMALE_WALK, LLKeyframeWalkMotion::create );
930 addMotion( ANIM_AGENT_FLY_ADJUST, LLFlyAdjustMotion::create ); 930 registerMotion( ANIM_AGENT_FLY_ADJUST, LLFlyAdjustMotion::create );
931 addMotion( ANIM_AGENT_HAND_MOTION, LLHandMotion::create ); 931 registerMotion( ANIM_AGENT_HAND_MOTION, LLHandMotion::create );
932 addMotion( ANIM_AGENT_HEAD_ROT, LLHeadRotMotion::create ); 932 registerMotion( ANIM_AGENT_HEAD_ROT, LLHeadRotMotion::create );
933 addMotion( ANIM_AGENT_PELVIS_FIX, LLPelvisFixMotion::create ); 933 registerMotion( ANIM_AGENT_PELVIS_FIX, LLPelvisFixMotion::create );
934 addMotion( ANIM_AGENT_SIT_FEMALE, LLKeyframeMotion::create ); 934 registerMotion( ANIM_AGENT_SIT_FEMALE, LLKeyframeMotion::create );
935 addMotion( ANIM_AGENT_TARGET, LLTargetingMotion::create ); 935 registerMotion( ANIM_AGENT_TARGET, LLTargetingMotion::create );
936 addMotion( ANIM_AGENT_WALK_ADJUST, LLWalkAdjustMotion::create ); 936 registerMotion( ANIM_AGENT_WALK_ADJUST, LLWalkAdjustMotion::create );
937
937 } 938 }
938 939
939 if (gNoRender) 940 if (gNoRender)
@@ -3329,7 +3330,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3329 // the rest should only be done occasionally for far away avatars 3330 // the rest should only be done occasionally for far away avatars
3330 //-------------------------------------------------------------------- 3331 //--------------------------------------------------------------------
3331 3332
3332 if (!mIsSelf && sUseImpostors && !mNeedsAnimUpdate && !sFreezeCounter) 3333 if (!mIsSelf && !mIsDummy && sUseImpostors && !mNeedsAnimUpdate && !sFreezeCounter)
3333 { 3334 {
3334 F32 impostor_area = 256.f*512.f*(8.125f - LLVOAvatar::sLODFactor*8.f); 3335 F32 impostor_area = 256.f*512.f*(8.125f - LLVOAvatar::sLODFactor*8.f);
3335 if (LLMuteList::getInstance()->isMuted(getID())) 3336 if (LLMuteList::getInstance()->isMuted(getID()))
@@ -3350,22 +3351,13 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3350 3351
3351 if (!visible) 3352 if (!visible)
3352 { 3353 {
3353 if (!mMotionController.isPaused()) 3354 updateMotions(LLCharacter::HIDDEN_UPDATE);
3354 {
3355 mMotionController.pause();
3356 mMotionController.updateMotion();
3357 mMotionController.unpause();
3358 }
3359 else
3360 {
3361 mMotionController.updateMotion();
3362 }
3363 return FALSE; 3355 return FALSE;
3364 } 3356 }
3365 } 3357 }
3366 3358
3367 // change animation time quanta based on avatar render load 3359 // change animation time quanta based on avatar render load
3368 if (!mIsSelf) 3360 if (!mIsSelf && !mIsDummy)
3369 { 3361 {
3370 F32 time_quantum = clamp_rescale((F32)sInstances.size(), 10.f, 35.f, 0.f, 0.25f); 3362 F32 time_quantum = clamp_rescale((F32)sInstances.size(), 10.f, 35.f, 0.f, 0.25f);
3371 F32 pixel_area_scale = clamp_rescale(mPixelArea, 100, 5000, 1.f, 0.f); 3363 F32 pixel_area_scale = clamp_rescale(mPixelArea, 100, 5000, 1.f, 0.f);
@@ -3639,10 +3631,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3639 mSpeed = speed; 3631 mSpeed = speed;
3640 3632
3641 // update animations 3633 // update animations
3642 { 3634 if (mSpecialRenderMode == 1) // Animation Preview
3643 LLFastTimer t(LLFastTimer::FTM_UPDATE_ANIMATION); 3635 updateMotions(LLCharacter::FORCE_UPDATE);
3644 updateMotion(); 3636 else
3645 } 3637 updateMotions(LLCharacter::NORMAL_UPDATE);
3646 3638
3647 // update head position 3639 // update head position
3648 updateHeadOffset(); 3640 updateHeadOffset();
@@ -3818,9 +3810,6 @@ void LLVOAvatar::updateVisibility()
3818 } 3810 }
3819 else 3811 else
3820 { 3812 {
3821 // calculate avatar distance wrt head
3822 mDrawable->updateDistance(*LLViewerCamera::getInstance());
3823
3824 if (!mDrawable->getSpatialGroup() || mDrawable->getSpatialGroup()->isVisible()) 3813 if (!mDrawable->getSpatialGroup() || mDrawable->getSpatialGroup()->isVisible())
3825 { 3814 {
3826 visible = TRUE; 3815 visible = TRUE;
@@ -3837,8 +3826,7 @@ void LLVOAvatar::updateVisibility()
3837 visible = FALSE; 3826 visible = FALSE;
3838 } 3827 }
3839 } 3828 }
3840 else 3829 else if( !mFirstAppearanceMessageReceived )
3841 if( !mFirstAppearanceMessageReceived )
3842 { 3830 {
3843 visible = FALSE; 3831 visible = FALSE;
3844 } 3832 }
@@ -3984,19 +3972,19 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
3984 if (mNeedsSkin) 3972 if (mNeedsSkin)
3985 { 3973 {
3986 //generate animated mesh 3974 //generate animated mesh
3987 mLowerBodyLOD.updateGeometry(); 3975 mLowerBodyLOD.updateJointGeometry();
3988 mUpperBodyLOD.updateGeometry(); 3976 mUpperBodyLOD.updateJointGeometry();
3989 3977
3990 if( isWearingWearableType( WT_SKIRT ) ) 3978 if( isWearingWearableType( WT_SKIRT ) )
3991 { 3979 {
3992 mSkirtLOD.updateGeometry(); 3980 mSkirtLOD.updateJointGeometry();
3993 } 3981 }
3994 3982
3995 if (!mIsSelf || gAgent.needsRenderHead()) 3983 if (!mIsSelf || gAgent.needsRenderHead())
3996 { 3984 {
3997 mEyeLashLOD.updateGeometry(); 3985 mEyeLashLOD.updateJointGeometry();
3998 mHeadLOD.updateGeometry(); 3986 mHeadLOD.updateJointGeometry();
3999 mHairLOD.updateGeometry(); 3987 mHairLOD.updateJointGeometry();
4000 } 3988 }
4001 mNeedsSkin = FALSE; 3989 mNeedsSkin = FALSE;
4002 3990
@@ -5756,6 +5744,7 @@ void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent)
5756//----------------------------------------------------------------------------- 5744//-----------------------------------------------------------------------------
5757BOOL LLVOAvatar::updateJointLODs() 5745BOOL LLVOAvatar::updateJointLODs()
5758{ 5746{
5747 const F32 MAX_PIXEL_AREA = 100000000.f;
5759 F32 lod_factor = (sLODFactor * AVATAR_LOD_TWEAK_RANGE + (1.f - AVATAR_LOD_TWEAK_RANGE)); 5748 F32 lod_factor = (sLODFactor * AVATAR_LOD_TWEAK_RANGE + (1.f - AVATAR_LOD_TWEAK_RANGE));
5760 F32 avatar_num_min_factor = clamp_rescale(sLODFactor, 0.f, 1.f, 0.25f, 0.6f); 5749 F32 avatar_num_min_factor = clamp_rescale(sLODFactor, 0.f, 1.f, 0.25f, 0.6f);
5761 F32 avatar_num_factor = clamp_rescale((F32)sNumVisibleAvatars, 8, 25, 1.f, avatar_num_min_factor); 5750 F32 avatar_num_factor = clamp_rescale((F32)sNumVisibleAvatars, 8, 25, 1.f, avatar_num_min_factor);
@@ -5766,7 +5755,7 @@ BOOL LLVOAvatar::updateJointLODs()
5766 { 5755 {
5767 if(gAgent.cameraCustomizeAvatar() || gAgent.cameraMouselook()) 5756 if(gAgent.cameraCustomizeAvatar() || gAgent.cameraMouselook())
5768 { 5757 {
5769 mAdjustedPixelArea = 1000000; 5758 mAdjustedPixelArea = MAX_PIXEL_AREA;
5770 } 5759 }
5771 else 5760 else
5772 { 5761 {
@@ -5775,7 +5764,7 @@ BOOL LLVOAvatar::updateJointLODs()
5775 } 5764 }
5776 else if (mIsDummy) 5765 else if (mIsDummy)
5777 { 5766 {
5778 mAdjustedPixelArea = 1000000; 5767 mAdjustedPixelArea = MAX_PIXEL_AREA;
5779 } 5768 }
5780 else 5769 else
5781 { 5770 {
@@ -6729,7 +6718,7 @@ void LLVOAvatar::dumpTotalLocalTextureByteCount()
6729 6718
6730BOOL LLVOAvatar::isVisible() 6719BOOL LLVOAvatar::isVisible()
6731{ 6720{
6732 return mDrawable.notNull() && mDrawable->isVisible(); 6721 return mDrawable.notNull() && (mDrawable->isVisible() || mIsDummy);
6733} 6722}
6734 6723
6735 6724
@@ -9691,7 +9680,8 @@ BOOL LLVOAvatar::updateLOD()
9691 mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY); 9680 mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY);
9692 } 9681 }
9693 9682
9694 9683 updateVisibility();
9684
9695 return res; 9685 return res;
9696} 9686}
9697 9687
diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h
index 1df8275..a1f5bd2 100644
--- a/linden/indra/newview/llvoavatar.h
+++ b/linden/indra/newview/llvoavatar.h
@@ -751,9 +751,9 @@ public:
751 //-------------------------------------------------------------------- 751 //--------------------------------------------------------------------
752 F32 mSpeed; 752 F32 mSpeed;
753 753
754 // 754 //--------------------------------------------------------------------
755 // Shadow stuff 755 // Shadow stuff
756 // 756 //--------------------------------------------------------------------
757 LLDrawable* mShadow; 757 LLDrawable* mShadow;
758 BOOL mInAir; 758 BOOL mInAir;
759 LLFrameTimer mTimeInAir; 759 LLFrameTimer mTimeInAir;
@@ -1009,7 +1009,7 @@ protected:
1009 S32 getLocalDiscardLevel( S32 index); 1009 S32 getLocalDiscardLevel( S32 index);
1010 1010
1011 void shame(); //generate shame metric 1011 void shame(); //generate shame metric
1012//Ventrella 1012
1013 //----------------------------------------------------------------------------------------------- 1013 //-----------------------------------------------------------------------------------------------
1014 // the Voice Visualizer is responsible for detecting the user's voice signal, and when the 1014 // the Voice Visualizer is responsible for detecting the user's voice signal, and when the
1015 // user speaks, it puts a voice symbol over the avatar's head, and triggering gesticulations 1015 // user speaks, it puts a voice symbol over the avatar's head, and triggering gesticulations
@@ -1017,7 +1017,6 @@ protected:
1017 private: 1017 private:
1018 LLVoiceVisualizer * mVoiceVisualizer; 1018 LLVoiceVisualizer * mVoiceVisualizer;
1019 int mCurrentGesticulationLevel; 1019 int mCurrentGesticulationLevel;
1020//End Ventrella
1021 1020
1022private: 1021private:
1023 static S32 sFreezeCounter ; 1022 static S32 sFreezeCounter ;
diff --git a/linden/indra/newview/llvoiceclient.h b/linden/indra/newview/llvoiceclient.h
index d1609a8..8d2c2ac 100644
--- a/linden/indra/newview/llvoiceclient.h
+++ b/linden/indra/newview/llvoiceclient.h
@@ -31,8 +31,6 @@
31#ifndef LL_VOICE_CLIENT_H 31#ifndef LL_VOICE_CLIENT_H
32#define LL_VOICE_CLIENT_H 32#define LL_VOICE_CLIENT_H
33 33
34// This would create a circular reference -- just do a forward definition of necessary class names.
35//#include "llvoavatar.h"
36class LLVOAvatar; 34class LLVOAvatar;
37class LLVivoxProtocolParser; 35class LLVivoxProtocolParser;
38 36
diff --git a/linden/indra/newview/llwebbrowserctrl.cpp b/linden/indra/newview/llwebbrowserctrl.cpp
index 1d187cb..cfe5cb6 100644
--- a/linden/indra/newview/llwebbrowserctrl.cpp
+++ b/linden/indra/newview/llwebbrowserctrl.cpp
@@ -862,7 +862,7 @@ BOOL LLWebBrowserTexture::render()
862 mTexture->setSubImage( pixels, 862 mTexture->setSubImage( pixels,
863 media_data_width, media_data_height, 863 media_data_width, media_data_height,
864 0, 0, 864 0, 0,
865 width, height ); 865 llmin(width, media_data_width), llmin(media_data_height, height) );
866 }; 866 };
867 } 867 }
868 else 868 else
diff --git a/linden/indra/newview/macview.xcodeproj/project.pbxproj b/linden/indra/newview/macview.xcodeproj/project.pbxproj
index c361fcf..81e0874 100644
--- a/linden/indra/newview/macview.xcodeproj/project.pbxproj
+++ b/linden/indra/newview/macview.xcodeproj/project.pbxproj
@@ -5544,6 +5544,7 @@
5544 "-DLL_RELEASE_FOR_DOWNLOAD=1", 5544 "-DLL_RELEASE_FOR_DOWNLOAD=1",
5545 "-DNDEBUG", 5545 "-DNDEBUG",
5546 "-fconstant-cfstrings", 5546 "-fconstant-cfstrings",
5547 "-mlong-branch",
5547 ); 5548 );
5548 OTHER_CPLUSPLUSFLAGS = ( 5549 OTHER_CPLUSPLUSFLAGS = (
5549 "$(OTHER_CFLAGS)", 5550 "$(OTHER_CFLAGS)",
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp
index 5088b16..cd546d4 100644
--- a/linden/indra/newview/pipeline.cpp
+++ b/linden/indra/newview/pipeline.cpp
@@ -1786,17 +1786,16 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
1786 LLSpatialGroup* group = drawablep->getSpatialGroup(); 1786 LLSpatialGroup* group = drawablep->getSpatialGroup();
1787 if (!group || group->changeLOD()) 1787 if (!group || group->changeLOD())
1788 { 1788 {
1789 if (!drawablep->isActive() && drawablep->isVisible()) 1789 if (drawablep->isVisible() && !sSkipUpdate)
1790 { 1790 {
1791 if (!sSkipUpdate) 1791 if (!drawablep->isActive())
1792 { 1792 {
1793 drawablep->updateDistance(camera); 1793 drawablep->updateDistance(camera);
1794 } 1794 }
1795 } 1795 else if (drawablep->isAvatar())
1796 else if (drawablep->isAvatar() && drawablep->isVisible()) 1796 {
1797 { 1797 drawablep->updateDistance(camera); // calls vobj->updateLOD() which calls LLVOAvatar::updateVisibility()
1798 LLVOAvatar* vobj = (LLVOAvatar*) drawablep->getVObj().get(); 1798 }
1799 vobj->updateVisibility();
1800 } 1799 }
1801 } 1800 }
1802 1801
diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt
index f3fbcb1..5ec38fc 100644
--- a/linden/indra/newview/releasenotes.txt
+++ b/linden/indra/newview/releasenotes.txt
@@ -4,10 +4,37 @@
4| http://wiki.secondlife.com/wiki/Beta_Release_Notes | 4| http://wiki.secondlife.com/wiki/Beta_Release_Notes |
5+------------------------------------------------------+ 5+------------------------------------------------------+
6 6
7Release Notes for Second Life 1.20(11) June 17th, 2008
8=====================================
9
10Fixes:
11* Fixed: VWR-7730: Sound / UI Sound broken on Mac PPC RC 1.20.10
12* Fixed: VWR-7614: Snapshots show user interface when "Show Interface In Snapshot" is un-checked/ VWR-7679: Interface also shows in screen_last.bmp
13* Fixed: VWR-2633: Some groups can't be accessed from Communicate window and only show in profile / VWR-6889: Unable to leave group when role has no allowed abilities
14* Fixed: VWR-5895: slowly rotating llTargetOmega child prims stop rotating when you move away
15* Fixed: VWR-6828: Character > Show Look At / Show Point At don't work
16* Fixed: VWR-7682: Typo on Teleport Failure dialog
17* Fixed: VWR-7086: floater_buy_land.xml still contains messages regarding First Land
18* Fixed: VWR-5697: RC 1.19.1 crash on startup with Vista UAC enabled
19* Fixed: VWR-7723: crash on LLImageGL::setSubImage line 780
20* Fixed: crash on LLViewerImageList::removeImageFromList
21* Fixed: crash on LLViewerImageList::updateImagesUpdateStats
22* Fixed: crash when creating many default boxes
23* Fixed: changing to and from Fullscreen view using Alt+Enter shortcut causes viewer to crash/hang
24* Fixed: Load the initial avatar outfit earlier in the startup process to avoid Ruth effect at Orientation Island
25* Fixed: Add the new TRANSPARENT_TEXTURE constant's target texture to the inventory Library of 1.20
26* Fixed: Search > Places tab results are displayed in white text
27* Fixed: 1.20 viewer reports GeForce FX5200 card incorrectly
28* Fixed: Fix the URL used by crash_logger for pre login crashes.
29* Fixed: The viewer's crash logger needs to trim very long SecondLife.log files before sending.
30
31Localization Fixes:
32* Fixed: VWR-7731: Bad Japanese translation of "Select tool"
33
7Release Notes for Second Life 1.20(10) June 9th, 2008 34Release Notes for Second Life 1.20(10) June 9th, 2008
8===================================== 35=====================================
9 36
10Changes: 37New features:
11* Added five texture constants for referencing in llSetLinkTexture: 38* Added five texture constants for referencing in llSetLinkTexture:
12** TEXTURE_BLANK is the non-transparent blank texture, equivalent to UUID "5748decc-f629-461c-9a36-a35a221fe21f" 39** TEXTURE_BLANK is the non-transparent blank texture, equivalent to UUID "5748decc-f629-461c-9a36-a35a221fe21f"
13** TEXTURE_DEFAULT is the default plywood texture, equivalent to UUID "89556747-24cb-43ed-920b-47caed15465f" 40** TEXTURE_DEFAULT is the default plywood texture, equivalent to UUID "89556747-24cb-43ed-920b-47caed15465f"
@@ -23,28 +50,31 @@ Changes:
23 then you have to revert to the earlier LSL requirement to use the UUID of the texture you want to use. 50 then you have to revert to the earlier LSL requirement to use the UUID of the texture you want to use.
24*** The TEXTURE_TRANSPARENT texture will be gray unless you view it with a viewer that supports this transparent texture (1.20.10 or above). 51*** The TEXTURE_TRANSPARENT texture will be gray unless you view it with a viewer that supports this transparent texture (1.20.10 or above).
25 52
53Changes:
54* Watchdog is disabled in settings for final Release Candidates
55* VWR-7315: "TEXTURE_DEFAULT" is a bad constant name; (this now refers to Plywood texture)
56
26Fixes: 57Fixes:
27* Fixed: PowerPC Mac unexpectedly quits when SL runs 58* Fixed: VWR-7612: PowerPC Mac unexpectedly quits when SL runs
28* Fixed: VWR-7069: Can't login to v1.20 RC until the second try 59** also Possible Fix: VWR-7400 Mac PPC 1.20.8: Unable to connect
29* Fixed: Openssl hangs on first https request 60* Fixed: VWR-7069: Can't login to v1.20 RC until the second try (Openssl hangs on first https request)
30* Fixed: VWR-7261: pixellation static/rectangle seen nearby avatar imposters 61* Fixed: VWR-7261: pixellation static/rectangle seen nearby avatar imposters
31* Fixed: VWR-1715: Macintosh: cyclic short-term freezing of display, getting worse over time: does not respond to commands, eventually change of POV attempt crashes app 62* Fixed: VWR-1715: Macintosh: cyclic short-term freezing of display, getting worse over time: does not respond to commands, eventually change of POV attempt crashes app
32* Fixed: VWR-7338: New Texture Constant "TEXTURE_TRANSPARENT" is NOT transparent! 63* Fixed: VWR-7338: New Texture Constant "TEXTURE_TRANSPARENT" is NOT transparent!
33* Fixed: VWR-7315: "TEXTURE_DEFAULT" is a bad constant name 64* Fixed: crash on LLSpeakerMgr::findSpeaker
34* Fixed: Automatic linux font selection doesn't override legacy data in config file
35* Fixed: Viewer crash logger should trim very long SecondLife.log files before sending
36* Fixed: viewer sends no grid choice to the web server
37* Fixed: Fix the URL used by crash_logger for pre login crashes
38* Fixed: Any change to preferences "restores" the viewer window size
39* Fixed: Crash on LLSpeakerMgr::findSpeaker
40* Fixed: crash on LLAudioData - llaudio/audioengine.cpp 65* Fixed: crash on LLAudioData - llaudio/audioengine.cpp
41* Fixed: crash on LLGroupNotifyBox::moveToBack 66* Fixed: crash on LLGroupNotifyBox::moveToBack
42* Fixed: crash on LLPieMenu::show 67* Fixed: crash on LLPieMenu::show
43* Fixed: crash on LLFloaterWorldMap::buildLandmarkIDLists 68* Fixed: crash on LLFloaterWorldMap::buildLandmarkIDLists
44* Fixed: Setting Preferences > General > Crash Reports to Never Send crashes to desktop 69* Fixed: crash on LLDrawable::destroy
70* Fixed: Automatic linux font selection doesn't override legacy data in config file
71* Fixed: Any change to preferences "restores" the viewer window size
72* Fixed: viewer sends no grid choice to the web server
73* Fixed: Fix the URL used by crash_logger for pre login crashes
74* Fixed: Viewer crash logger should trim very long SecondLife.log files before sending
45 75
46Localization Fixes: 76Localization Fixes:
47Partial Fix: Repair truncated text in 1.20.9 localizations 77* Partial Fix: Repair truncated text in 1.20.9 localizations
48 78
49Release Notes for Second Life 1.20(9) June 3rd, 2008 79Release Notes for Second Life 1.20(9) June 3rd, 2008
50===================================== 80=====================================
diff --git a/linden/indra/newview/skins/xui/de/teleport_strings.xml b/linden/indra/newview/skins/xui/de/teleport_strings.xml
index 061f41d..6beba54 100644
--- a/linden/indra/newview/skins/xui/de/teleport_strings.xml
+++ b/linden/indra/newview/skins/xui/de/teleport_strings.xml
@@ -4,7 +4,7 @@
4 <message name="invalid_tport"> 4 <message name="invalid_tport">
5 Bei der Bearbeitung Ihrer Teleport-Anfrage ist ein Problem aufgetreten. Sie müssen 5 Bei der Bearbeitung Ihrer Teleport-Anfrage ist ein Problem aufgetreten. Sie müssen
6sich zum Teleportieren eventuell neu anmelden. Wenn Sie diese 6sich zum Teleportieren eventuell neu anmelden. Wenn Sie diese
7Nachricht weiterhin erhalten, konsultieren Sie bitte die Tech-Support-FAQ unter: 7Nachricht weiterhin erhalten, konsultieren Sie bitte die Tech-Support-FAQ unter:
8www.secondlife.com/support 8www.secondlife.com/support
9 </message> 9 </message>
10 <message name="invalid_region_handoff"> 10 <message name="invalid_region_handoff">
diff --git a/linden/indra/newview/skins/xui/en-us/floater_buy_land.xml b/linden/indra/newview/skins/xui/en-us/floater_buy_land.xml
index fe76e10..a7fd3ed 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_buy_land.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_buy_land.xml
@@ -213,14 +213,6 @@ Try selecting a smaller area.
213 Land owned by another user is selected. 213 Land owned by another user is selected.
214Try selecting a smaller area. 214Try selecting a smaller area.
215 </string> 215 </string>
216 <string name="for_first_time_group">
217 This land is reserved for first time buyers.
218You cannot buy it for a group.
219 </string>
220 <string name="for_first_time">
221 This land is reserved for first time buyers.
222You already own land.
223 </string>
224 <string name="processing"> 216 <string name="processing">
225 Processing your purchase... 217 Processing your purchase...
226 218
diff --git a/linden/indra/newview/skins/xui/en-us/floater_directory.xml b/linden/indra/newview/skins/xui/en-us/floater_directory.xml
index dd7520c..8cfb470 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_directory.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_directory.xml
@@ -385,6 +385,7 @@ To buy direct, visit the land and click on the place name in the title bar.
385 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" 385 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4"
386 mouse_opaque="true" name="result_text" v_pad="0" width="328" /> 386 mouse_opaque="true" name="result_text" v_pad="0" width="328" />
387 </panel> 387 </panel>
388
388 <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" 389 <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533"
389 label="Places" left="1" mouse_opaque="false" name="places_panel" 390 label="Places" left="1" mouse_opaque="false" name="places_panel"
390 width="778"> 391 width="778">
@@ -458,9 +459,8 @@ To buy direct, visit the land and click on the place name in the title bar.
458 <button bottom="-26" follows="left|top" font="SansSerif" halign="center" height="20" 459 <button bottom="-26" follows="left|top" font="SansSerif" halign="center" height="20"
459 label="Search" label_selected="Search" left_delta="136" mouse_opaque="true" 460 label="Search" label_selected="Search" left_delta="136" mouse_opaque="true"
460 name="Search" width="70" /> 461 name="Search" width="70" />
461 <scroll_list background_visible="false" bottom="-513" column_padding="0" draw_border="true" 462 <scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true"
462 draw_heading="true" fg_disable_color="1, 1, 1, 1" 463 draw_heading="true"
463 fg_selected_color="1, 1, 1, 1" fg_unselected_color="1, 1, 1, 1"
464 follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true" 464 follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true"
465 multi_select="false" name="results" search_column="2" width="339"> 465 multi_select="false" name="results" search_column="2" width="339">
466 <column label="" name="icon" width="24" /> 466 <column label="" name="icon" width="24" />
@@ -473,6 +473,7 @@ To buy direct, visit the land and click on the place name in the title bar.
473 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" 473 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4"
474 mouse_opaque="true" name="result_text" v_pad="0" width="328" /> 474 mouse_opaque="true" name="result_text" v_pad="0" width="328" />
475 </panel> 475 </panel>
476
476 <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" 477 <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533"
477 label="People" left="1" mouse_opaque="false" name="people_panel" 478 label="People" left="1" mouse_opaque="false" name="people_panel"
478 width="778"> 479 width="778">
diff --git a/linden/indra/newview/skins/xui/en-us/floater_hud.xml b/linden/indra/newview/skins/xui/en-us/floater_hud.xml
index 6a72920..2372f3e 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_hud.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_hud.xml
@@ -2,7 +2,7 @@
2<floater can_close="true" can_drag_on_left="false" can_minimize="false" can_resize="false" 2<floater can_close="true" can_drag_on_left="false" can_minimize="false" can_resize="false"
3 height="272" min_height="272" width="342" min_width="342" name="floater_hud" 3 height="272" min_height="272" width="342" min_width="342" name="floater_hud"
4 title="Tutorial"> 4 title="Tutorial">
5 <web_browser border_visible="false" left="0" bottom="0" right="-1" top="-16" caret_color="1 1 1 1" follows="top|left|bottom|right" 5 <web_browser border_visible="false" left="0" bottom="0" right="-1" top="-24" caret_color="1 1 1 1" follows="top|left|bottom|right"
6 name="floater_hud_browser" 6 name="floater_hud_browser"
7 start_url="data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody bgcolor=%22#000000%22 text=%22ffffff%22%3E%3Ch1%3E%3Ctt%3E%0D%0A%0D%0ALoading...%3C/tt%3E%3C/h1%3E%3C/body%3E%3C/html%3E" 7 start_url="data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody bgcolor=%22#000000%22 text=%22ffffff%22%3E%3Ch1%3E%3Ctt%3E%0D%0A%0D%0ALoading...%3C/tt%3E%3C/h1%3E%3C/body%3E%3C/html%3E"
8 /> 8 />
diff --git a/linden/indra/newview/skins/xui/en-us/floater_url_entry.xml b/linden/indra/newview/skins/xui/en-us/floater_url_entry.xml
index 64926c9..fb1f64a 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_url_entry.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_url_entry.xml
@@ -12,8 +12,6 @@
12 left="20" name="ok_btn" width="64" /> 12 left="20" name="ok_btn" width="64" />
13 <button bottom="10" bottom_delta="0" follows="top|left" height="20" label="Cancel" 13 <button bottom="10" bottom_delta="0" follows="top|left" height="20" label="Cancel"
14 left="112" name="cancel_btn" width="64" /> 14 left="112" name="cancel_btn" width="64" />
15 <button bottom="10" bottom_delta="0" follows="top|left" height="20" label="Cancel"
16 left="112" name="cancel_btn2" width="64" />
17 <button bottom="10" bottom_delta="0" follows="top|right" height="20" label="Clear" 15 <button bottom="10" bottom_delta="0" follows="top|right" height="20" label="Clear"
18 name="clear_btn" right="460" width="64" /> 16 name="clear_btn" right="460" width="64" />
19 <text bottom_delta="2" follows="bottom|left" height="15" left="220" 17 <text bottom_delta="2" follows="bottom|left" height="15" left="220"
diff --git a/linden/indra/newview/skins/xui/en-us/teleport_strings.xml b/linden/indra/newview/skins/xui/en-us/teleport_strings.xml
index 4b3dfa4..616dc1a 100644
--- a/linden/indra/newview/skins/xui/en-us/teleport_strings.xml
+++ b/linden/indra/newview/skins/xui/en-us/teleport_strings.xml
@@ -4,7 +4,7 @@
4 <message name="invalid_tport"> 4 <message name="invalid_tport">
5 Problem encountered processing your teleport request. You may 5 Problem encountered processing your teleport request. You may
6need to log back in before you can teleport. If you continue 6need to log back in before you can teleport. If you continue
7to get this message, please check the Tech Support FAQ at: 7to get this message, please check the Tech Support FAQ at:
8www.secondlife.com/support 8www.secondlife.com/support
9 </message> 9 </message>
10 <message name="invalid_region_handoff"> 10 <message name="invalid_region_handoff">
diff --git a/linden/indra/newview/skins/xui/ja/menu_viewer.xml b/linden/indra/newview/skins/xui/ja/menu_viewer.xml
index c987ea4..278e43f 100644
--- a/linden/indra/newview/skins/xui/ja/menu_viewer.xml
+++ b/linden/indra/newview/skins/xui/ja/menu_viewer.xml
@@ -177,7 +177,7 @@
177 <menu label="ツール" name="Tools"> 177 <menu label="ツール" name="Tools">
178 <menu_item_check label="リンクされたパートを編集" name="Edit Linked Parts" /> 178 <menu_item_check label="リンクされたパートを編集" name="Edit Linked Parts" />
179 <menu_item_separator label="-----------" name="separator7" /> 179 <menu_item_separator label="-----------" name="separator7" />
180 <menu label="報告" name="Select Tool"> 180 <menu label="" name="Select Tool">
181 <menu_item_call label="フォーカス" name="Focus" /> 181 <menu_item_call label="フォーカス" name="Focus" />
182 <menu_item_call label="移動" name="Move" /> 182 <menu_item_call label="移動" name="Move" />
183 <menu_item_call label="編集" name="Edit" /> 183 <menu_item_call label="編集" name="Edit" />
diff --git a/linden/indra/newview/skins/xui/ja/teleport_strings.xml b/linden/indra/newview/skins/xui/ja/teleport_strings.xml
index f86ec55..288c44b 100644
--- a/linden/indra/newview/skins/xui/ja/teleport_strings.xml
+++ b/linden/indra/newview/skins/xui/ja/teleport_strings.xml
@@ -4,7 +4,7 @@
4 <message name="invalid_tport"> 4 <message name="invalid_tport">
5 テレポート・リクエストの処理中に問題が発生しました。テレポートするには、 5 テレポート・リクエストの処理中に問題が発生しました。テレポートするには、
6再度ログインする必要があります。このメッセージが 6再度ログインする必要があります。このメッセージが
7 引き続き表示される場合は、技術サポートFAQ(www.secondlife.com/support) 7引き続き表示される場合は、技術サポートFAQ(www.secondlife.com/support)
8を参照してください。 8を参照してください。
9 </message> 9 </message>
10 <message name="invalid_region_handoff"> 10 <message name="invalid_region_handoff">
diff --git a/linden/indra/newview/skins/xui/ko/teleport_strings.xml b/linden/indra/newview/skins/xui/ko/teleport_strings.xml
index afb83d0..e7985e9 100644
--- a/linden/indra/newview/skins/xui/ko/teleport_strings.xml
+++ b/linden/indra/newview/skins/xui/ko/teleport_strings.xml
@@ -4,7 +4,7 @@
4 <message name="invalid_tport"> 4 <message name="invalid_tport">
5 텔리포트 요청 처리 중 문제가 발생했습니다. 지역 횡단을 하기 전에 5 텔리포트 요청 처리 중 문제가 발생했습니다. 지역 횡단을 하기 전에
6다시 로그인을 해야 합니다. 이러한 메시지를 6다시 로그인을 해야 합니다. 이러한 메시지를
7계속 받는 경우에는 www.secondlife.com/support에서 기술 지원 FAQ를 7계속 받는 경우에는 www.secondlife.com/support에서 기술 지원 FAQ를
8참조하십시오. 8참조하십시오.
9 </message> 9 </message>
10 <message name="invalid_region_handoff"> 10 <message name="invalid_region_handoff">