Spatial partition updated. Seems to run smoother for me, but may want to test on other systems.

This commit is contained in:
Shyotl
2011-05-29 16:28:56 -05:00
parent 566b3f162e
commit 95ea174d43
6 changed files with 205 additions and 93 deletions

View File

@@ -692,13 +692,15 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
LLVOVolume* volume = getVOVolume();
if (volume)
{
volume->updateRelativeXform();
pos = volume->getRelativeXform().getTranslation();
if (isStatic())
if (getSpatialGroup())
{
pos += volume->getRegion()->getOriginAgent();
pos.set(getPositionGroup());
}
else
{
pos = getPositionAgent();
}
if (isState(LLDrawable::HAS_ALPHA))
{
for (S32 i = 0; i < getNumFaces(); i++)