diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-24 12:00:45 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-24 12:00:45 -0500 |
commit | 0904cbe4846192c9897267c9a60175f84881f9ed (patch) | |
tree | 831bb035d1bb48edb8014d50394dd5148a578322 /indra/newview/llagentwearables.cpp | |
parent | e11d1c1d2b437b7b6d8ba0d0514f050b5d60b221 (diff) | |
parent | 8eb62aef06bc670ed758c605e6308ff700978a33 (diff) |
merge
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index cfa3f4ae02..574b449d23 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -675,7 +675,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab { wearable_vec[index] = wearable; old_wearable->setLabelUpdated(); - mAvatarObject->wearableUpdated(wearable->getType()); + wearableUpdated(wearable); } } @@ -690,13 +690,32 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE) { mWearableDatas[type].push_back(wearable); - mAvatarObject->wearableUpdated(wearable->getType()); - wearable->setLabelUpdated(); + wearableUpdated(wearable); return mWearableDatas[type].size()-1; } return MAX_WEARABLES_PER_TYPE; } +void LLAgentWearables::wearableUpdated(LLWearable *wearable) +{ + mAvatarObject->wearableUpdated(wearable->getType()); + wearable->setLabelUpdated(); + + // Hack pt 2. If the wearable we just loaded has definition version 24, + // then force a re-save of this wearable after slamming the version number to 22. + // This number was incorrectly incremented for internal builds before release, and + // this fix will ensure that the affected wearables are re-saved with the right version number. + // the versions themselves are compatible. This code can be removed before release. + if( wearable->getDefinitionVersion() == 24 ) + { + wearable->setDefinitionVersion(22); + U32 index = getWearableIndex(wearable); + llinfos << "forcing werable type " << wearable->getType() << " to version 22 from 24" << llendl; + saveWearable(wearable->getType(),index,TRUE); + } + +} + void LLAgentWearables::popWearable(LLWearable *wearable) { if (wearable == NULL) |