aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloatergroups.cpp8
-rw-r--r--linden/indra/newview/llmaniptranslate.cpp7
-rw-r--r--linden/indra/newview/llpanelobject.cpp12
-rw-r--r--linden/indra/newview/lltoolgrab.cpp7
-rw-r--r--linden/indra/newview/llviewermessage.cpp2
-rw-r--r--linden/indra/newview/llworld.cpp5
-rw-r--r--linden/indra/newview/llworld.h3
7 files changed, 29 insertions, 15 deletions
diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp
index 874249b..e94734d 100644
--- a/linden/indra/newview/llfloatergroups.cpp
+++ b/linden/indra/newview/llfloatergroups.cpp
@@ -58,6 +58,8 @@
58#include "llviewerwindow.h" 58#include "llviewerwindow.h"
59#include "llimview.h" 59#include "llimview.h"
60 60
61#include "hippoLimits.h"
62
61// static 63// static
62std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances; 64std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
63 65
@@ -200,7 +202,7 @@ void LLPanelGroups::reset()
200 group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); 202 group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
201 } 203 }
202 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); 204 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
203 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); 205 childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
204 206
205 const std::string none_text = getString("none"); 207 const std::string none_text = getString("none");
206 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text); 208 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
@@ -212,7 +214,7 @@ BOOL LLPanelGroups::postBuild()
212 childSetCommitCallback("group list", onGroupList, this); 214 childSetCommitCallback("group list", onGroupList, this);
213 215
214 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); 216 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
215 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); 217 childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
216 218
217 const std::string none_text = getString("none"); 219 const std::string none_text = getString("none");
218 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text); 220 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
@@ -270,7 +272,7 @@ void LLPanelGroups::enableButtons()
270 childDisable("IM"); 272 childDisable("IM");
271 childDisable("Leave"); 273 childDisable("Leave");
272 } 274 }
273 if(gAgent.mGroups.count() < MAX_AGENT_GROUPS) 275 if(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups())
274 { 276 {
275 childEnable("Create"); 277 childEnable("Create");
276 } 278 }
diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp
index 8d23e40..1362f0a 100644
--- a/linden/indra/newview/llmaniptranslate.cpp
+++ b/linden/indra/newview/llmaniptranslate.cpp
@@ -66,6 +66,8 @@
66#include "llui.h" 66#include "llui.h"
67#include "pipeline.h" 67#include "pipeline.h"
68 68
69#include "hippoLimits.h"
70
69const S32 NUM_AXES = 3; 71const S32 NUM_AXES = 3;
70const S32 MOUSE_DRAG_SLOP = 2; // pixels 72const S32 MOUSE_DRAG_SLOP = 2; // pixels
71const F32 HANDLE_HIDE_ANGLE = 0.15f; // radians 73const F32 HANDLE_HIDE_ANGLE = 0.15f; // radians
@@ -731,9 +733,10 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
731 } 733 }
732 734
733 // For safety, cap heights where objects can be dragged 735 // For safety, cap heights where objects can be dragged
734 if (new_position_global.mdV[VZ] > MAX_OBJECT_Z) 736 float maxHeight = gHippoLimits->getMaxHeight();
737 if (new_position_global.mdV[VZ] > maxHeight)
735 { 738 {
736 new_position_global.mdV[VZ] = MAX_OBJECT_Z; 739 new_position_global.mdV[VZ] = maxHeight;
737 } 740 }
738 741
739 // Grass is always drawn on the ground, so clamp its position to the ground 742 // Grass is always drawn on the ground, so clamp its position to the ground
diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp
index bcbd076..460611a 100644
--- a/linden/indra/newview/llpanelobject.cpp
+++ b/linden/indra/newview/llpanelobject.cpp
@@ -426,6 +426,8 @@ void LLPanelObject::getState( )
426 mCtrlPosY->setEnabled(enable_move); 426 mCtrlPosY->setEnabled(enable_move);
427 mCtrlPosZ->setEnabled(enable_move); 427 mCtrlPosZ->setEnabled(enable_move);
428 428
429 mCtrlPosZ->setMaxValue(gHippoLimits->getMaxHeight());
430
429 if (enable_scale) 431 if (enable_scale)
430 { 432 {
431 vec = objectp->getScale(); 433 vec = objectp->getScale();
@@ -993,9 +995,9 @@ void LLPanelObject::getState( )
993 mSpinScaleY->set( scale_y ); 995 mSpinScaleY->set( scale_y );
994 calcp->setVar(LLCalc::X_HOLE, scale_x); 996 calcp->setVar(LLCalc::X_HOLE, scale_x);
995 calcp->setVar(LLCalc::Y_HOLE, scale_y); 997 calcp->setVar(LLCalc::Y_HOLE, scale_y);
996 mSpinScaleX->setMinValue(OBJECT_MIN_HOLE_SIZE); 998 mSpinScaleX->setMinValue(gHippoLimits->getMinHoleSize());
997 mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X); 999 mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X);
998 mSpinScaleY->setMinValue(OBJECT_MIN_HOLE_SIZE); 1000 mSpinScaleY->setMinValue(gHippoLimits->getMinHoleSize());
999 mSpinScaleY->setMaxValue(OBJECT_MAX_HOLE_SIZE_Y); 1001 mSpinScaleY->setMaxValue(OBJECT_MAX_HOLE_SIZE_Y);
1000 break; 1002 break;
1001 default: 1003 default:
@@ -1031,7 +1033,7 @@ void LLPanelObject::getState( )
1031 else 1033 else
1032 { 1034 {
1033 mSpinHollow->setMinValue(0.f); 1035 mSpinHollow->setMinValue(0.f);
1034 mSpinHollow->setMaxValue(95.f); 1036 mSpinHollow->setMaxValue(gHippoLimits->getMaxHollow() * 100.0f);
1035 } 1037 }
1036 1038
1037 // Update field enablement 1039 // Update field enablement
@@ -1583,11 +1585,11 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
1583 { 1585 {
1584 scale_x = llclamp( 1586 scale_x = llclamp(
1585 scale_x, 1587 scale_x,
1586 OBJECT_MIN_HOLE_SIZE, 1588 gHippoLimits->getMinHoleSize(),
1587 OBJECT_MAX_HOLE_SIZE_X); 1589 OBJECT_MAX_HOLE_SIZE_X);
1588 scale_y = llclamp( 1590 scale_y = llclamp(
1589 scale_y, 1591 scale_y,
1590 OBJECT_MIN_HOLE_SIZE, 1592 gHippoLimits->getMinHoleSize(),
1591 OBJECT_MAX_HOLE_SIZE_Y); 1593 OBJECT_MAX_HOLE_SIZE_Y);
1592 1594
1593 // Limit radius offset, based on taper and hole size y. 1595 // Limit radius offset, based on taper and hole size y.
diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp
index 3437193..260d533 100644
--- a/linden/indra/newview/lltoolgrab.cpp
+++ b/linden/indra/newview/lltoolgrab.cpp
@@ -64,6 +64,8 @@
64#include "llvoavatar.h" 64#include "llvoavatar.h"
65#include "llworld.h" 65#include "llworld.h"
66 66
67#include "hippoLimits.h"
68
67const S32 SLOP_DIST_SQ = 4; 69const S32 SLOP_DIST_SQ = 4;
68 70
69// Override modifier key behavior with these buttons 71// Override modifier key behavior with these buttons
@@ -635,9 +637,10 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
635 } 637 }
636 638
637 // For safety, cap heights where objects can be dragged 639 // For safety, cap heights where objects can be dragged
638 if (grab_point_global.mdV[VZ] > MAX_OBJECT_Z) 640 float maxHeight = gHippoLimits->getMaxHeight();
641 if (grab_point_global.mdV[VZ] > maxHeight)
639 { 642 {
640 grab_point_global.mdV[VZ] = MAX_OBJECT_Z; 643 grab_point_global.mdV[VZ] = maxHeight;
641 } 644 }
642 645
643 grab_point_global = LLWorld::getInstance()->clipToVisibleRegions(mDragStartPointGlobal, grab_point_global); 646 grab_point_global = LLWorld::getInstance()->clipToVisibleRegions(mDragStartPointGlobal, grab_point_global);
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 67dc082..8739f5c 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -655,7 +655,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
655 if(option == 0 && !group_id.isNull()) 655 if(option == 0 && !group_id.isNull())
656 { 656 {
657 // check for promotion or demotion. 657 // check for promotion or demotion.
658 S32 max_groups = MAX_AGENT_GROUPS; 658 S32 max_groups = gHippoLimits->getMaxAgentGroups();
659 if(gAgent.isInGroup(group_id)) ++max_groups; 659 if(gAgent.isInGroup(group_id)) ++max_groups;
660 660
661 if(gAgent.mGroups.count() < max_groups) 661 if(gAgent.mGroups.count() < max_groups)
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index 02c7be3..90ab49b 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -60,6 +60,7 @@
60#include "pipeline.h" 60#include "pipeline.h"
61#include "llappviewer.h" // for do_disconnect() 61#include "llappviewer.h" // for do_disconnect()
62 62
63#include "hippoLimits.h"
63// 64//
64// Globals 65// Globals
65// 66//
@@ -128,6 +129,10 @@ void LLWorld::destroyClass()
128 LLViewerPartSim::getInstance()->destroyClass(); 129 LLViewerPartSim::getInstance()->destroyClass();
129} 130}
130 131
132F32 LLWorld::getRegionMaxHeight() const
133{
134 return gHippoLimits->getMaxHeight();
135}
131 136
132LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host) 137LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
133{ 138{
diff --git a/linden/indra/newview/llworld.h b/linden/indra/newview/llworld.h
index ce83cbd..46aefd9 100644
--- a/linden/indra/newview/llworld.h
+++ b/linden/indra/newview/llworld.h
@@ -119,8 +119,7 @@ public:
119 // region X and Y size in meters 119 // region X and Y size in meters
120 F32 getRegionWidthInMeters() const { return mWidthInMeters; } 120 F32 getRegionWidthInMeters() const { return mWidthInMeters; }
121 F32 getRegionMinHeight() const { return -mWidthInMeters; } 121 F32 getRegionMinHeight() const { return -mWidthInMeters; }
122 F32 getRegionMaxHeight() const { return MAX_OBJECT_Z; } 122 F32 getRegionMaxHeight() const;
123
124 void updateRegions(F32 max_update_time); 123 void updateRegions(F32 max_update_time);
125 void updateVisibilities(); 124 void updateVisibilities();
126 void updateParticles(); 125 void updateParticles();