[VarRegions] Fix copy slurl on map to take the fmod of the x and y against the width of the region in question, instead of 256
This commit is contained in:
@@ -312,9 +312,9 @@ LLSLURL::LLSLURL(const std::string& slurl)
|
||||
|
||||
mPosition = LLVector3(path_array); // this construction handles LLSD without all components (values default to 0.f)
|
||||
if((F32(mPosition[VX]) < 0.f) ||
|
||||
(mPosition[VX] > REGION_WIDTH_METERS) ||
|
||||
(mPosition[VX] > 8192.f/*REGION_WIDTH_METERS*/) ||
|
||||
(F32(mPosition[VY]) < 0.f) ||
|
||||
(mPosition[VY] > REGION_WIDTH_METERS) ||
|
||||
(mPosition[VY] > 8192.f/*REGION_WIDTH_METERS*/) ||
|
||||
(F32(mPosition[VZ]) < 0.f) ||
|
||||
(mPosition[VZ] > 8192.f/*REGION_HEIGHT_METERS*/))
|
||||
{
|
||||
@@ -355,8 +355,8 @@ LLSLURL::LLSLURL(const std::string& grid,
|
||||
{
|
||||
mGrid = grid;
|
||||
mRegion = region;
|
||||
S32 x = llround( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
|
||||
S32 y = llround( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
|
||||
S32 x = llround( (F32)position[VX] );
|
||||
S32 y = llround( (F32)position[VY] );
|
||||
S32 z = llround( (F32)position[VZ] );
|
||||
mType = LOCATION;
|
||||
mPosition = LLVector3(x, y, z);
|
||||
|
||||
Reference in New Issue
Block a user