2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-07-02 22:08:11 +00:00

fix: weapon anims indirect assets (#846)

* fix: t6 attachment unique not considering xanims indirect references

* fix: consider t5 weapon anims indirect references to anim assets
This commit is contained in:
Jan
2026-06-20 15:15:32 +02:00
committed by GitHub
parent c84e3076f1
commit b5acacf680
4 changed files with 171 additions and 154 deletions
@@ -101,6 +101,9 @@ namespace
case WFT_NOTETRACKSOUNDMAP:
return ConvertNotetrackSoundMap(field, value);
case WFT_ANIM_NAME:
return ConvertAnimName(field, value);
default:
assert(false);
return false;
@@ -212,6 +215,19 @@ namespace
return true;
}
bool ConvertAnimName(const cspField_t& field, const std::string& value)
{
if (ConvertString(value, field.iOffset))
{
if (!value.empty())
m_registration.AddIndirectAssetReference(m_context.LoadIndirectAssetReference<AssetXAnim>(value));
return true;
}
return false;
}
public:
InfoStringToWeaponConverter(const InfoString& infoString,
WeaponFullDef& weaponFullDef,