diff --git a/src/ObjCommon/Game/IW5/Weapon/JsonWeaponAttachment.h b/src/ObjCommon/Game/IW5/Weapon/JsonWeaponAttachment.h index 0c13e9a6..edb017e1 100644 --- a/src/ObjCommon/Game/IW5/Weapon/JsonWeaponAttachment.h +++ b/src/ObjCommon/Game/IW5/Weapon/JsonWeaponAttachment.h @@ -510,6 +510,10 @@ namespace IW5 {WEAPCLASS_ITEM, "item" }, }); + constexpr auto ATTACHMENT_WORLD_MODEL_COUNT = 16u; + constexpr auto ATTACHMENT_VIEW_MODEL_COUNT = 16u; + constexpr auto ATTACHMENT_RETICLE_VIEW_MODEL_COUNT = 8u; + class JsonWeaponAttachment { public: diff --git a/src/ObjWriting/Game/IW5/Weapon/JsonWeaponAttachmentWriter.cpp b/src/ObjWriting/Game/IW5/Weapon/JsonWeaponAttachmentWriter.cpp index 86f0df79..2c6fadcf 100644 --- a/src/ObjWriting/Game/IW5/Weapon/JsonWeaponAttachmentWriter.cpp +++ b/src/ObjWriting/Game/IW5/Weapon/JsonWeaponAttachmentWriter.cpp @@ -68,9 +68,9 @@ namespace jAttachment.weaponType = attachment.weaponType; jAttachment.weapClass = attachment.weapClass; - CONVERT_XMODEL_ARRAY(worldModels, 16u) - CONVERT_XMODEL_ARRAY(viewModels, 16u) - CONVERT_XMODEL_ARRAY(reticleViewModels, 8u) + CONVERT_XMODEL_ARRAY(worldModels, ATTACHMENT_WORLD_MODEL_COUNT) + CONVERT_XMODEL_ARRAY(viewModels, ATTACHMENT_VIEW_MODEL_COUNT) + CONVERT_XMODEL_ARRAY(reticleViewModels, ATTACHMENT_RETICLE_VIEW_MODEL_COUNT) CONVERT_ATTRIBUTE(JsonAttAmmoGeneral, ammoGeneral) CONVERT_ATTRIBUTE(JsonAttSight, sight)