From 4b8db310730a5a8f5b99fcae0fe01e0c15646da6 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 8 Aug 2013 16:00:49 -0400 Subject: [PATCH] Fix Issue 992: Singularity will not allow teleports above 4096, nor building above 4096. Teleport height restrictions have been increased to 8192 -The 4096 limit isn't in much of the teleport code anyhow, and it's certainly not enforced. Building height restrictions are now hooked up to hippolimits, apparently they hadn't been -MAX_OBJECT_Z, and hardcoded 4096s now use gHippoLimits->getMaxHeight() instead -On floater_tools.xml max_val is left out, instead it is set with the rest of the gHippoLimits edit constraints in LLPanelObject::getState --- indra/newview/llfloaterworldmap.cpp | 4 ++-- indra/newview/llmaniptranslate.cpp | 5 +++-- indra/newview/llpanelobject.cpp | 10 ++++++---- indra/newview/llslurl.cpp | 2 +- indra/newview/lltoolgrab.cpp | 6 ++++-- .../newview/skins/default/xui/en-us/floater_tools.xml | 2 +- .../skins/default/xui/en-us/floater_world_map.xml | 2 +- 7 files changed, 18 insertions(+), 13 deletions(-) diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index fcaaa2f42..808191294 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -758,7 +758,7 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos ) // convert global specified position to a local one F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS ); F32 region_local_y = (F32)fmod( pos.mdV[VY], (F64)REGION_WIDTH_METERS ); - F32 region_local_z = (F32)llclamp( pos.mdV[VZ], 0.0, (F64)REGION_HEIGHT_METERS ); + F32 region_local_z = (F32)llclamp( pos.mdV[VZ], 0.0, 8192.0/*(F64)REGION_HEIGHT_METERS*/ ); // write in the values childSetValue("spin x", region_local_x ); @@ -868,7 +868,7 @@ void LLFloaterWorldMap::updateLocation() void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord) { LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name); - z_coord = llclamp(z_coord, 0, 4096); + z_coord = llclamp(z_coord, 0, 8192/*4096*/); if (sim_info) { LLVector3 local_pos; diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index c7e31fd45..7c9a0aadc 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -62,6 +62,7 @@ #include "llui.h" #include "pipeline.h" #include "hippogridmanager.h" +#include "hippolimits.h" // [RLVa:KB] #include "rlvhandler.h" @@ -743,9 +744,9 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) } // For safety, cap heights where objects can be dragged - if (new_position_global.mdV[VZ] > MAX_OBJECT_Z) + if (new_position_global.mdV[VZ] > gHippoLimits->getMaxHeight()) { - new_position_global.mdV[VZ] = MAX_OBJECT_Z; + new_position_global.mdV[VZ] = gHippoLimits->getMaxHeight(); } // Grass is always drawn on the ground, so clamp its position to the ground diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 7a05212a3..35644d29b 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -552,6 +552,7 @@ void LLPanelObject::getState( ) mBtnCopySize->setEnabled( enable_scale ); mBtnPasteSize->setEnabled( enable_scale ); mBtnPasteSizeClip->setEnabled( enable_scale ); + mCtrlPosZ->setMaxValue(gHippoLimits->getMaxHeight()); mCtrlScaleX->setMaxValue(gHippoLimits->getMaxPrimScale()); mCtrlScaleY->setMaxValue(gHippoLimits->getMaxPrimScale()); mCtrlScaleZ->setMaxValue(gHippoLimits->getMaxPrimScale()); @@ -2569,7 +2570,7 @@ void LLPanelObject::onPastePos(void* user_data) float region_width = LLWorld::getInstance()->getRegionWidthInMeters(); mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], -3.5f, region_width); mClipboardPos.mV[VY] = llclamp( mClipboardPos.mV[VY], -3.5f, region_width); - mClipboardPos.mV[VZ] = llclamp( mClipboardPos.mV[VZ], -3.5f, 4096.f); + mClipboardPos.mV[VZ] = llclamp( mClipboardPos.mV[VZ], -3.5f, gHippoLimits->getMaxHeight()); self->mCtrlPosX->set( mClipboardPos.mV[VX] ); self->mCtrlPosY->set( mClipboardPos.mV[VY] ); @@ -2646,9 +2647,10 @@ void LLPanelObject::onPastePosClip(void* user_data) std::string stringVec = wstring_to_utf8str(temp_string); if(!getvectorfromclip(stringVec, &mClipboardPos)) return; - mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, 256.f); - mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], -3.5f, 256.f); - mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], -3.5f, 4096.f); + float region_width = LLWorld::getInstance()->getRegionWidthInMeters(); + mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, region_width); + mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], -3.5f, region_width); + mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], -3.5f, gHippoLimits->getMaxHeight()); self->mCtrlPosX->set( mClipboardPos.mV[VX] ); self->mCtrlPosY->set( mClipboardPos.mV[VY] ); diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index b1a30f78b..3f1b194c5 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -316,7 +316,7 @@ LLSLURL::LLSLURL(const std::string& slurl) (F32(mPosition[VY]) < 0.f) || (mPosition[VY] > REGION_WIDTH_METERS) || (F32(mPosition[VZ]) < 0.f) || - (mPosition[VZ] > REGION_HEIGHT_METERS)) + (mPosition[VZ] > 8192.f/*REGION_HEIGHT_METERS*/)) { mType = INVALID; return; diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 6170b7aca..22684899f 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -58,6 +58,8 @@ #include "llvoavatarself.h" #include "llworld.h" +#include "hippolimits.h" + // [RLVa:KB] #include "rlvhandler.h" // [/RLVa:KB] @@ -635,9 +637,9 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) } // For safety, cap heights where objects can be dragged - if (grab_point_global.mdV[VZ] > MAX_OBJECT_Z) + if (grab_point_global.mdV[VZ] > gHippoLimits->getMaxHeight()) { - grab_point_global.mdV[VZ] = MAX_OBJECT_Z; + grab_point_global.mdV[VZ] = gHippoLimits->getMaxHeight(); } grab_point_global = LLWorld::getInstance()->clipToVisibleRegions(mDragStartPointGlobal, grab_point_global); diff --git a/indra/newview/skins/default/xui/en-us/floater_tools.xml b/indra/newview/skins/default/xui/en-us/floater_tools.xml index 349a2dffd..400727da7 100644 --- a/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -766,7 +766,7 @@ text_enabled_color="0, 100, 40, 255" width="87" />