Slightly smarter flexi update handling, plus extra nullchecks.
This commit is contained in:
@@ -366,7 +366,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
|
|||||||
{
|
{
|
||||||
LLVolume* volume = mVO->getVolume();
|
LLVolume* volume = mVO->getVolume();
|
||||||
LLPath *path = &volume->getPath();
|
LLPath *path = &volume->getPath();
|
||||||
if (mSimulateRes == 0)
|
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) // if its uninitialized but not visible, what then? - Nyx
|
||||||
{
|
{
|
||||||
mVO->markForUpdate(TRUE);
|
mVO->markForUpdate(TRUE);
|
||||||
if (!doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0))
|
if (!doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0))
|
||||||
@@ -694,7 +694,11 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
volume->updateRelativeXform();
|
volume->updateRelativeXform();
|
||||||
doFlexibleUpdate();
|
|
||||||
|
if (mRenderRes > -1)
|
||||||
|
{
|
||||||
|
doFlexibleUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
// Object may have been rotated, which means it needs a rebuild. See SL-47220
|
// Object may have been rotated, which means it needs a rebuild. See SL-47220
|
||||||
BOOL rotated = FALSE;
|
BOOL rotated = FALSE;
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
#include "llviewercontrol.h"
|
#include "llviewercontrol.h"
|
||||||
|
|
||||||
#include "llagent.h"
|
|
||||||
#include "lldrawable.h"
|
#include "lldrawable.h"
|
||||||
#include "llface.h"
|
#include "llface.h"
|
||||||
#include "llsky.h"
|
#include "llsky.h"
|
||||||
|
|||||||
@@ -982,6 +982,11 @@ void LLVOVolume::updateFaceFlags()
|
|||||||
for (S32 i = 0; i < getVolume()->getNumFaces(); i++)
|
for (S32 i = 0; i < getVolume()->getNumFaces(); i++)
|
||||||
{
|
{
|
||||||
LLFace *face = mDrawable->getFace(i);
|
LLFace *face = mDrawable->getFace(i);
|
||||||
|
if (!face)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL fullbright = getTE(i)->getFullbright();
|
BOOL fullbright = getTE(i)->getFullbright();
|
||||||
face->clearState(LLFace::FULLBRIGHT | LLFace::HUD_RENDER | LLFace::LIGHT);
|
face->clearState(LLFace::FULLBRIGHT | LLFace::HUD_RENDER | LLFace::LIGHT);
|
||||||
|
|
||||||
@@ -1054,6 +1059,10 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
|
|||||||
for (S32 i = 0; i < getVolume()->getNumFaces(); i++)
|
for (S32 i = 0; i < getVolume()->getNumFaces(); i++)
|
||||||
{
|
{
|
||||||
LLFace *face = mDrawable->getFace(i);
|
LLFace *face = mDrawable->getFace(i);
|
||||||
|
if (!face)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
res &= face->genVolumeBBoxes(*getVolume(), i,
|
res &= face->genVolumeBBoxes(*getVolume(), i,
|
||||||
mRelativeXform, mRelativeXformInvTrans,
|
mRelativeXform, mRelativeXformInvTrans,
|
||||||
(mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global);
|
(mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global);
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
#include "imageids.h"
|
#include "imageids.h"
|
||||||
#include "llviewercontrol.h"
|
#include "llviewercontrol.h"
|
||||||
|
|
||||||
#include "llagent.h"
|
|
||||||
#include "lldrawable.h"
|
#include "lldrawable.h"
|
||||||
#include "lldrawpoolwater.h"
|
#include "lldrawpoolwater.h"
|
||||||
#include "llface.h"
|
#include "llface.h"
|
||||||
@@ -56,8 +55,6 @@ const BOOL gUseRoam = FALSE;
|
|||||||
|
|
||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
|
|
||||||
#include "randgauss.h"
|
|
||||||
|
|
||||||
template<class T> inline T LERP(T a, T b, F32 factor)
|
template<class T> inline T LERP(T a, T b, F32 factor)
|
||||||
{
|
{
|
||||||
return a + (b - a) * factor;
|
return a + (b - a) * factor;
|
||||||
|
|||||||
Reference in New Issue
Block a user