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
This commit is contained in:
Inusaito Sayori
2013-08-08 16:00:49 -04:00
parent 4c69074564
commit 4b8db31073
7 changed files with 18 additions and 13 deletions

View File

@@ -758,7 +758,7 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
// convert global specified position to a local one // convert global specified position to a local one
F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS ); 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_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 // write in the values
childSetValue("spin x", region_local_x ); 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) 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); 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) if (sim_info)
{ {
LLVector3 local_pos; LLVector3 local_pos;

View File

@@ -62,6 +62,7 @@
#include "llui.h" #include "llui.h"
#include "pipeline.h" #include "pipeline.h"
#include "hippogridmanager.h" #include "hippogridmanager.h"
#include "hippolimits.h"
// [RLVa:KB] // [RLVa:KB]
#include "rlvhandler.h" #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 // 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 // Grass is always drawn on the ground, so clamp its position to the ground

View File

@@ -552,6 +552,7 @@ void LLPanelObject::getState( )
mBtnCopySize->setEnabled( enable_scale ); mBtnCopySize->setEnabled( enable_scale );
mBtnPasteSize->setEnabled( enable_scale ); mBtnPasteSize->setEnabled( enable_scale );
mBtnPasteSizeClip->setEnabled( enable_scale ); mBtnPasteSizeClip->setEnabled( enable_scale );
mCtrlPosZ->setMaxValue(gHippoLimits->getMaxHeight());
mCtrlScaleX->setMaxValue(gHippoLimits->getMaxPrimScale()); mCtrlScaleX->setMaxValue(gHippoLimits->getMaxPrimScale());
mCtrlScaleY->setMaxValue(gHippoLimits->getMaxPrimScale()); mCtrlScaleY->setMaxValue(gHippoLimits->getMaxPrimScale());
mCtrlScaleZ->setMaxValue(gHippoLimits->getMaxPrimScale()); mCtrlScaleZ->setMaxValue(gHippoLimits->getMaxPrimScale());
@@ -2569,7 +2570,7 @@ void LLPanelObject::onPastePos(void* user_data)
float region_width = LLWorld::getInstance()->getRegionWidthInMeters(); float region_width = LLWorld::getInstance()->getRegionWidthInMeters();
mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], -3.5f, region_width); mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], -3.5f, region_width);
mClipboardPos.mV[VY] = llclamp( mClipboardPos.mV[VY], -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->mCtrlPosX->set( mClipboardPos.mV[VX] );
self->mCtrlPosY->set( mClipboardPos.mV[VY] ); self->mCtrlPosY->set( mClipboardPos.mV[VY] );
@@ -2646,9 +2647,10 @@ void LLPanelObject::onPastePosClip(void* user_data)
std::string stringVec = wstring_to_utf8str(temp_string); std::string stringVec = wstring_to_utf8str(temp_string);
if(!getvectorfromclip(stringVec, &mClipboardPos)) return; if(!getvectorfromclip(stringVec, &mClipboardPos)) return;
mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, 256.f); float region_width = LLWorld::getInstance()->getRegionWidthInMeters();
mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], -3.5f, 256.f); mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, region_width);
mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], -3.5f, 4096.f); 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->mCtrlPosX->set( mClipboardPos.mV[VX] );
self->mCtrlPosY->set( mClipboardPos.mV[VY] ); self->mCtrlPosY->set( mClipboardPos.mV[VY] );

View File

@@ -316,7 +316,7 @@ LLSLURL::LLSLURL(const std::string& slurl)
(F32(mPosition[VY]) < 0.f) || (F32(mPosition[VY]) < 0.f) ||
(mPosition[VY] > REGION_WIDTH_METERS) || (mPosition[VY] > REGION_WIDTH_METERS) ||
(F32(mPosition[VZ]) < 0.f) || (F32(mPosition[VZ]) < 0.f) ||
(mPosition[VZ] > REGION_HEIGHT_METERS)) (mPosition[VZ] > 8192.f/*REGION_HEIGHT_METERS*/))
{ {
mType = INVALID; mType = INVALID;
return; return;

View File

@@ -58,6 +58,8 @@
#include "llvoavatarself.h" #include "llvoavatarself.h"
#include "llworld.h" #include "llworld.h"
#include "hippolimits.h"
// [RLVa:KB] // [RLVa:KB]
#include "rlvhandler.h" #include "rlvhandler.h"
// [/RLVa:KB] // [/RLVa:KB]
@@ -635,9 +637,9 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
} }
// For safety, cap heights where objects can be dragged // 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); grab_point_global = LLWorld::getInstance()->clipToVisibleRegions(mDragStartPointGlobal, grab_point_global);

View File

@@ -766,7 +766,7 @@
text_enabled_color="0, 100, 40, 255" width="87" /> text_enabled_color="0, 100, 40, 255" width="87" />
<spinner bottom_delta="-18" decimal_digits="4" follows="left|top" height="16" <spinner bottom_delta="-18" decimal_digits="4" follows="left|top" height="16"
increment="0.01" initial_val="0" label="Z" label_width="10" left_delta="0" increment="0.01" initial_val="0" label="Z" label_width="10" left_delta="0"
max_val="4096" min_val="-3.5" mouse_opaque="true" name="Pos Z" min_val="-3.5" mouse_opaque="true" name="Pos Z"
text_enabled_color="0, 67, 132, 255" width="87" /> text_enabled_color="0, 67, 132, 255" width="87" />
<button bottom_delta="35" follows="top|right" font="SansSerifSmall" halign="center" <button bottom_delta="35" follows="top|right" font="SansSerifSmall" halign="center"
height="18" label="C" left_delta="90" mouse_opaque="true" name="copypos" enabled="true" height="18" label="C" left_delta="90" mouse_opaque="true" name="copypos" enabled="true"

View File

@@ -170,7 +170,7 @@
function="WMap.Coordinates" /> function="WMap.Coordinates" />
</spinner> </spinner>
<spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16" <spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16"
increment="1" initial_val="0" left_delta="50" max_val="4096" min_val="0" increment="1" initial_val="0" left_delta="50" max_val="8192" min_val="0"
mouse_opaque="true" name="spin z" mouse_opaque="true" name="spin z"
tool_tip="Z coordinate of location to show on map" width="48" > tool_tip="Z coordinate of location to show on map" width="48" >
<spinner.commit_callback <spinner.commit_callback