Permalink
Browse files

Increase DEFAULT_MAX_AGENT_GROUPS to 60

Also cleans up limits code stuffs and syncs indra_constants a bit.
  • Loading branch information...
Lirusaito committed May 27, 2016
1 parent e5886e0 commit 6fcbe9d0ded0b2588c36c264e9a10c0e695264c5
Showing with 38 additions and 34 deletions.
  1. +14 −20 indra/llcommon/indra_constants.h
  2. +23 −14 indra/newview/hippolimits.cpp
  3. +1 −0 indra/newview/hippolimits.h
@@ -153,6 +153,19 @@ const char AURORA_WIND_LAYER_CODE = '9';
const char AURORA_CLOUD_LAYER_CODE = ':';
// </FS:CR> Aurora Sim
enum ETerrainBrushType
{
// the valid brush numbers cannot be reordered, because they
// are used in the binary LSL format as arguments to llModifyLand()
E_LANDBRUSH_LEVEL = 0,
E_LANDBRUSH_RAISE = 1,
E_LANDBRUSH_LOWER = 2,
E_LANDBRUSH_SMOOTH = 3,
E_LANDBRUSH_NOISE = 4,
E_LANDBRUSH_REVERT = 5,
E_LANDBRUSH_INVALID = 6
};
// keys
// Bit masks for various keyboard modifier keys.
const MASK MASK_NONE = 0x0000;
@@ -303,14 +316,6 @@ const U32 START_LOCATION_ID_COUNT = 6;
// group constants
const U32 GROUP_MIN_SIZE = 2;
// gMaxAgentGroups is now sent by login.cgi, which
// looks it up from globals.xml.
//
// For now we need an old default value however,
// so the viewer can be deployed ahead of login.cgi.
//
const S32 DEFAULT_MAX_AGENT_GROUPS = 25;
// radius within which a chat message is fully audible
const F32 CHAT_WHISPER_RADIUS = 10.f;
const F32 CHAT_NORMAL_RADIUS = 20.f;
@@ -341,18 +346,7 @@ const S32 SANDBOX_CLEAN_FREQ = 12;
const F32 WIND_SCALE_HACK = 2.0f; // hack to make wind speeds more realistic
enum ETerrainBrushType
{
// the valid brush numbers cannot be reordered, because they
// are used in the binary LSL format as arguments to llModifyLand()
E_LANDBRUSH_LEVEL = 0,
E_LANDBRUSH_RAISE = 1,
E_LANDBRUSH_LOWER = 2,
E_LANDBRUSH_SMOOTH = 3,
E_LANDBRUSH_NOISE = 4,
E_LANDBRUSH_REVERT = 5,
E_LANDBRUSH_INVALID = 6
};
// media commands
const U32 PARCEL_MEDIA_COMMAND_STOP = 0;
@@ -28,11 +28,29 @@ void HippoLimits::setLimits()
}
}
namespace
{
// gMaxAgentGroups is now sent by login.cgi, which
// looks it up from globals.xml.
//
// For now we need an old default value however,
// so the viewer can be deployed ahead of login.cgi.
//
constexpr S32 DEFAULT_MAX_AGENT_GROUPS = 60;
}
void HippoLimits::setMaxAgentGroups()
{
//KC: new server defined max groups
if (auto grid = gHippoGridManager->getConnectedGrid())
mMaxAgentGroups = grid->getMaxAgentGroups();
if (mMaxAgentGroups <= 0)
mMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS;
}
void HippoLimits::setOpenSimLimits()
{
mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups();
if (mMaxAgentGroups < 0) mMaxAgentGroups = 50;
setMaxAgentGroups();
mMaxPrimScale = 8192.0f;
mMaxHeight = 10000.0f;
if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) {
@@ -50,8 +68,7 @@ void HippoLimits::setOpenSimLimits()
void HippoLimits::setAuroraLimits()
{
mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups();
if (mMaxAgentGroups < 0) mMaxAgentGroups = 50;
setMaxAgentGroups();
mMaxPrimScale = 8192.0f;
mMinPrimScale = 0.001f;
mMaxHeight = 10000.0f;
@@ -62,16 +79,8 @@ void HippoLimits::setAuroraLimits()
void HippoLimits::setSecondLifeLimits()
{
LL_INFOS() << "Using Second Life limits." << LL_ENDL;
if (gHippoGridManager->getConnectedGrid())
//KC: new server defined max groups
mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups();
if (mMaxAgentGroups <= 0)
{
mMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS;
}
setMaxAgentGroups();
mMinPrimScale = 0.01f;
mMaxHeight = 4096.0f;
mMinHoleSize = 0.05f;
@@ -25,6 +25,7 @@ class HippoLimits
float mMaxPrimScale;
float mMinPrimScale;
void setMaxAgentGroups();
void setOpenSimLimits();
void setAuroraLimits();
void setSecondLifeLimits();

0 comments on commit 6fcbe9d

Please sign in to comment.