blob: 92e2ed32eff498804a77b801966210b77a3af576 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#include "llviewerprecompiledheaders.h"
#include "hippoLimits.h"
#include "hippoGridManager.h"
#include "llviewercontrol.h"
#include <llerror.h>
HippoLimits *gHippoLimits = 0;
HippoLimits::HippoLimits()
:
mMaxAgentGroups(100),
mMaxHeight(10000.0f),
mMinHoleSize(0.05f),
mMaxHollow(0.95f),
mMinPrimScale(0.001f),
mMaxPrimScale(256.0f),
mMaxLinkedPrims(-1)
{
setLimits();
}
void HippoLimits::setLimits()
{
if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE)
{
setSecondLifeLimits();
}
else
{
setOpenSimLimits();
}
}
void HippoLimits::setOpenSimLimits()
{
mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups();
if (mMaxAgentGroups < 0) mMaxAgentGroups = 50;
mMaxPrimScale = 256.0f;
mMinPrimScale = 0.001f;
mMaxHeight = 10000.0f;
mMaxLinkedPrims = -1;
if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) {
llinfos << "Using rendering compatible OpenSim limits" << llendl;
mMinHoleSize = 0.05f;
mMaxHollow = 0.95f;
}
else
{
llinfos << "Using Hippo OpenSim limits" << llendl;
mMinHoleSize = 0.01f;
mMaxHollow = 0.99f;
}
}
void HippoLimits::setSecondLifeLimits()
{
llinfos << "Using Second Life limits" << llendl;
mMaxAgentGroups = 25;
mMaxPrimScale = 10.0f;
mMinPrimScale = 0.01f;
mMaxHeight = 4096.0f;
mMinHoleSize = 0.05f;
mMaxHollow = 0.95f;
mMaxLinkedPrims = 255;
}
F32 HippoLimits::getMaxPrimScale() const
{
if (gSavedSettings.getBOOL("DisableMaxBuildConstraints"))
{
return FLT_MAX;
}
else
{
return mMaxPrimScale;
}
}
|