FIRE-32315: Animation preview sometimes fails when FS AO is enabled
parent
70b500bf3d
commit
d444e9d5b4
|
|
@ -67,6 +67,8 @@
|
|||
#include "llviewercontrol.h" // for gSavedSettings
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
#include "aoengine.h" // <FS:Zi> FIRE-32315: Animation preview sometimes fails when FS AO is enabled
|
||||
|
||||
S32 LLFloaterBvhPreview::sOwnAvatarInstanceCount = 0; // <FS> Preview on own avatar
|
||||
|
||||
const S32 PREVIEW_BORDER_WIDTH = 2;
|
||||
|
|
@ -137,6 +139,13 @@ LLFloaterBvhPreview::LLFloaterBvhPreview(const std::string& filename) :
|
|||
if (mUseOwnAvatar)
|
||||
{
|
||||
sOwnAvatarInstanceCount++;
|
||||
|
||||
// // Switch FS AO off during preview
|
||||
mAOEnabled = gSavedPerAccountSettings.getBOOL("UseAO");
|
||||
if (mAOEnabled)
|
||||
{
|
||||
AOEngine::getInstance()->enable(false);
|
||||
}
|
||||
}
|
||||
// </FS>
|
||||
|
||||
|
|
@ -535,6 +544,12 @@ LLFloaterBvhPreview::~LLFloaterBvhPreview()
|
|||
gAgentAvatarp->startDefaultMotions();
|
||||
gAgentAvatarp->startMotion(ANIM_AGENT_STAND);
|
||||
}
|
||||
|
||||
// Switch FS AO back on if it was disabled during preview
|
||||
if (mAOEnabled)
|
||||
{
|
||||
AOEngine::getInstance()->enable(true);
|
||||
}
|
||||
}
|
||||
// </FS>
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,9 @@ protected:
|
|||
|
||||
// <FS:Sei> FIRE-17277: Allow entering Loop In/Loop Out as frames
|
||||
S32 mNumFrames;
|
||||
|
||||
// <FS:Zi> FIRE-32315: Animation preview sometimes fails when FS AO is enabled
|
||||
bool mAOEnabled;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERBVHPREVIEW_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue