From f88881884fe3fd72eb0cada7cb23095ae53f8658 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 23 Feb 2017 12:17:59 +0200 Subject: MAINT-7138 Fix Agent Limit field and spinner cap in Region/Estate floater --- indra/newview/llfloaterregioninfo.cpp | 4 ++++ indra/newview/llregioninfomodel.cpp | 4 ++++ indra/newview/llregioninfomodel.h | 2 ++ 3 files changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 843dbbf25e..75d7d787b1 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -357,6 +357,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) std::string sim_type = LLTrans::getString("land_type_unknown"); U64 region_flags; U8 agent_limit; + S32 hard_agent_limit; F32 object_bonus_factor; U8 sim_access; F32 water_height; @@ -366,6 +367,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) F32 sun_hour; msg->getString("RegionInfo", "SimName", sim_name); msg->getU8("RegionInfo", "MaxAgents", agent_limit); + msg->getS32("RegionInfo2", "HardMaxAgents", hard_agent_limit); msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor); msg->getU8("RegionInfo", "SimAccess", sim_access); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height); @@ -412,6 +414,8 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChild("object_bonus_spin")->setValue(LLSD(object_bonus_factor) ); panel->getChild("access_combo")->setValue(LLSD(sim_access) ); + panel->getChild("agent_limit_spin")->setMaxValue(hard_agent_limit); + LLPanelRegionGeneralInfo* panel_general = LLFloaterRegionInfo::getPanelGeneral(); if (panel) { diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp index 25c576468b..25d7be831f 100644 --- a/indra/newview/llregioninfomodel.cpp +++ b/indra/newview/llregioninfomodel.cpp @@ -40,6 +40,7 @@ void LLRegionInfoModel::reset() { mSimAccess = 0; mAgentLimit = 0; + mHardAgentLimit = 100; mRegionFlags = 0; mEstateID = 0; @@ -143,6 +144,7 @@ void LLRegionInfoModel::update(LLMessageSystem* msg) msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, mParentEstateID); msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_SimAccess, mSimAccess); msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_MaxAgents, mAgentLimit); + msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_ObjectBonusFactor, mObjectBonusFactor); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_BillableFactor, mBillableFactor); msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, mWaterHeight); @@ -158,6 +160,8 @@ void LLRegionInfoModel::update(LLMessageSystem* msg) msg->getF32(_PREHASH_RegionInfo, _PREHASH_SunHour, mSunHour); LL_DEBUGS("Windlight Sync") << "Got region sun hour: " << mSunHour << LL_ENDL; + msg->getS32Fast(_PREHASH_RegionInfo2, _PREHASH_HardMaxAgents, mHardAgentLimit); + if (msg->has(_PREHASH_RegionInfo3)) { msg->getU64Fast(_PREHASH_RegionInfo3, _PREHASH_RegionFlagsExtended, mRegionFlags); diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h index ea9640efda..baeff82fef 100644 --- a/indra/newview/llregioninfomodel.h +++ b/indra/newview/llregioninfomodel.h @@ -53,6 +53,8 @@ public: U8 mSimAccess; U8 mAgentLimit; + S32 mHardAgentLimit; + U64 mRegionFlags; U32 mEstateID; U32 mParentEstateID; -- cgit v1.2.3