diff options
Diffstat (limited to 'linden/indra/newview/pipeline.cpp')
-rw-r--r-- | linden/indra/newview/pipeline.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index cd9b3be..e2d9f85 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp | |||
@@ -1782,6 +1782,24 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) | |||
1782 | } | 1782 | } |
1783 | mShiftList.resize(0); | 1783 | mShiftList.resize(0); |
1784 | 1784 | ||
1785 | |||
1786 | // This is a workaround for the "TP more than 4096 sims" bug. | ||
1787 | // This workaround is the difference between "can't see anything" and "can't see some prims close to you". | ||
1788 | // Sa it's a worthwhile workaround for now, pending further investigation. | ||
1789 | // The actual problem is deeper. | ||
1790 | // According to my notes, the actual bug is in void LLSpatialGroup::shift(const LLVector3 &offset), or deeper. | ||
1791 | // The original workaround came from Mana Janus TWO YEARS ago, as mentioned in https://jira.secondlife.com/browse/SVC-2941? | ||
1792 | // I've just refined the placement of the workaround, in an effort to track down the real problem. | ||
1793 | // onefang, from the meta-impy viewer. | ||
1794 | LLVector3 offsetOC = offset; | ||
1795 | // don't shift objects, if teleporting more than about 4000 sims, as | ||
1796 | // for long teleports shifting objects garbles the view at the target region | ||
1797 | // if (offsetOC.lengthSquared() > 6.5e10f) // roughly 1000 sims, fer easier testing | ||
1798 | if (offsetOC.lengthSquared() > 1.05e12f) // 4000 sims, though the trigger point is being reported as 4096. | ||
1799 | offsetOC = LLVector3::zero; | ||
1800 | // End of workaround, except where offsetOC is used below. | ||
1801 | |||
1802 | |||
1785 | for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); | 1803 | for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); |
1786 | iter != LLWorld::getInstance()->getRegionList().end(); ++iter) | 1804 | iter != LLWorld::getInstance()->getRegionList().end(); ++iter) |
1787 | { | 1805 | { |
@@ -1791,7 +1809,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) | |||
1791 | LLSpatialPartition* part = region->getSpatialPartition(i); | 1809 | LLSpatialPartition* part = region->getSpatialPartition(i); |
1792 | if (part) | 1810 | if (part) |
1793 | { | 1811 | { |
1794 | part->shift(offset); | 1812 | part->shift(offsetOC); |
1795 | } | 1813 | } |
1796 | } | 1814 | } |
1797 | } | 1815 | } |