diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-08-24 07:37:50 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-08-24 07:37:50 +0800 |
commit | 7f354c70ba623b591c36dadd0f6616b349be4fc7 (patch) | |
tree | 67557a9981877e6e4b1f08937dfde94e6287dc61 /indra/newview/llviewerparcelmgr.cpp | |
parent | 5b9cb5bba3c12b1b5c86ba56d43ccf06b83edc14 (diff) | |
parent | 33e0766ee08cccb480675a75d83b3a6e78849906 (diff) |
Merge tag '6.6.14-release'
source for viewer 6.6.14.581101
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 97dc916bfe..15accd0547 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -72,12 +72,16 @@ #include "llenvironment.h" -const F32 PARCEL_COLLISION_DRAW_SECS = 1.f; +const F32 PARCEL_BAN_LINES_DRAW_SECS_ON_COLLISION = 10.f; +const F32 PARCEL_COLLISION_DRAW_SECS_ON_PROXIMITY = 1.f; // Globals U8* LLViewerParcelMgr::sPackedOverlay = NULL; +S32 LLViewerParcelMgr::PARCEL_BAN_LINES_HIDE = 0; +S32 LLViewerParcelMgr::PARCEL_BAN_LINES_ON_COLLISION = 1; +S32 LLViewerParcelMgr::PARCEL_BAN_LINES_ON_PROXIMITY = 2; LLUUID gCurrentMovieID = LLUUID::null; @@ -892,13 +896,18 @@ void LLViewerParcelMgr::render() void LLViewerParcelMgr::renderParcelCollision() { + static LLCachedControl<S32> ban_lines_mode(gSavedSettings , "ShowBanLines" , PARCEL_BAN_LINES_ON_COLLISION); + // check for expiration - if (mCollisionTimer.getElapsedTimeF32() > PARCEL_COLLISION_DRAW_SECS) + F32 expiration = (ban_lines_mode == PARCEL_BAN_LINES_ON_PROXIMITY) + ? PARCEL_COLLISION_DRAW_SECS_ON_PROXIMITY + : PARCEL_BAN_LINES_DRAW_SECS_ON_COLLISION; + if (mCollisionTimer.getElapsedTimeF32() > expiration) { - mRenderCollision = FALSE; + mRenderCollision = false; } - if (mRenderCollision && gSavedSettings.getBOOL("ShowBanLines")) + if (mRenderCollision && ban_lines_mode != PARCEL_BAN_LINES_HIDE) { LLViewerRegion* regionp = gAgent.getRegion(); if (regionp) @@ -1842,8 +1851,11 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID) { // We're about to collide with this parcel - parcel_mgr.mRenderCollision = TRUE; - parcel_mgr.mCollisionTimer.reset(); + static LLCachedControl<S32> ban_lines_mode(gSavedSettings , "ShowBanLines" , PARCEL_BAN_LINES_ON_COLLISION); + if (ban_lines_mode == PARCEL_BAN_LINES_ON_PROXIMITY) + { + parcel_mgr.resetCollisionTimer(); + } // Differentiate this parcel if we are banned from it. if (sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID) |