A tiny sync with v-d in LLGLSandBox/LLViewerParcelMgr
This commit is contained in:
@@ -72,6 +72,9 @@
|
|||||||
#include "rlvhandler.h"
|
#include "rlvhandler.h"
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
|
||||||
|
// Height of the yellow selection highlight posts for land
|
||||||
|
const F32 PARCEL_POST_HEIGHT = 0.666f;
|
||||||
|
|
||||||
// Returns true if you got at least one object
|
// Returns true if you got at least one object
|
||||||
void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
|
void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
|
||||||
{
|
{
|
||||||
@@ -708,29 +711,27 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
|
|||||||
x2 = x1 + PARCEL_GRID_STEP_METERS;
|
x2 = x1 + PARCEL_GRID_STEP_METERS;
|
||||||
y2 = y1;
|
y2 = y1;
|
||||||
|
|
||||||
{
|
dy = (pos_y - y1) + DIST_OFFSET;
|
||||||
dy = (pos_y - y1) + DIST_OFFSET;
|
|
||||||
|
|
||||||
if (pos_x < x1)
|
if (pos_x < x1)
|
||||||
dx = pos_x - x1;
|
dx = pos_x - x1;
|
||||||
else if (pos_x > x2)
|
else if (pos_x > x2)
|
||||||
dx = pos_x - x2;
|
dx = pos_x - x2;
|
||||||
else
|
else
|
||||||
dx = 0;
|
dx = 0;
|
||||||
|
|
||||||
dist = dx*dx+dy*dy;
|
dist = dx*dx+dy*dy;
|
||||||
|
|
||||||
if (dist < MIN_DIST_SQ)
|
if (dist < MIN_DIST_SQ)
|
||||||
alpha = MAX_ALPHA;
|
alpha = MAX_ALPHA;
|
||||||
else if (dist > MAX_DIST_SQ)
|
else if (dist > MAX_DIST_SQ)
|
||||||
alpha = 0.0f;
|
alpha = 0.0f;
|
||||||
else
|
else
|
||||||
alpha = 30/dist;
|
alpha = 30/dist;
|
||||||
|
|
||||||
alpha = llclamp(alpha, 0.0f, MAX_ALPHA);
|
alpha = llclamp(alpha, 0.0f, MAX_ALPHA);
|
||||||
|
|
||||||
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
||||||
}
|
|
||||||
|
|
||||||
if ((pos_y - y1) < 0) direction = SOUTH_MASK;
|
if ((pos_y - y1) < 0) direction = SOUTH_MASK;
|
||||||
else direction = NORTH_MASK;
|
else direction = NORTH_MASK;
|
||||||
@@ -748,29 +749,27 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
|
|||||||
x2 = x1;
|
x2 = x1;
|
||||||
y2 = y1 + PARCEL_GRID_STEP_METERS;
|
y2 = y1 + PARCEL_GRID_STEP_METERS;
|
||||||
|
|
||||||
{
|
dx = (pos_x - x1) + DIST_OFFSET;
|
||||||
dx = (pos_x - x1) + DIST_OFFSET;
|
|
||||||
|
|
||||||
if (pos_y < y1)
|
if (pos_y < y1)
|
||||||
dy = pos_y - y1;
|
dy = pos_y - y1;
|
||||||
else if (pos_y > y2)
|
else if (pos_y > y2)
|
||||||
dy = pos_y - y2;
|
dy = pos_y - y2;
|
||||||
else
|
else
|
||||||
dy = 0;
|
dy = 0;
|
||||||
|
|
||||||
dist = dx*dx+dy*dy;
|
dist = dx*dx+dy*dy;
|
||||||
|
|
||||||
if (dist < MIN_DIST_SQ)
|
if (dist < MIN_DIST_SQ)
|
||||||
alpha = MAX_ALPHA;
|
alpha = MAX_ALPHA;
|
||||||
else if (dist > MAX_DIST_SQ)
|
else if (dist > MAX_DIST_SQ)
|
||||||
alpha = 0.0f;
|
alpha = 0.0f;
|
||||||
else
|
else
|
||||||
alpha = 30/dist;
|
alpha = 30/dist;
|
||||||
|
|
||||||
alpha = llclamp(alpha, 0.0f, MAX_ALPHA);
|
alpha = llclamp(alpha, 0.0f, MAX_ALPHA);
|
||||||
|
|
||||||
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
||||||
}
|
|
||||||
|
|
||||||
if ((pos_x - x1) > 0) direction = WEST_MASK;
|
if ((pos_x - x1) > 0) direction = WEST_MASK;
|
||||||
else direction = EAST_MASK;
|
else direction = EAST_MASK;
|
||||||
@@ -927,4 +926,3 @@ void LLViewerObjectList::renderObjectBeacons()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -53,9 +53,6 @@ class LLViewerRegion;
|
|||||||
// | EAST_MASK
|
// | EAST_MASK
|
||||||
// | WEST_MASK);
|
// | WEST_MASK);
|
||||||
|
|
||||||
const F32 PARCEL_POST_HEIGHT = 0.666f;
|
|
||||||
//const F32 PARCEL_POST_HEIGHT = 20.f;
|
|
||||||
|
|
||||||
// Specify the type of land transfer taking place
|
// Specify the type of land transfer taking place
|
||||||
//enum ELandTransferType
|
//enum ELandTransferType
|
||||||
//{
|
//{
|
||||||
|
|||||||
Reference in New Issue
Block a user