Merge pull request #820 from Azaezel/alpha40/shapeErrcodes

fix shape errorcodes
This commit is contained in:
Brian Roberts 2022-06-16 22:37:51 -05:00 committed by GitHub
commit c8ef1c5c85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -117,7 +117,7 @@ ConsoleSetType(TypeShapeAssetId)
//-----------------------------------------------------------------------------
const String ShapeAsset::mErrCodeStrings[] =
const String ShapeAsset::mShapeErrCodeStrings[] =
{
"TooManyVerts",
"TooManyBones",

View file

@ -104,7 +104,7 @@ public:
static StringTableEntry smNoShapeAssetFallback;
static const String mErrCodeStrings[ShapeAssetErrCode::Extended - Parent::Extended + 1];
static const String mShapeErrCodeStrings[ShapeAssetErrCode::Extended - Parent::Extended + 1];
static U32 getAssetErrCode(AssetPtr<ShapeAsset> shapeAsset) { if (shapeAsset) return shapeAsset->mLoadedState; else return 0; }
@ -112,7 +112,7 @@ public:
{
if (errCode < Parent::Extended) return Parent::getAssetErrstrn(errCode);
if (errCode > ShapeAssetErrCode::Extended) return "undefined error";
return mErrCodeStrings[errCode];
return mShapeErrCodeStrings[errCode - Parent::Extended];
};
ShapeAsset();