diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-03-29 01:30:16 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-04-01 19:30:51 +0300 |
commit | 18ef2e3b2ba5a6f0ac397fe6f0652c5b55bdaea8 (patch) | |
tree | 41849544b4751e3b92be64397553214b0d28c90a /indra/newview/llagentbenefits.cpp | |
parent | 43e605b8339105151fa7e97b27359d87479a3461 (diff) |
viewer#1081 Account for 2K texture upload price in material and texture upload
Diffstat (limited to 'indra/newview/llagentbenefits.cpp')
-rw-r--r-- | indra/newview/llagentbenefits.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index 2d219735a0..7362082029 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -34,7 +34,8 @@ LLAgentBenefits::LLAgentBenefits(): m_group_membership_limit(-1), m_picks_limit(-1), m_sound_upload_cost(-1), - m_texture_upload_cost(-1) + m_texture_upload_cost(-1), + m_2k_texture_upload_cost(-1) { } @@ -94,6 +95,7 @@ bool LLAgentBenefits::init(const LLSD& benefits_sd) { return false; } + get_required_S32(benefits_sd, "large_texture_upload_cost", m_2k_texture_upload_cost); // FIXME PREMIUM - either use this field or get rid of it m_initalized = true; @@ -140,12 +142,17 @@ S32 LLAgentBenefits::getTextureUploadCost() const return m_texture_upload_cost; } +S32 LLAgentBenefits::get2KTextureUploadCost() const +{ + return m_2k_texture_upload_cost; +} + bool LLAgentBenefits::findUploadCost(LLAssetType::EType& asset_type, S32& cost) const { bool succ = false; if (asset_type == LLAssetType::AT_TEXTURE) { - cost = getTextureUploadCost(); + cost = getTextureUploadCost(); succ = true; } else if (asset_type == LLAssetType::AT_SOUND) |