diff options
Diffstat (limited to 'linden/indra/newview/hippoLimits.cpp')
-rw-r--r-- | linden/indra/newview/hippoLimits.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/linden/indra/newview/hippoLimits.cpp b/linden/indra/newview/hippoLimits.cpp new file mode 100644 index 0000000..dae81a6 --- /dev/null +++ b/linden/indra/newview/hippoLimits.cpp | |||
@@ -0,0 +1,56 @@ | |||
1 | |||
2 | |||
3 | #include "llviewerprecompiledheaders.h" | ||
4 | |||
5 | #include "hippoLimits.h" | ||
6 | |||
7 | #include "hippoGridManager.h" | ||
8 | |||
9 | #include <llerror.h> | ||
10 | |||
11 | |||
12 | HippoLimits *gHippoLimits = 0; | ||
13 | |||
14 | |||
15 | HippoLimits::HippoLimits() | ||
16 | { | ||
17 | setLimits(); | ||
18 | } | ||
19 | |||
20 | |||
21 | void HippoLimits::setLimits() | ||
22 | { | ||
23 | if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) { | ||
24 | setSecondLifeLimits(); | ||
25 | } else { | ||
26 | setOpenSimLimits(); | ||
27 | } | ||
28 | } | ||
29 | |||
30 | |||
31 | void HippoLimits::setOpenSimLimits() | ||
32 | { | ||
33 | mMaxAgentGroups = 100; | ||
34 | mMaxPrimScale = 256.0f; | ||
35 | mMaxHeight = 10000.0f; | ||
36 | if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { | ||
37 | llinfos << "Using rendering compatible OpenSim limits." << llendl; | ||
38 | mMinHoleSize = 0.05f; | ||
39 | mMaxHollow = 0.95f; | ||
40 | } else { | ||
41 | llinfos << "Using Hippo OpenSim limits." << llendl; | ||
42 | mMinHoleSize = 0.01f; | ||
43 | mMaxHollow = 0.99f; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | void HippoLimits::setSecondLifeLimits() | ||
48 | { | ||
49 | llinfos << "Using Second Life limits." << llendl; | ||
50 | mMaxAgentGroups = 25; | ||
51 | mMaxPrimScale = 10.0f; | ||
52 | mMaxHeight = 4096.0f; | ||
53 | mMinHoleSize = 0.05f; | ||
54 | mMaxHollow = 0.95f; | ||
55 | } | ||
56 | |||