diff options
author | Armin Weatherwax | 2010-04-08 20:42:06 +0200 |
---|---|---|
committer | Armin Weatherwax | 2010-04-12 17:11:07 +0200 |
commit | 4a683110f77060889a755fd77c814e79eeb80298 (patch) | |
tree | 3a00e38ac302480aaa6146c584684ab3b1d0df2a /linden/indra | |
parent | fix: Bug #239 by reverting commit 187e36f6: invisible Textures on HG (diff) | |
download | meta-impy-4a683110f77060889a755fd77c814e79eeb80298.zip meta-impy-4a683110f77060889a755fd77c814e79eeb80298.tar.gz meta-impy-4a683110f77060889a755fd77c814e79eeb80298.tar.bz2 meta-impy-4a683110f77060889a755fd77c814e79eeb80298.tar.xz |
remove link limits: (take 2) depending on grid.
Seems OSim creates several linksets though.
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/llcommon/indra_constants.h | 1 | ||||
-rw-r--r-- | linden/indra/newview/hippoLimits.cpp | 5 | ||||
-rw-r--r-- | linden/indra/newview/hippoLimits.h | 3 | ||||
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 25 | ||||
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 21 |
5 files changed, 35 insertions, 20 deletions
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h index ae7863d..96c0a1f 100644 --- a/linden/indra/llcommon/indra_constants.h +++ b/linden/indra/llcommon/indra_constants.h | |||
@@ -102,7 +102,6 @@ const F32 DEFAULT_AGENT_HEIGHT = 1.9f; | |||
102 | const F32 MAX_AGENT_HEIGHT = 2.65f - 2.0f * COLLISION_TOLERANCE; | 102 | const F32 MAX_AGENT_HEIGHT = 2.65f - 2.0f * COLLISION_TOLERANCE; |
103 | 103 | ||
104 | // For linked sets | 104 | // For linked sets |
105 | const S32 MAX_CHILDREN_PER_TASK = 255; | ||
106 | const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32; | 105 | const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32; |
107 | 106 | ||
108 | const S32 MAX_JOINTS_PER_OBJECT = 1; // limiting to 1 until Havok 2.x | 107 | const S32 MAX_JOINTS_PER_OBJECT = 1; // limiting to 1 until Havok 2.x |
diff --git a/linden/indra/newview/hippoLimits.cpp b/linden/indra/newview/hippoLimits.cpp index dae81a6..96b3bee 100644 --- a/linden/indra/newview/hippoLimits.cpp +++ b/linden/indra/newview/hippoLimits.cpp | |||
@@ -33,13 +33,15 @@ void HippoLimits::setOpenSimLimits() | |||
33 | mMaxAgentGroups = 100; | 33 | mMaxAgentGroups = 100; |
34 | mMaxPrimScale = 256.0f; | 34 | mMaxPrimScale = 256.0f; |
35 | mMaxHeight = 10000.0f; | 35 | mMaxHeight = 10000.0f; |
36 | mMaxLinkedPrims = -1; | ||
37 | |||
36 | if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { | 38 | if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { |
37 | llinfos << "Using rendering compatible OpenSim limits." << llendl; | 39 | llinfos << "Using rendering compatible OpenSim limits." << llendl; |
38 | mMinHoleSize = 0.05f; | 40 | mMinHoleSize = 0.05f; |
39 | mMaxHollow = 0.95f; | 41 | mMaxHollow = 0.95f; |
40 | } else { | 42 | } else { |
41 | llinfos << "Using Hippo OpenSim limits." << llendl; | 43 | llinfos << "Using Hippo OpenSim limits." << llendl; |
42 | mMinHoleSize = 0.01f; | 44 | mMinHoleSize = 0.01f; |
43 | mMaxHollow = 0.99f; | 45 | mMaxHollow = 0.99f; |
44 | } | 46 | } |
45 | } | 47 | } |
@@ -52,5 +54,6 @@ void HippoLimits::setSecondLifeLimits() | |||
52 | mMaxHeight = 4096.0f; | 54 | mMaxHeight = 4096.0f; |
53 | mMinHoleSize = 0.05f; | 55 | mMinHoleSize = 0.05f; |
54 | mMaxHollow = 0.95f; | 56 | mMaxHollow = 0.95f; |
57 | mMaxLinkedPrims = 255; | ||
55 | } | 58 | } |
56 | 59 | ||
diff --git a/linden/indra/newview/hippoLimits.h b/linden/indra/newview/hippoLimits.h index 900480b..7152bcc 100644 --- a/linden/indra/newview/hippoLimits.h +++ b/linden/indra/newview/hippoLimits.h | |||
@@ -12,15 +12,18 @@ public: | |||
12 | float getMinHoleSize() const { return mMinHoleSize; } | 12 | float getMinHoleSize() const { return mMinHoleSize; } |
13 | float getMaxHollow() const { return mMaxHollow; } | 13 | float getMaxHollow() const { return mMaxHollow; } |
14 | float getMaxPrimScale() const { return mMaxPrimScale; } | 14 | float getMaxPrimScale() const { return mMaxPrimScale; } |
15 | S32 getMaxLinkedPrims() const { return mMaxLinkedPrims; } | ||
15 | 16 | ||
16 | void setLimits(); | 17 | void setLimits(); |
17 | 18 | ||
18 | private: | 19 | private: |
19 | int mMaxAgentGroups; | 20 | int mMaxAgentGroups; |
21 | |||
20 | float mMaxHeight; | 22 | float mMaxHeight; |
21 | float mMinHoleSize; | 23 | float mMinHoleSize; |
22 | float mMaxHollow; | 24 | float mMaxHollow; |
23 | float mMaxPrimScale; | 25 | float mMaxPrimScale; |
26 | S32 mMaxLinkedPrims; | ||
24 | 27 | ||
25 | void setOpenSimLimits(); | 28 | void setOpenSimLimits(); |
26 | void setSecondLifeLimits(); | 29 | void setSecondLifeLimits(); |
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 5a7fdff..260872f 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -84,6 +84,8 @@ | |||
84 | #include "llvotree.h" | 84 | #include "llvotree.h" |
85 | #include "lluictrlfactory.h" | 85 | #include "lluictrlfactory.h" |
86 | 86 | ||
87 | #include "hippoLimits.h" | ||
88 | |||
87 | // Globals | 89 | // Globals |
88 | LLFloaterTools *gFloaterTools = NULL; | 90 | LLFloaterTools *gFloaterTools = NULL; |
89 | 91 | ||
@@ -1146,18 +1148,21 @@ void LLFloaterTools::onClickLink(void* data) | |||
1146 | LLNotifications::instance().add("UnableToLinkWhileDownloading"); | 1148 | LLNotifications::instance().add("UnableToLinkWhileDownloading"); |
1147 | return; | 1149 | return; |
1148 | } | 1150 | } |
1149 | 1151 | ||
1150 | S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); | 1152 | S32 max_linked_prims = gHippoLimits->getMaxLinkedPrims(); |
1151 | if (object_count > MAX_CHILDREN_PER_TASK + 1) | 1153 | if (max_linked_prims > -1) |
1152 | { | 1154 | { |
1153 | LLSD args; | 1155 | S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); |
1154 | args["COUNT"] = llformat("%d", object_count); | 1156 | if (object_count > max_linked_prims + 1) |
1155 | int max = MAX_CHILDREN_PER_TASK+1; | 1157 | { |
1156 | args["MAX"] = llformat("%d", max); | 1158 | LLSD args; |
1157 | LLNotifications::instance().add("UnableToLinkObjects", args); | 1159 | args["COUNT"] = llformat("%d", object_count); |
1158 | return; | 1160 | args["MAX"] = llformat("%d", max_linked_prims +1); |
1161 | LLNotifications::instance().add("UnableToLinkObjects", args); | ||
1162 | return; | ||
1163 | } | ||
1159 | } | 1164 | } |
1160 | 1165 | ||
1161 | if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) | 1166 | if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) |
1162 | { | 1167 | { |
1163 | LLNotifications::instance().add("CannotLinkIncompleteSet"); | 1168 | LLNotifications::instance().add("CannotLinkIncompleteSet"); |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 0aec752..2e72a2a 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -224,6 +224,8 @@ | |||
224 | #include "jcfloater_animation_list.h" | 224 | #include "jcfloater_animation_list.h" |
225 | #include "llfloaterassetbrowser.h" | 225 | #include "llfloaterassetbrowser.h" |
226 | 226 | ||
227 | #include "hippoLimits.h" | ||
228 | |||
227 | using namespace LLVOAvatarDefines; | 229 | using namespace LLVOAvatarDefines; |
228 | void init_client_menu(LLMenuGL* menu); | 230 | void init_client_menu(LLMenuGL* menu); |
229 | void init_server_menu(LLMenuGL* menu); | 231 | void init_server_menu(LLMenuGL* menu); |
@@ -4668,15 +4670,18 @@ class LLToolsLink : public view_listener_t | |||
4668 | return true; | 4670 | return true; |
4669 | } | 4671 | } |
4670 | 4672 | ||
4671 | S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); | 4673 | S32 max_linked_prims = gHippoLimits->getMaxLinkedPrims(); |
4672 | if (object_count > MAX_CHILDREN_PER_TASK + 1) | 4674 | if (max_linked_prims > -1) |
4673 | { | 4675 | { |
4674 | LLSD args; | 4676 | S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); |
4675 | args["COUNT"] = llformat("%d", object_count); | 4677 | if (object_count > max_linked_prims + 1) |
4676 | int max = MAX_CHILDREN_PER_TASK+1; | 4678 | { |
4677 | args["MAX"] = llformat("%d", max); | 4679 | LLSD args; |
4678 | LLNotifications::instance().add("UnableToLinkObjects", args); | 4680 | args["COUNT"] = llformat("%d", object_count); |
4679 | return true; | 4681 | args["MAX"] = llformat("%d", max_linked_prims+1); |
4682 | LLNotifications::instance().add("UnableToLinkObjects", args); | ||
4683 | return true; | ||
4684 | } | ||
4680 | } | 4685 | } |
4681 | 4686 | ||
4682 | if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) | 4687 | if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) |