summaryrefslogtreecommitdiff
path: root/indra/newview/llwearable.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-19 12:19:11 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-19 12:19:11 +0200
commit58439da4c696f8dd6002e6399e4563cbda251a1e (patch)
tree261b81d6f3492b020852a03f8b358aabfd040836 /indra/newview/llwearable.cpp
parentda2a0cfceb9fbc7c66f23f8820309f36b6629530 (diff)
parent88cce61b09d225df0bcd8aab9dbd2c5a01ee7e19 (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llwearable.cpp')
-rw-r--r--indra/newview/llwearable.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index e37dffd526..2849cfa20e 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -225,7 +225,13 @@ BOOL LLWearable::importFile( LLFILE* file )
return FALSE;
}
- if( mDefinitionVersion > LLWearable::sCurrentDefinitionVersion )
+
+ // Temoprary hack to allow wearables with definition version 24 to still load.
+ // This should only affect lindens and NDA'd testers who have saved wearables in 2.0
+ // the extra check for version == 24 can be removed before release, once internal testers
+ // have loaded these wearables again. See hack pt 2 at bottom of function to ensure that
+ // these wearables get re-saved with version definition 22.
+ if( mDefinitionVersion > LLWearable::sCurrentDefinitionVersion && mDefinitionVersion != 24 )
{
llwarns << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << llendl;
return FALSE;
@@ -414,6 +420,18 @@ BOOL LLWearable::importFile( LLFILE* file )
// copy all saved param values to working params
revertValues();
+ // 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( mDefinitionVersion == 24 )
+ {
+ mDefinitionVersion = 22;
+ U32 index = gAgentWearables.getWearableIndex(this);
+ gAgentWearables.saveWearable(mType,index,TRUE);
+ }
+
return TRUE;
}