Cleanup. Mostly harmless. A few gAgentAvatarps changed to isAgentAvatarValid(), which is the only 'change' in behavior. Everything else is insignifigant syntax touchup and shuffling of inlines from headers to cpp files.
This commit is contained in:
@@ -35,8 +35,6 @@
|
|||||||
|
|
||||||
#include "lldrawpool.h"
|
#include "lldrawpool.h"
|
||||||
|
|
||||||
class LLViewerFetchedTexture;
|
|
||||||
|
|
||||||
class LLDrawPoolTerrain : public LLFacePool
|
class LLDrawPoolTerrain : public LLFacePool
|
||||||
{
|
{
|
||||||
LLPointer<LLViewerTexture> mTexturep;
|
LLPointer<LLViewerTexture> mTexturep;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void LLDrawPoolWater::prerender()
|
|||||||
|
|
||||||
// got rid of modulation by light color since it got a little too
|
// got rid of modulation by light color since it got a little too
|
||||||
// green at sunset and sl-57047 (underwater turns black at 8:00)
|
// green at sunset and sl-57047 (underwater turns black at 8:00)
|
||||||
sWaterFogColor = LLWaterParamManager::getInstance()->getFogColor();
|
sWaterFogColor = LLWaterParamManager::instance().getFogColor();
|
||||||
sWaterFogColor.mV[3] = 0;
|
sWaterFogColor.mV[3] = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -532,7 +532,7 @@ void LLDrawPoolWater::shade()
|
|||||||
//bind normal map
|
//bind normal map
|
||||||
S32 bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP);
|
S32 bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP);
|
||||||
|
|
||||||
LLWaterParamManager * param_mgr = LLWaterParamManager::getInstance();
|
LLWaterParamManager * param_mgr = &LLWaterParamManager::instance();
|
||||||
|
|
||||||
// change mWaterNormp if needed
|
// change mWaterNormp if needed
|
||||||
if (mWaterNormp->getID() != param_mgr->getNormalMapID())
|
if (mWaterNormp->getID() != param_mgr->getNormalMapID())
|
||||||
|
|||||||
@@ -453,9 +453,9 @@ LLMeshRepoThread::LLMeshRepoThread()
|
|||||||
: LLThread("mesh repo")
|
: LLThread("mesh repo")
|
||||||
{
|
{
|
||||||
mWaiting = false;
|
mWaiting = false;
|
||||||
mMutex = new LLMutex;
|
mMutex = new LLMutex();
|
||||||
mHeaderMutex = new LLMutex;
|
mHeaderMutex = new LLMutex();
|
||||||
mSignal = new LLCondition;
|
mSignal = new LLCondition();
|
||||||
}
|
}
|
||||||
|
|
||||||
LLMeshRepoThread::~LLMeshRepoThread()
|
LLMeshRepoThread::~LLMeshRepoThread()
|
||||||
@@ -1208,7 +1208,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
|
|||||||
mUploadTextures = upload_textures;
|
mUploadTextures = upload_textures;
|
||||||
mUploadSkin = upload_skin;
|
mUploadSkin = upload_skin;
|
||||||
mUploadJoints = upload_joints;
|
mUploadJoints = upload_joints;
|
||||||
mMutex = new LLMutex(NULL);
|
mMutex = new LLMutex();
|
||||||
mCurlRequest = NULL;
|
mCurlRequest = NULL;
|
||||||
mPendingUploads = 0;
|
mPendingUploads = 0;
|
||||||
mFinished = false;
|
mFinished = false;
|
||||||
@@ -2061,7 +2061,7 @@ LLMeshRepository::LLMeshRepository()
|
|||||||
|
|
||||||
void LLMeshRepository::init()
|
void LLMeshRepository::init()
|
||||||
{
|
{
|
||||||
mMeshMutex = new LLMutex;
|
mMeshMutex = new LLMutex();
|
||||||
|
|
||||||
#if MESH_IMPORT
|
#if MESH_IMPORT
|
||||||
LLConvexDecomposition::getInstance()->initSystem();
|
LLConvexDecomposition::getInstance()->initSystem();
|
||||||
|
|||||||
@@ -2743,7 +2743,7 @@ bool idle_startup()
|
|||||||
if (gAgent.isFirstLogin()
|
if (gAgent.isFirstLogin()
|
||||||
&& !sInitialOutfit.empty() // registration set up an outfit
|
&& !sInitialOutfit.empty() // registration set up an outfit
|
||||||
&& !sInitialOutfitGender.empty() // and a gender
|
&& !sInitialOutfitGender.empty() // and a gender
|
||||||
&& gAgentAvatarp // can't wear clothes without object
|
&& isAgentAvatarValid() // can't wear clothes without object
|
||||||
&& !gAgent.isGenderChosen() ) // nothing already loading
|
&& !gAgent.isGenderChosen() ) // nothing already loading
|
||||||
{
|
{
|
||||||
// Start loading the wearables, textures, gestures
|
// Start loading the wearables, textures, gestures
|
||||||
@@ -2766,7 +2766,7 @@ bool idle_startup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// wait precache-delay and for agent's avatar or a lot longer.
|
// wait precache-delay and for agent's avatar or a lot longer.
|
||||||
if(((timeout_frac > 1.f) && gAgentAvatarp)
|
if(((timeout_frac > 1.f) && isAgentAvatarValid())
|
||||||
|| (timeout_frac > 3.f))
|
|| (timeout_frac > 3.f))
|
||||||
{
|
{
|
||||||
LLStartUp::setStartupState( STATE_WEARABLES_WAIT );
|
LLStartUp::setStartupState( STATE_WEARABLES_WAIT );
|
||||||
@@ -2822,7 +2822,7 @@ bool idle_startup()
|
|||||||
if (gAgent.isFirstLogin())
|
if (gAgent.isFirstLogin())
|
||||||
{
|
{
|
||||||
// wait for avatar to be completely loaded
|
// wait for avatar to be completely loaded
|
||||||
if (gAgentAvatarp
|
if (isAgentAvatarValid()
|
||||||
&& gAgentAvatarp->isFullyLoaded())
|
&& gAgentAvatarp->isFullyLoaded())
|
||||||
{
|
{
|
||||||
//llinfos << "avatar fully loaded" << llendl;
|
//llinfos << "avatar fully loaded" << llendl;
|
||||||
@@ -2889,7 +2889,6 @@ bool idle_startup()
|
|||||||
// Start automatic replay if the flag is set.
|
// Start automatic replay if the flag is set.
|
||||||
if (gSavedSettings.getBOOL("StatsAutoRun"))
|
if (gSavedSettings.getBOOL("StatsAutoRun"))
|
||||||
{
|
{
|
||||||
LLUUID id;
|
|
||||||
LL_DEBUGS("AppInit") << "Starting automatic playback" << LL_ENDL;
|
LL_DEBUGS("AppInit") << "Starting automatic playback" << LL_ENDL;
|
||||||
gAgentPilot.startPlayback();
|
gAgentPilot.startPlayback();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
|
|||||||
const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived.
|
const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived.
|
||||||
|
|
||||||
S32 attach_count = 0;
|
S32 attach_count = 0;
|
||||||
if (gAgentAvatarp)
|
if (isAgentAvatarValid())
|
||||||
{
|
{
|
||||||
attach_count = gAgentAvatarp->getAttachmentCount();
|
attach_count = gAgentAvatarp->getAttachmentCount();
|
||||||
}
|
}
|
||||||
@@ -1128,13 +1128,11 @@ LLRect get_whole_screen_region()
|
|||||||
|
|
||||||
bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::matrix4f &model)
|
bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::matrix4f &model)
|
||||||
{
|
{
|
||||||
LLVOAvatar* my_avatarp = gAgentAvatarp;
|
if (isAgentAvatarValid() && gAgentAvatarp->hasHUDAttachment())
|
||||||
if (my_avatarp && my_avatarp->hasHUDAttachment())
|
|
||||||
{
|
{
|
||||||
F32 zoom_level = gAgentCamera.mHUDCurZoom;
|
F32 zoom_level = gAgentCamera.mHUDCurZoom;
|
||||||
LLBBox hud_bbox = my_avatarp->getHUDBBox();
|
LLBBox hud_bbox = gAgentAvatarp->getHUDBBox();
|
||||||
|
|
||||||
// set up transform to keep HUD objects in front of camera
|
|
||||||
F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
|
F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
|
||||||
proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth);
|
proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth);
|
||||||
proj.element(2,2) = -0.01f;
|
proj.element(2,2) = -0.01f;
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
|
|||||||
{
|
{
|
||||||
if (!gAgentAvatarp)
|
if (!gAgentAvatarp)
|
||||||
{
|
{
|
||||||
lldebugs << "Marking avatar as self " << id << llendl;
|
|
||||||
gAgentAvatarp = new LLVOAvatarSelf(id, pcode, regionp);
|
gAgentAvatarp = new LLVOAvatarSelf(id, pcode, regionp);
|
||||||
gAgentAvatarp->initInstance();
|
gAgentAvatarp->initInstance();
|
||||||
}
|
}
|
||||||
@@ -5682,6 +5681,17 @@ std::string LLViewerObject::getAttachmentPointName()
|
|||||||
return llformat("unsupported point %d", point);
|
return llformat("unsupported point %d", point);
|
||||||
}
|
}
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
|
const LLUUID &LLViewerObject::getAttachmentItemID() const
|
||||||
|
{
|
||||||
|
return mAttachmentItemID;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLViewerObject::setAttachmentItemID(const LLUUID &id)
|
||||||
|
{
|
||||||
|
mAttachmentItemID = id;
|
||||||
|
}
|
||||||
|
|
||||||
EObjectUpdateType LLViewerObject::getLastUpdateType() const
|
EObjectUpdateType LLViewerObject::getLastUpdateType() const
|
||||||
{
|
{
|
||||||
return mLastUpdateType;
|
return mLastUpdateType;
|
||||||
@@ -5725,7 +5735,7 @@ LLVOAvatar* LLViewerObject::getAvatar() const
|
|||||||
{
|
{
|
||||||
LLViewerObject* vobj = (LLViewerObject*) getParent();
|
LLViewerObject* vobj = (LLViewerObject*) getParent();
|
||||||
|
|
||||||
while (vobj && !vobj->isAvatar())
|
while (vobj && !vobj->asAvatar())
|
||||||
{
|
{
|
||||||
vobj = (LLViewerObject*) vobj->getParent();
|
vobj = (LLViewerObject*) vobj->getParent();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -763,8 +763,8 @@ public:
|
|||||||
S32 getAttachmentPoint();
|
S32 getAttachmentPoint();
|
||||||
std::string getAttachmentPointName();
|
std::string getAttachmentPointName();
|
||||||
// </edit>
|
// </edit>
|
||||||
const LLUUID &getAttachmentItemID() const { return mAttachmentItemID; }
|
const LLUUID &getAttachmentItemID() const;
|
||||||
void setAttachmentItemID(const LLUUID &id) { mAttachmentItemID = id; }
|
void setAttachmentItemID(const LLUUID &id);
|
||||||
const LLUUID &extractAttachmentItemID(); // find&set the inventory item ID of the attached object
|
const LLUUID &extractAttachmentItemID(); // find&set the inventory item ID of the attached object
|
||||||
EObjectUpdateType getLastUpdateType() const;
|
EObjectUpdateType getLastUpdateType() const;
|
||||||
void setLastUpdateType(EObjectUpdateType last_update_type);
|
void setLastUpdateType(EObjectUpdateType last_update_type);
|
||||||
|
|||||||
@@ -1746,22 +1746,21 @@ void LLViewerObjectList::generatePickList(LLCamera &camera)
|
|||||||
// add all hud objects to pick list
|
// add all hud objects to pick list
|
||||||
if (isAgentAvatarValid())
|
if (isAgentAvatarValid())
|
||||||
{
|
{
|
||||||
LLVOAvatar* avatarp = gAgentAvatarp;
|
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||||
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
|
iter != gAgentAvatarp->mAttachmentPoints.end(); )
|
||||||
iter != avatarp->mAttachmentPoints.end(); )
|
|
||||||
{
|
{
|
||||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||||
LLViewerJointAttachment* attachmentp = curiter->second;
|
LLViewerJointAttachment* attachment = curiter->second;
|
||||||
if (attachmentp->getIsHUDAttachment())
|
if (attachment->getIsHUDAttachment())
|
||||||
{
|
{
|
||||||
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachmentp->mAttachedObjects.begin();
|
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||||
attachment_iter != attachmentp->mAttachedObjects.end();
|
attachment_iter != attachment->mAttachedObjects.end();
|
||||||
++attachment_iter)
|
++attachment_iter)
|
||||||
{
|
{
|
||||||
if (LLViewerObject* objectp = (*attachment_iter))
|
if (LLViewerObject* attached_object = (*attachment_iter))
|
||||||
{
|
{
|
||||||
mSelectPickList.insert(objectp);
|
mSelectPickList.insert(attached_object);
|
||||||
LLViewerObject::const_child_list_t& child_list = objectp->getChildren();
|
LLViewerObject::const_child_list_t& child_list = attached_object->getChildren();
|
||||||
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
|
||||||
iter != child_list.end(); iter++)
|
iter != child_list.end(); iter++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ public:
|
|||||||
agent_center_text = llformat("AgentCenter %f %f %f",
|
agent_center_text = llformat("AgentCenter %f %f %f",
|
||||||
(F32)(tvector.mdV[VX]), (F32)(tvector.mdV[VY]), (F32)(tvector.mdV[VZ]));
|
(F32)(tvector.mdV[VX]), (F32)(tvector.mdV[VY]), (F32)(tvector.mdV[VZ]));
|
||||||
|
|
||||||
if (gAgentAvatarp)
|
if (isAgentAvatarValid())
|
||||||
{
|
{
|
||||||
tvector = gAgent.getPosGlobalFromAgent(gAgentAvatarp->mRoot.getWorldPosition());
|
tvector = gAgent.getPosGlobalFromAgent(gAgentAvatarp->mRoot.getWorldPosition());
|
||||||
agent_root_center_text = llformat("AgentRootCenter %f %f %f",
|
agent_root_center_text = llformat("AgentRootCenter %f %f %f",
|
||||||
|
|||||||
@@ -6165,7 +6165,8 @@ BOOL LLVOAvatar::loadSkeletonNode ()
|
|||||||
mRoot.addChild( &mSkeleton[0] );
|
mRoot.addChild( &mSkeleton[0] );
|
||||||
|
|
||||||
for (std::vector<LLViewerJoint *>::iterator iter = mMeshLOD.begin();
|
for (std::vector<LLViewerJoint *>::iterator iter = mMeshLOD.begin();
|
||||||
iter != mMeshLOD.end(); iter++)
|
iter != mMeshLOD.end();
|
||||||
|
++iter)
|
||||||
{
|
{
|
||||||
LLViewerJoint *joint = (LLViewerJoint *) *iter;
|
LLViewerJoint *joint = (LLViewerJoint *) *iter;
|
||||||
joint->mUpdateXform = FALSE;
|
joint->mUpdateXform = FALSE;
|
||||||
@@ -6201,7 +6202,8 @@ BOOL LLVOAvatar::loadSkeletonNode ()
|
|||||||
{
|
{
|
||||||
LLVOAvatarXmlInfo::skeletal_distortion_info_list_t::iterator iter;
|
LLVOAvatarXmlInfo::skeletal_distortion_info_list_t::iterator iter;
|
||||||
for (iter = sAvatarXmlInfo->mSkeletalDistortionInfoList.begin();
|
for (iter = sAvatarXmlInfo->mSkeletalDistortionInfoList.begin();
|
||||||
iter != sAvatarXmlInfo->mSkeletalDistortionInfoList.end(); iter++)
|
iter != sAvatarXmlInfo->mSkeletalDistortionInfoList.end();
|
||||||
|
++iter)
|
||||||
{
|
{
|
||||||
LLPolySkeletalDistortionInfo *info = *iter;
|
LLPolySkeletalDistortionInfo *info = *iter;
|
||||||
LLPolySkeletalDistortion *param = new LLPolySkeletalDistortion(this);
|
LLPolySkeletalDistortion *param = new LLPolySkeletalDistortion(this);
|
||||||
@@ -6221,7 +6223,8 @@ BOOL LLVOAvatar::loadSkeletonNode ()
|
|||||||
{
|
{
|
||||||
LLVOAvatarXmlInfo::attachment_info_list_t::iterator iter;
|
LLVOAvatarXmlInfo::attachment_info_list_t::iterator iter;
|
||||||
for (iter = sAvatarXmlInfo->mAttachmentInfoList.begin();
|
for (iter = sAvatarXmlInfo->mAttachmentInfoList.begin();
|
||||||
iter != sAvatarXmlInfo->mAttachmentInfoList.end(); iter++)
|
iter != sAvatarXmlInfo->mAttachmentInfoList.end();
|
||||||
|
++iter)
|
||||||
{
|
{
|
||||||
LLVOAvatarXmlInfo::LLVOAvatarAttachmentInfo *info = *iter;
|
LLVOAvatarXmlInfo::LLVOAvatarAttachmentInfo *info = *iter;
|
||||||
if (!isSelf() && info->mJointName == "mScreen")
|
if (!isSelf() && info->mJointName == "mScreen")
|
||||||
@@ -6302,7 +6305,7 @@ BOOL LLVOAvatar::loadMeshNodes()
|
|||||||
{
|
{
|
||||||
for (LLVOAvatarXmlInfo::mesh_info_list_t::const_iterator meshinfo_iter = sAvatarXmlInfo->mMeshInfoList.begin();
|
for (LLVOAvatarXmlInfo::mesh_info_list_t::const_iterator meshinfo_iter = sAvatarXmlInfo->mMeshInfoList.begin();
|
||||||
meshinfo_iter != sAvatarXmlInfo->mMeshInfoList.end();
|
meshinfo_iter != sAvatarXmlInfo->mMeshInfoList.end();
|
||||||
meshinfo_iter++)
|
++meshinfo_iter)
|
||||||
{
|
{
|
||||||
const LLVOAvatarXmlInfo::LLVOAvatarMeshInfo *info = *meshinfo_iter;
|
const LLVOAvatarXmlInfo::LLVOAvatarMeshInfo *info = *meshinfo_iter;
|
||||||
const std::string &type = info->mType;
|
const std::string &type = info->mType;
|
||||||
@@ -6318,7 +6321,7 @@ BOOL LLVOAvatar::loadMeshNodes()
|
|||||||
mesh = &mHairMesh0; */
|
mesh = &mHairMesh0; */
|
||||||
for (LLVOAvatarDictionary::Meshes::const_iterator mesh_iter = LLVOAvatarDictionary::getInstance()->getMeshes().begin();
|
for (LLVOAvatarDictionary::Meshes::const_iterator mesh_iter = LLVOAvatarDictionary::getInstance()->getMeshes().begin();
|
||||||
mesh_iter != LLVOAvatarDictionary::getInstance()->getMeshes().end();
|
mesh_iter != LLVOAvatarDictionary::getInstance()->getMeshes().end();
|
||||||
mesh_iter++)
|
++mesh_iter)
|
||||||
{
|
{
|
||||||
const EMeshIndex mesh_index = mesh_iter->first;
|
const EMeshIndex mesh_index = mesh_iter->first;
|
||||||
const LLVOAvatarDictionary::MeshEntry *mesh_dict = mesh_iter->second;
|
const LLVOAvatarDictionary::MeshEntry *mesh_dict = mesh_iter->second;
|
||||||
@@ -6390,7 +6393,7 @@ BOOL LLVOAvatar::loadMeshNodes()
|
|||||||
|
|
||||||
for (LLVOAvatarXmlInfo::LLVOAvatarMeshInfo::morph_info_list_t::const_iterator xmlinfo_iter = info->mPolyMorphTargetInfoList.begin();
|
for (LLVOAvatarXmlInfo::LLVOAvatarMeshInfo::morph_info_list_t::const_iterator xmlinfo_iter = info->mPolyMorphTargetInfoList.begin();
|
||||||
xmlinfo_iter != info->mPolyMorphTargetInfoList.end();
|
xmlinfo_iter != info->mPolyMorphTargetInfoList.end();
|
||||||
xmlinfo_iter++)
|
++xmlinfo_iter)
|
||||||
{
|
{
|
||||||
const LLVOAvatarXmlInfo::LLVOAvatarMeshInfo::morph_info_pair_t *info_pair = &(*xmlinfo_iter);
|
const LLVOAvatarXmlInfo::LLVOAvatarMeshInfo::morph_info_pair_t *info_pair = &(*xmlinfo_iter);
|
||||||
LLPolyMorphTarget *param = new LLPolyMorphTarget(mesh->getMesh());
|
LLPolyMorphTarget *param = new LLPolyMorphTarget(mesh->getMesh());
|
||||||
@@ -7047,11 +7050,11 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
|
|||||||
BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
|
BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
|
||||||
{
|
{
|
||||||
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
|
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
|
||||||
iter != mAttachmentPoints.end(); )
|
iter != mAttachmentPoints.end();
|
||||||
|
++iter)
|
||||||
{
|
{
|
||||||
attachment_map_t::iterator curiter = iter++;
|
LLViewerJointAttachment* attachment = iter->second;
|
||||||
LLViewerJointAttachment* attachment = curiter->second;
|
|
||||||
// only one object per attachment point for now
|
|
||||||
if (attachment->isObjectAttached(viewer_object))
|
if (attachment->isObjectAttached(viewer_object))
|
||||||
{
|
{
|
||||||
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||||
@@ -7606,20 +7609,18 @@ void LLVOAvatar::invalidateAll()
|
|||||||
updateMeshTextures();
|
updateMeshTextures();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL set_by_user )
|
void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake )
|
||||||
{
|
{
|
||||||
if (global_color == mTexSkinColor)
|
if (global_color == mTexSkinColor)
|
||||||
{
|
{
|
||||||
// llinfos << "invalidateComposite cause: onGlobalColorChanged( skin color )" << llendl;
|
invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake );
|
||||||
invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, set_by_user );
|
invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, upload_bake );
|
||||||
invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, set_by_user );
|
invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, upload_bake );
|
||||||
invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, set_by_user );
|
|
||||||
}
|
}
|
||||||
else if (global_color == mTexHairColor)
|
else if (global_color == mTexHairColor)
|
||||||
{
|
{
|
||||||
// llinfos << "invalidateComposite cause: onGlobalColorChanged( hair color )" << llendl;
|
invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake );
|
||||||
invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, set_by_user );
|
invalidateComposite( mBakedTextureDatas[BAKED_HAIR].mTexLayerSet, upload_bake );
|
||||||
invalidateComposite( mBakedTextureDatas[BAKED_HAIR].mTexLayerSet, set_by_user );
|
|
||||||
|
|
||||||
// ! BACKWARDS COMPATIBILITY !
|
// ! BACKWARDS COMPATIBILITY !
|
||||||
// Fix for dealing with avatars from viewers that don't bake hair.
|
// Fix for dealing with avatars from viewers that don't bake hair.
|
||||||
@@ -7635,7 +7636,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL
|
|||||||
else if (global_color == mTexEyeColor)
|
else if (global_color == mTexEyeColor)
|
||||||
{
|
{
|
||||||
// llinfos << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << llendl;
|
// llinfos << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << llendl;
|
||||||
invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, set_by_user );
|
invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, upload_bake );
|
||||||
}
|
}
|
||||||
updateMeshTextures();
|
updateMeshTextures();
|
||||||
}
|
}
|
||||||
@@ -8728,14 +8729,14 @@ BOOL LLVOAvatar::teToColorParams( ETextureIndex te, const char* param_name[3] )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLVOAvatar::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL set_by_user )
|
void LLVOAvatar::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL upload_bake )
|
||||||
{
|
{
|
||||||
const char* param_name[3];
|
const char* param_name[3];
|
||||||
if( teToColorParams( te, param_name ) )
|
if( teToColorParams( te, param_name ) )
|
||||||
{
|
{
|
||||||
setVisualParamWeight( param_name[0], new_color.mV[VX], set_by_user );
|
setVisualParamWeight( param_name[0], new_color.mV[VX], upload_bake );
|
||||||
setVisualParamWeight( param_name[1], new_color.mV[VY], set_by_user );
|
setVisualParamWeight( param_name[1], new_color.mV[VY], upload_bake );
|
||||||
setVisualParamWeight( param_name[2], new_color.mV[VZ], set_by_user );
|
setVisualParamWeight( param_name[2], new_color.mV[VZ], upload_bake );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8752,8 +8753,11 @@ LLColor4 LLVOAvatar::getClothesColor( ETextureIndex te )
|
|||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
LLColor4 LLVOAvatar::getDummyColor()
|
||||||
|
{
|
||||||
|
return DUMMY_COLOR;
|
||||||
|
}
|
||||||
|
|
||||||
void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const
|
void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const
|
||||||
{
|
{
|
||||||
@@ -8765,31 +8769,31 @@ void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const
|
|||||||
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
|
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
|
||||||
++iter)
|
++iter)
|
||||||
{
|
{
|
||||||
const LLVOAvatarDictionary::TextureEntry *text_dict = iter->second;
|
const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
|
||||||
const LLViewerTexture* te_image = getTEImage(iter->first);
|
const LLViewerTexture* te_image = getTEImage(iter->first);
|
||||||
if( !te_image )
|
if( !te_image )
|
||||||
{
|
{
|
||||||
llinfos << " " << text_dict->mName << ": null ptr" << llendl;
|
llinfos << " " << texture_dict->mName << ": null ptr" << llendl;
|
||||||
}
|
}
|
||||||
else if( te_image->getID().isNull() )
|
else if( te_image->getID().isNull() )
|
||||||
{
|
{
|
||||||
llinfos << " " << text_dict->mName << ": null UUID" << llendl;
|
llinfos << " " << texture_dict->mName << ": null UUID" << llendl;
|
||||||
}
|
}
|
||||||
else if( te_image->getID() == IMG_DEFAULT )
|
else if( te_image->getID() == IMG_DEFAULT )
|
||||||
{
|
{
|
||||||
llinfos << " " << text_dict->mName << ": IMG_DEFAULT" << llendl;
|
llinfos << " " << texture_dict->mName << ": IMG_DEFAULT" << llendl;
|
||||||
}
|
}
|
||||||
else if (te_image->getID() == IMG_INVISIBLE)
|
else if (te_image->getID() == IMG_INVISIBLE)
|
||||||
{
|
{
|
||||||
llinfos << " " << text_dict->mName << ": IMG_INVISIBLE" << llendl;
|
llinfos << " " << texture_dict->mName << ": IMG_INVISIBLE" << llendl;
|
||||||
}
|
}
|
||||||
else if( te_image->getID() == IMG_DEFAULT_AVATAR )
|
else if( te_image->getID() == IMG_DEFAULT_AVATAR )
|
||||||
{
|
{
|
||||||
llinfos << " " << text_dict->mName << ": IMG_DEFAULT_AVATAR" << llendl;
|
llinfos << " " << texture_dict->mName << ": IMG_DEFAULT_AVATAR" << llendl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
llinfos << " " << text_dict->mName << ": " << te_image->getID() << llendl;
|
llinfos << " " << texture_dict->mName << ": " << te_image->getID() << llendl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8850,11 +8854,6 @@ void LLVOAvatar::setInvisible(BOOL newvalue)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLColor4 LLVOAvatar::getDummyColor()
|
|
||||||
{
|
|
||||||
return DUMMY_COLOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unlike most wearable functions, this works for both self and other.
|
// Unlike most wearable functions, this works for both self and other.
|
||||||
BOOL LLVOAvatar::isWearingWearableType( LLWearableType::EType type ) const
|
BOOL LLVOAvatar::isWearingWearableType( LLWearableType::EType type ) const
|
||||||
{
|
{
|
||||||
@@ -9528,7 +9527,7 @@ void LLVOAvatar::dumpArchetypeXML( void* )
|
|||||||
const std::string& wearable_name = LLWearableType::getTypeName( (LLWearableType::EType) type );
|
const std::string& wearable_name = LLWearableType::getTypeName( (LLWearableType::EType) type );
|
||||||
apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() );
|
apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() );
|
||||||
|
|
||||||
for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() )
|
for( LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam() )
|
||||||
{
|
{
|
||||||
LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param;
|
LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param;
|
||||||
if( (viewer_param->getWearableType() == type) &&
|
if( (viewer_param->getWearableType() == type) &&
|
||||||
@@ -10523,10 +10522,10 @@ const std::string LLVOAvatar::getBakedStatusForPrintout() const
|
|||||||
++iter)
|
++iter)
|
||||||
{
|
{
|
||||||
const ETextureIndex index = iter->first;
|
const ETextureIndex index = iter->first;
|
||||||
const LLVOAvatarDictionary::TextureEntry *text_dict = iter->second;
|
const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
|
||||||
if (text_dict->mIsBakedTexture)
|
if (texture_dict->mIsBakedTexture)
|
||||||
{
|
{
|
||||||
line += text_dict->mName;
|
line += texture_dict->mName;
|
||||||
if (isTextureDefined(index))
|
if (isTextureDefined(index))
|
||||||
{
|
{
|
||||||
line += "_baked";
|
line += "_baked";
|
||||||
|
|||||||
@@ -279,9 +279,6 @@ public:
|
|||||||
F32 getFogDensity(void);
|
F32 getFogDensity(void);
|
||||||
LLColor4 getFogColor(void);
|
LLColor4 getFogColor(void);
|
||||||
|
|
||||||
// singleton pattern implementation
|
|
||||||
static LLWaterParamManager * instance();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
LLWaterParamSet mCurParams;
|
LLWaterParamSet mCurParams;
|
||||||
@@ -323,7 +320,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
// list of all the parameters, listed by name
|
// list of all the parameters, listed by name
|
||||||
std::map<std::string, LLWaterParamSet> mParamList;
|
preset_map_t mParamList;
|
||||||
|
|
||||||
std::vector<LLGLSLShader *> mShaderList;
|
std::vector<LLGLSLShader *> mShaderList;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user