aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/hippoLimits.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/hippoLimits.cpp39
1 files changed, 32 insertions, 7 deletions
diff --git a/linden/indra/newview/hippoLimits.cpp b/linden/indra/newview/hippoLimits.cpp
index 35afcf9..0777ca3 100644
--- a/linden/indra/newview/hippoLimits.cpp
+++ b/linden/indra/newview/hippoLimits.cpp
@@ -5,6 +5,7 @@
5#include "hippoLimits.h" 5#include "hippoLimits.h"
6 6
7#include "hippoGridManager.h" 7#include "hippoGridManager.h"
8#include "llviewercontrol.h"
8 9
9#include <llerror.h> 10#include <llerror.h>
10 11
@@ -12,7 +13,15 @@
12HippoLimits *gHippoLimits = 0; 13HippoLimits *gHippoLimits = 0;
13 14
14 15
15HippoLimits::HippoLimits() 16HippoLimits::HippoLimits()
17:
18 mMaxAgentGroups(100),
19 mMaxHeight(10000.0f),
20 mMinHoleSize(0.05f),
21 mMaxHollow(0.95f),
22 mMinPrimScale(0.001f),
23 mMaxPrimScale(256.0f),
24 mMaxLinkedPrims(-1)
16{ 25{
17 setLimits(); 26 setLimits();
18} 27}
@@ -20,9 +29,12 @@ HippoLimits::HippoLimits()
20 29
21void HippoLimits::setLimits() 30void HippoLimits::setLimits()
22{ 31{
23 if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) { 32 if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE)
33 {
24 setSecondLifeLimits(); 34 setSecondLifeLimits();
25 } else { 35 }
36 else
37 {
26 setOpenSimLimits(); 38 setOpenSimLimits();
27 } 39 }
28} 40}
@@ -37,11 +49,13 @@ void HippoLimits::setOpenSimLimits()
37 mMaxLinkedPrims = -1; 49 mMaxLinkedPrims = -1;
38 50
39 if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { 51 if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) {
40 llinfos << "Using rendering compatible OpenSim limits." << llendl; 52 llinfos << "Using rendering compatible OpenSim limits" << llendl;
41 mMinHoleSize = 0.05f; 53 mMinHoleSize = 0.05f;
42 mMaxHollow = 0.95f; 54 mMaxHollow = 0.95f;
43 } else { 55 }
44 llinfos << "Using Hippo OpenSim limits." << llendl; 56 else
57 {
58 llinfos << "Using Hippo OpenSim limits" << llendl;
45 mMinHoleSize = 0.01f; 59 mMinHoleSize = 0.01f;
46 mMaxHollow = 0.99f; 60 mMaxHollow = 0.99f;
47 } 61 }
@@ -49,7 +63,7 @@ void HippoLimits::setOpenSimLimits()
49 63
50void HippoLimits::setSecondLifeLimits() 64void HippoLimits::setSecondLifeLimits()
51{ 65{
52 llinfos << "Using Second Life limits." << llendl; 66 llinfos << "Using Second Life limits" << llendl;
53 mMaxAgentGroups = 25; 67 mMaxAgentGroups = 25;
54 mMaxPrimScale = 10.0f; 68 mMaxPrimScale = 10.0f;
55 mMinPrimScale = 0.01f; 69 mMinPrimScale = 0.01f;
@@ -59,3 +73,14 @@ void HippoLimits::setSecondLifeLimits()
59 mMaxLinkedPrims = 255; 73 mMaxLinkedPrims = 255;
60} 74}
61 75
76F32 HippoLimits::getMaxPrimScale() const
77{
78 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints"))
79 {
80 return FLT_MAX;
81 }
82 else
83 {
84 return mMaxPrimScale;
85 }
86}