diff options
Diffstat (limited to 'indra/newview/llviewerparceloverlay.cpp')
-rw-r--r-- | indra/newview/llviewerparceloverlay.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index 4fd423b6f4..7c3dd00e1a 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -274,6 +274,23 @@ U8 LLViewerParcelOverlay::ownership( const LLVector3& pos) const return ownership(row, column); } +U8 LLViewerParcelOverlay::parcelLineFlags(const LLVector3& pos) const +{ + S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS); + S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS); + return parcelLineFlags(row, column); +} +U8 LLViewerParcelOverlay::parcelLineFlags(S32 row, S32 col) const +{ + U8 flags = PARCEL_WEST_LINE | PARCEL_SOUTH_LINE; + if (row > mParcelGridsPerEdge || col > mParcelGridsPerEdge) + { + LL_WARNS() << "Attempted to get ownership out of region's overlay, row: " << row << " col: " << col << LL_ENDL; + return flags; + } + return mOwnership[row * mParcelGridsPerEdge + col] & flags; +} + F32 LLViewerParcelOverlay::getOwnedRatio() const { S32 size = mParcelGridsPerEdge * mParcelGridsPerEdge; |