Index: indra/newview/pipeline.h =================================================================== --- indra/newview/pipeline.h (revision 87442) +++ indra/newview/pipeline.h (revision 87469) @@ -380,6 +380,8 @@ static BOOL sRenderGlow; static BOOL sTextureBindTest; static BOOL sRenderFrameTest; + static BOOL sRenderAttachedLights; + static BOOL sRenderAttachedParticles; //screen texture LLRenderTarget mScreen; Index: indra/newview/llviewermenu.cpp =================================================================== --- indra/newview/llviewermenu.cpp (revision 87442) +++ indra/newview/llviewermenu.cpp (revision 87469) @@ -506,6 +506,8 @@ BOOL enable_have_card(void*); BOOL enable_detach(void*); BOOL enable_region_owner(void*); +void menu_toggle_attached_lights(void* user_data); +void menu_toggle_attached_particles(void* user_data); class LLLandmarkObserver : public LLInventoryObserver { @@ -1460,7 +1462,13 @@ item = new LLMenuItemCheckGL("Cheesy Beacon", menu_toggle_control, NULL, menu_check_control, (void*)"CheesyBeacon"); menu->append(item); - + + item = new LLMenuItemCheckGL("Attached Lights", menu_toggle_attached_lights, NULL, menu_check_control, (void*)"RenderAttachedLights"); + menu->append(item); + + item = new LLMenuItemCheckGL("Attached Particles", menu_toggle_attached_particles, NULL, menu_check_control, (void*)"RenderAttachedParticles"); + menu->append(item); + menu->createJumpKeys(); } @@ -6466,6 +6474,18 @@ return !(LLViewerParcelMgr::getInstance()->selectionEmpty()); } +void menu_toggle_attached_lights(void* user_data) +{ + menu_toggle_control(user_data); + LLPipeline::sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); +} + +void menu_toggle_attached_particles(void* user_data) +{ + menu_toggle_control(user_data); + LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); +} + class LLSomethingSelected : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) Index: indra/newview/pipeline.cpp =================================================================== --- indra/newview/pipeline.cpp (revision 87442) +++ indra/newview/pipeline.cpp (revision 87469) @@ -227,6 +227,8 @@ BOOL LLPipeline::sUnderWaterRender = FALSE; BOOL LLPipeline::sTextureBindTest = FALSE; BOOL LLPipeline::sRenderFrameTest = FALSE; +BOOL LLPipeline::sRenderAttachedLights = TRUE; +BOOL LLPipeline::sRenderAttachedParticles = TRUE; static LLCullResult* sCull = NULL; @@ -276,6 +278,8 @@ sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD"); sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); + sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); + sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); mInitialized = TRUE; @@ -3178,12 +3182,16 @@ if (light->fade <= -LIGHT_FADE_TIME) { drawable->clearState(LLDrawable::NEARBY_LIGHT); + continue; } - else + if (!sRenderAttachedLights && volight && volight->isAttachment()) { - F32 dist = calc_light_dist(volight, cam_pos, max_dist); - cur_nearby_lights.insert(Light(drawable, dist, light->fade)); + drawable->clearState(LLDrawable::NEARBY_LIGHT); + continue; } + + F32 dist = calc_light_dist(volight, cam_pos, max_dist); + cur_nearby_lights.insert(Light(drawable, dist, light->fade)); } mNearbyLights = cur_nearby_lights; } Index: indra/newview/app_settings/settings.xml =================================================================== --- indra/newview/app_settings/settings.xml (revision 87442) +++ indra/newview/app_settings/settings.xml (revision 87469) @@ -175,7 +175,7 @@ Value 1 - AuctionShowFence + AuctionShowFence Comment When auctioning land, include parcel boundary marker in snapshot @@ -5246,6 +5246,28 @@ Value 0 + RenderAttachedLights + + Comment + Render lighted prims that are attached to avatars + Persist + 1 + Type + Boolean + Value + 1 + + RenderAttachedParticles + + Comment + Render particle systems that are attached to avatars + Persist + 1 + Type + Boolean + Value + 1 + RenderAvatarCloth Comment Index: indra/newview/llviewerpartsim.cpp =================================================================== --- indra/newview/llviewerpartsim.cpp (revision 87442) +++ indra/newview/llviewerpartsim.cpp (revision 87469) @@ -44,6 +44,7 @@ #include "llworld.h" #include "pipeline.h" #include "llspatialpartition.h" +#include "llvovolume.h" const F32 PART_SIM_BOX_SIDE = 16.f; const F32 PART_SIM_BOX_OFFSET = 0.5f*PART_SIM_BOX_SIDE; @@ -614,7 +615,24 @@ if (!mViewerPartSources[i]->isDead()) { - mViewerPartSources[i]->update(dt); + BOOL upd = TRUE; + if (!LLPipeline::sRenderAttachedParticles) + { + LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp; + if (vobj && (vobj->getPCode() == LL_PCODE_VOLUME)) + { + LLVOVolume* vvo = (LLVOVolume *)vobj; + if (vvo && vvo->isAttachment()) + { + upd = FALSE; + } + } + } + + if (upd) + { + mViewerPartSources[i]->update(dt); + } } if (mViewerPartSources[i]->isDead()) @@ -630,7 +648,6 @@ num_updates++; } - count = (S32) mViewerPartGroups.size(); for (i = 0; i < count; i++) {