diff options
Diffstat (limited to 'linden/indra/newview/hippolimits.cpp')
-rw-r--r-- | linden/indra/newview/hippolimits.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/linden/indra/newview/hippolimits.cpp b/linden/indra/newview/hippolimits.cpp index f6f36fa..d6d6c36 100644 --- a/linden/indra/newview/hippolimits.cpp +++ b/linden/indra/newview/hippolimits.cpp | |||
@@ -8,7 +8,8 @@ | |||
8 | #include "llviewercontrol.h" | 8 | #include "llviewercontrol.h" |
9 | 9 | ||
10 | #include <llerror.h> | 10 | #include <llerror.h> |
11 | 11 | #include "llagent.h" | |
12 | #include "llviewerregion.h" | ||
12 | 13 | ||
13 | HippoLimits *gHippoLimits = 0; | 14 | HippoLimits *gHippoLimits = 0; |
14 | 15 | ||
@@ -23,7 +24,8 @@ HippoLimits::HippoLimits() | |||
23 | mMaxPrimScale(256.0f), | 24 | mMaxPrimScale(256.0f), |
24 | mMaxLinkedPrims(-1), | 25 | mMaxLinkedPrims(-1), |
25 | mMaxDragDistance(0.f), | 26 | mMaxDragDistance(0.f), |
26 | mVoiceConnector("SLVoice") | 27 | mVoiceConnector("SLVoice"), |
28 | mMaxSelectDistance(64.0f) | ||
27 | { | 29 | { |
28 | setLimits(); | 30 | setLimits(); |
29 | } | 31 | } |
@@ -70,6 +72,7 @@ void HippoLimits::setOpenSimLimits() | |||
70 | mEnforceMaxBuild = FALSE; | 72 | mEnforceMaxBuild = FALSE; |
71 | mRenderWater = TRUE; | 73 | mRenderWater = TRUE; |
72 | mVoiceConnector = "SLVoice"; | 74 | mVoiceConnector = "SLVoice"; |
75 | mMaxSelectDistance = 192.0f; | ||
73 | 76 | ||
74 | if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { | 77 | if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { |
75 | llinfos << "Using rendering compatible OpenSim limits" << llendl; | 78 | llinfos << "Using rendering compatible OpenSim limits" << llendl; |
@@ -90,7 +93,7 @@ void HippoLimits::setSecondLifeLimits() | |||
90 | S32 max_groups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups(); | 93 | S32 max_groups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups(); |
91 | mMaxAgentGroups = llmax(max_groups, 25); | 94 | mMaxAgentGroups = llmax(max_groups, 25); |
92 | 95 | ||
93 | mMaxPrimScale = 10.0f; | 96 | setSecondLifeMaxPrimScale(); |
94 | mMinPrimScale = 0.01f; | 97 | mMinPrimScale = 0.01f; |
95 | mMaxHeight = 4096.0f; | 98 | mMaxHeight = 4096.0f; |
96 | mMinHoleSize = 0.05f; | 99 | mMinHoleSize = 0.05f; |
@@ -113,6 +116,22 @@ void HippoLimits::setSecondLifeLimits() | |||
113 | mEnforceMaxBuild = FALSE; | 116 | mEnforceMaxBuild = FALSE; |
114 | mRenderWater = TRUE; | 117 | mRenderWater = TRUE; |
115 | mVoiceConnector = "SLVoice"; | 118 | mVoiceConnector = "SLVoice"; |
119 | mMaxSelectDistance = 64.0f; | ||
120 | } | ||
121 | |||
122 | void HippoLimits::setSecondLifeMaxPrimScale() | ||
123 | { | ||
124 | // SecondLife Mesh sims that allow 64m prims are ones that have BOTH these caps | ||
125 | if (gAgent.getRegion() | ||
126 | && !gAgent.getRegion()->getCapability("GetMesh").empty() | ||
127 | && !gAgent.getRegion()->getCapability("ObjectAdd").empty()) | ||
128 | { | ||
129 | mMaxPrimScale = 64.f; | ||
130 | } | ||
131 | else | ||
132 | { | ||
133 | mMaxPrimScale = 10.f; | ||
134 | } | ||
116 | } | 135 | } |
117 | 136 | ||
118 | F32 HippoLimits::getMaxPrimScale() const | 137 | F32 HippoLimits::getMaxPrimScale() const |