Some cleanup. Using gAgentAvatarp in many places. Incl other misc small changes.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#define LL_LLIMAGEDXT_H
|
||||
|
||||
#include "llimage.h"
|
||||
#include "llpointer.h"
|
||||
|
||||
// This class decodes and encodes LL DXT files (which may unclude uncompressed RGB or RGBA mipped data)
|
||||
|
||||
|
||||
@@ -43,6 +43,11 @@ LLImageDecodeThread::LLImageDecodeThread(bool threaded)
|
||||
{
|
||||
}
|
||||
|
||||
//virtual
|
||||
LLImageDecodeThread::~LLImageDecodeThread()
|
||||
{
|
||||
}
|
||||
|
||||
// MAIN THREAD
|
||||
// virtual
|
||||
S32 LLImageDecodeThread::update(U32 max_time_ms)
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#define LL_LLIMAGEWORKER_H
|
||||
|
||||
#include "llimage.h"
|
||||
#include "llqueuedthread.h"
|
||||
#include "llpointer.h"
|
||||
#include "llworkerthread.h"
|
||||
|
||||
class LLImageDecodeThread : public LLQueuedThread
|
||||
{
|
||||
@@ -78,6 +79,8 @@ public:
|
||||
|
||||
public:
|
||||
LLImageDecodeThread(bool threaded = true);
|
||||
virtual ~LLImageDecodeThread();
|
||||
|
||||
handle_t decodeImage(LLImageFormatted* image,
|
||||
U32 priority, S32 discard, BOOL needs_aux,
|
||||
Responder* responder);
|
||||
|
||||
@@ -332,7 +332,6 @@ public:
|
||||
child = getChild(i);
|
||||
if (child->isInside(data->getPositionGroup()))
|
||||
{
|
||||
llassert(child->getElementCount() <= gOctreeMaxCapacity);
|
||||
child->insert(data);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -179,8 +179,8 @@ LLSD LLHTTPAssetRequest::getFullDetails() const
|
||||
double curl_total_time = -1.0f;
|
||||
double curl_size_upload = -1.0f;
|
||||
double curl_size_download = -1.0f;
|
||||
long curl_content_length_upload = -1;
|
||||
long curl_content_length_download = -1;
|
||||
double curl_content_length_upload = -1.0f;
|
||||
double curl_content_length_download = -1.0f;
|
||||
long curl_request_size = -1;
|
||||
const char* curl_content_type = NULL;
|
||||
|
||||
@@ -199,8 +199,8 @@ LLSD LLHTTPAssetRequest::getFullDetails() const
|
||||
sd["curl_total_time"] = curl_total_time;
|
||||
sd["curl_size_upload"] = curl_size_upload;
|
||||
sd["curl_size_download"] = curl_size_download;
|
||||
sd["curl_content_length_upload"] = (int) curl_content_length_upload;
|
||||
sd["curl_content_length_download"] = (int) curl_content_length_download;
|
||||
sd["curl_content_length_upload"] = curl_content_length_upload;
|
||||
sd["curl_content_length_download"] = curl_content_length_download;
|
||||
sd["curl_request_size"] = (int) curl_request_size;
|
||||
if (curl_content_type)
|
||||
{
|
||||
|
||||
@@ -211,9 +211,9 @@ void LLURLRequest::useProxy(bool use_proxy)
|
||||
}
|
||||
}
|
||||
|
||||
lldebugs << "use_proxy = " << (use_proxy?'Y':'N') << ", env_proxy = \"" << env_proxy << "\"" << llendl;
|
||||
LL_DEBUGS("Proxy") << "use_proxy = " << (use_proxy?'Y':'N') << ", env_proxy = " << (!env_proxy.empty() ? env_proxy : "(null)") << LL_ENDL;
|
||||
|
||||
if (use_proxy)
|
||||
if (use_proxy && !env_proxy.empty())
|
||||
{
|
||||
mDetail->mCurlRequest->setoptString(CURLOPT_PROXY, env_proxy);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "v3math.h"
|
||||
#include "xform.h"
|
||||
#include "message.h"
|
||||
#include "llmemory.h"
|
||||
#include "llpointer.h"
|
||||
#include "llvolume.h"
|
||||
#include "lltextureentry.h"
|
||||
#include "llprimtexturelist.h"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <set>
|
||||
|
||||
#include "llapr.h"
|
||||
#include "llmemory.h" // LLPointer
|
||||
#include "llpointer.h"
|
||||
#include "llqueuedthread.h"
|
||||
|
||||
//============================================================================
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
#include "llmoveview.h"
|
||||
#include "llchatbar.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llnotify.h"
|
||||
#include "llparcel.h"
|
||||
#include "llrendersphere.h"
|
||||
#include "llsdutil.h"
|
||||
|
||||
@@ -1111,29 +1111,27 @@ void LLAgentCamera::cameraPanUp(F32 meters)
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
|
||||
{
|
||||
LLVOAvatar *pAvatar = gAgentAvatarp; // bleh
|
||||
|
||||
static LLVector3 last_at_axis;
|
||||
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
LLQuaternion av_inv_rot = ~pAvatar->mRoot.getWorldRotation();
|
||||
LLVector3 root_at = LLVector3::x_axis * pAvatar->mRoot.getWorldRotation();
|
||||
LLQuaternion av_inv_rot = ~gAgentAvatarp->mRoot.getWorldRotation();
|
||||
LLVector3 root_at = LLVector3::x_axis * gAgentAvatarp->mRoot.getWorldRotation();
|
||||
|
||||
if ((gViewerWindow->getMouseVelocityStat()->getCurrent() < 0.01f) &&
|
||||
(root_at * last_at_axis > 0.95f))
|
||||
{
|
||||
LLVector3 vel = pAvatar->getVelocity();
|
||||
LLVector3 vel = gAgentAvatarp->getVelocity();
|
||||
if (vel.magVecSquared() > 4.f)
|
||||
{
|
||||
setLookAt(LOOKAT_TARGET_IDLE, pAvatar, vel * av_inv_rot);
|
||||
setLookAt(LOOKAT_TARGET_IDLE, gAgentAvatarp, vel * av_inv_rot);
|
||||
}
|
||||
else
|
||||
{
|
||||
// *FIX: rotate mframeagent by sit object's rotation?
|
||||
LLQuaternion look_rotation = pAvatar->isSitting() ? pAvatar->getRenderRotation() : gAgent.getFrameAgent().getQuaternion(); // use camera's current rotation
|
||||
LLQuaternion look_rotation = gAgentAvatarp->isSitting() ? gAgentAvatarp->getRenderRotation() : gAgent.getFrameAgent().getQuaternion(); // use camera's current rotation
|
||||
LLVector3 look_offset = LLVector3(2.f, 0.f, 0.f) * look_rotation * av_inv_rot;
|
||||
setLookAt(LOOKAT_TARGET_IDLE, pAvatar, look_offset);
|
||||
setLookAt(LOOKAT_TARGET_IDLE, gAgentAvatarp, look_offset);
|
||||
}
|
||||
last_at_axis = root_at;
|
||||
return;
|
||||
@@ -1143,7 +1141,7 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
|
||||
|
||||
if (CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode())
|
||||
{
|
||||
setLookAt(LOOKAT_TARGET_NONE, pAvatar, LLVector3(-2.f, 0.f, 0.f));
|
||||
setLookAt(LOOKAT_TARGET_NONE, gAgentAvatarp, LLVector3(-2.f, 0.f, 0.f));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1160,9 +1158,9 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
|
||||
{
|
||||
// range from -.5 to .5
|
||||
F32 x_from_center =
|
||||
((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f;
|
||||
((F32) mouse_x / (F32) gViewerWindow->getWorldViewWidthScaled() ) - 0.5f;
|
||||
F32 y_from_center =
|
||||
((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f;
|
||||
((F32) mouse_y / (F32) gViewerWindow->getWorldViewHeightScaled() ) - 0.5f;
|
||||
|
||||
frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD);
|
||||
frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD);
|
||||
@@ -1172,7 +1170,7 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y)
|
||||
headLookAxis = frameCamera.getAtAxis();
|
||||
// RN: we use world-space offset for mouselook and freelook
|
||||
//headLookAxis = headLookAxis * av_inv_rot;
|
||||
setLookAt(lookAtType, pAvatar, headLookAxis);
|
||||
setLookAt(lookAtType, gAgentAvatarp, headLookAxis);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1183,8 +1181,6 @@ void LLAgentCamera::updateCamera()
|
||||
{
|
||||
//static LLFastTimer::DeclareTimer ftm("Camera");
|
||||
//LLFastTimer t(ftm);
|
||||
|
||||
LLVOAvatar *pAvatar = gAgentAvatarp;
|
||||
|
||||
// - changed camera_skyward to the new global "mCameraUpVector"
|
||||
mCameraUpVector = LLVector3::z_axis;
|
||||
@@ -1195,11 +1191,11 @@ void LLAgentCamera::updateCamera()
|
||||
validateFocusObject();
|
||||
|
||||
if (isAgentAvatarValid() &&
|
||||
pAvatar->isSitting() &&
|
||||
gAgentAvatarp->isSitting() &&
|
||||
camera_mode == CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
//changed camera_skyward to the new global "mCameraUpVector"
|
||||
mCameraUpVector = mCameraUpVector * pAvatar->getRenderRotation();
|
||||
mCameraUpVector = mCameraUpVector * gAgentAvatarp->getRenderRotation();
|
||||
}
|
||||
|
||||
if (cameraThirdPerson() && mFocusOnAvatar && LLFollowCamMgr::getActiveFollowCamParams())
|
||||
@@ -1298,13 +1294,13 @@ void LLAgentCamera::updateCamera()
|
||||
// (2) focus, and (3) upvector. They can then be queried elsewhere in llAgent.
|
||||
//--------------------------------------------------------------------------------
|
||||
// *TODO: use combined rotation of frameagent and sit object
|
||||
LLQuaternion avatarRotationForFollowCam = pAvatar->isSitting() ? pAvatar->getRenderRotation() : gAgent.getFrameAgent().getQuaternion();
|
||||
LLQuaternion avatarRotationForFollowCam = gAgentAvatarp->isSitting() ? gAgentAvatarp->getRenderRotation() : gAgent.getFrameAgent().getQuaternion();
|
||||
|
||||
LLFollowCamParams* current_cam = LLFollowCamMgr::getActiveFollowCamParams();
|
||||
if (current_cam)
|
||||
{
|
||||
mFollowCam.copyParams(*current_cam);
|
||||
mFollowCam.setSubjectPositionAndRotation( pAvatar->getRenderPosition(), avatarRotationForFollowCam );
|
||||
mFollowCam.setSubjectPositionAndRotation( gAgentAvatarp->getRenderPosition(), avatarRotationForFollowCam );
|
||||
mFollowCam.update();
|
||||
LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true);
|
||||
}
|
||||
@@ -1380,7 +1376,7 @@ void LLAgentCamera::updateCamera()
|
||||
|
||||
if (isAgentAvatarValid() && (mCameraMode != CAMERA_MODE_MOUSELOOK))
|
||||
{
|
||||
pAvatar->updateAttachmentVisibility(mCameraMode);
|
||||
gAgentAvatarp->updateAttachmentVisibility(mCameraMode);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1476,40 +1472,40 @@ void LLAgentCamera::updateCamera()
|
||||
}
|
||||
gAgent.setLastPositionGlobal(global_pos);
|
||||
|
||||
if (LLVOAvatar::sVisibleInFirstPerson && isAgentAvatarValid() && !pAvatar->isSitting() && cameraMouselook())
|
||||
if (LLVOAvatar::sVisibleInFirstPerson && isAgentAvatarValid() && !gAgentAvatarp->isSitting() && cameraMouselook())
|
||||
{
|
||||
LLVector3 head_pos = pAvatar->mHeadp->getWorldPosition() +
|
||||
LLVector3(0.08f, 0.f, 0.05f) * pAvatar->mHeadp->getWorldRotation() +
|
||||
LLVector3(0.1f, 0.f, 0.f) * pAvatar->mPelvisp->getWorldRotation();
|
||||
LLVector3 head_pos = gAgentAvatarp->mHeadp->getWorldPosition() +
|
||||
LLVector3(0.08f, 0.f, 0.05f) * gAgentAvatarp->mHeadp->getWorldRotation() +
|
||||
LLVector3(0.1f, 0.f, 0.f) * gAgentAvatarp->mPelvisp->getWorldRotation();
|
||||
LLVector3 diff = mCameraPositionAgent - head_pos;
|
||||
diff = diff * ~pAvatar->mRoot.getWorldRotation();
|
||||
diff = diff * ~gAgentAvatarp->mRoot.getWorldRotation();
|
||||
|
||||
LLJoint* torso_joint = pAvatar->mTorsop;
|
||||
LLJoint* chest_joint = pAvatar->mChestp;
|
||||
LLJoint* torso_joint = gAgentAvatarp->mTorsop;
|
||||
LLJoint* chest_joint = gAgentAvatarp->mChestp;
|
||||
LLVector3 torso_scale = torso_joint->getScale();
|
||||
LLVector3 chest_scale = chest_joint->getScale();
|
||||
|
||||
// shorten avatar skeleton to avoid foot interpenetration
|
||||
if (!pAvatar->mInAir)
|
||||
if (!gAgentAvatarp->mInAir)
|
||||
{
|
||||
LLVector3 chest_offset = LLVector3(0.f, 0.f, chest_joint->getPosition().mV[VZ]) * torso_joint->getWorldRotation();
|
||||
F32 z_compensate = llclamp(-diff.mV[VZ], -0.2f, 1.f);
|
||||
F32 scale_factor = llclamp(1.f - ((z_compensate * 0.5f) / chest_offset.mV[VZ]), 0.5f, 1.2f);
|
||||
torso_joint->setScale(LLVector3(1.f, 1.f, scale_factor));
|
||||
|
||||
LLJoint* neck_joint = pAvatar->mNeckp;
|
||||
LLJoint* neck_joint = gAgentAvatarp->mNeckp;
|
||||
LLVector3 neck_offset = LLVector3(0.f, 0.f, neck_joint->getPosition().mV[VZ]) * chest_joint->getWorldRotation();
|
||||
scale_factor = llclamp(1.f - ((z_compensate * 0.5f) / neck_offset.mV[VZ]), 0.5f, 1.2f);
|
||||
chest_joint->setScale(LLVector3(1.f, 1.f, scale_factor));
|
||||
diff.mV[VZ] = 0.f;
|
||||
}
|
||||
|
||||
pAvatar->mPelvisp->setPosition(pAvatar->mPelvisp->getPosition() + diff);
|
||||
gAgentAvatarp->mPelvisp->setPosition(gAgentAvatarp->mPelvisp->getPosition() + diff);
|
||||
|
||||
pAvatar->mRoot.updateWorldMatrixChildren();
|
||||
gAgentAvatarp->mRoot.updateWorldMatrixChildren();
|
||||
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = pAvatar->mAttachmentPoints.begin();
|
||||
iter != pAvatar->mAttachmentPoints.end(); )
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
|
||||
iter != gAgentAvatarp->mAttachmentPoints.end(); )
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
@@ -1770,7 +1766,6 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
gAgent.getPositionGlobal() :
|
||||
gAgent.getPosGlobalFromAgent(gAgentAvatarp->mRoot.getWorldPosition());
|
||||
|
||||
LLVOAvatar *pAvatar = gAgentAvatarp;
|
||||
BOOL isConstrained = FALSE;
|
||||
LLVector3d head_offset;
|
||||
head_offset.setVec(mThirdPersonHeadOffset);
|
||||
@@ -1783,32 +1778,32 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
}
|
||||
else if (mCameraMode == CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
if (!isAgentAvatarValid() || pAvatar->mDrawable.isNull())
|
||||
if (!isAgentAvatarValid() || gAgentAvatarp->mDrawable.isNull())
|
||||
{
|
||||
llwarns << "Null avatar drawable!" << llendl;
|
||||
return LLVector3d::zero;
|
||||
}
|
||||
head_offset.clearVec();
|
||||
if (pAvatar->isSitting() && pAvatar->getParent())
|
||||
if (gAgentAvatarp->isSitting() && gAgentAvatarp->getParent())
|
||||
{
|
||||
pAvatar->updateHeadOffset();
|
||||
head_offset.mdV[VX] = pAvatar->mHeadOffset.mV[VX];
|
||||
head_offset.mdV[VY] = pAvatar->mHeadOffset.mV[VY];
|
||||
head_offset.mdV[VZ] = pAvatar->mHeadOffset.mV[VZ] + 0.1f;
|
||||
const LLMatrix4& mat = ((LLViewerObject*) pAvatar->getParent())->getRenderMatrix();
|
||||
gAgentAvatarp->updateHeadOffset();
|
||||
head_offset.mdV[VX] = gAgentAvatarp->mHeadOffset.mV[VX];
|
||||
head_offset.mdV[VY] = gAgentAvatarp->mHeadOffset.mV[VY];
|
||||
head_offset.mdV[VZ] = gAgentAvatarp->mHeadOffset.mV[VZ] + 0.1f;
|
||||
const LLMatrix4& mat = ((LLViewerObject*) gAgentAvatarp->getParent())->getRenderMatrix();
|
||||
camera_position_global = gAgent.getPosGlobalFromAgent
|
||||
((gAgentAvatarp->getPosition()+
|
||||
LLVector3(head_offset)*pAvatar->getRotation()) * mat);
|
||||
LLVector3(head_offset)*gAgentAvatarp->getRotation()) * mat);
|
||||
}
|
||||
else
|
||||
{
|
||||
head_offset.mdV[VZ] = pAvatar->mHeadOffset.mV[VZ];
|
||||
if (pAvatar->isSitting())
|
||||
head_offset.mdV[VZ] = gAgentAvatarp->mHeadOffset.mV[VZ];
|
||||
if (gAgentAvatarp->isSitting())
|
||||
{
|
||||
head_offset.mdV[VZ] += 0.1;
|
||||
}
|
||||
camera_position_global = gAgent.getPosGlobalFromAgent(pAvatar->getRenderPosition());//frame_center_global;
|
||||
head_offset = head_offset * pAvatar->getRenderRotation();
|
||||
camera_position_global = gAgent.getPosGlobalFromAgent(gAgentAvatarp->getRenderPosition());//frame_center_global;
|
||||
head_offset = head_offset * gAgentAvatarp->getRenderRotation();
|
||||
camera_position_global = camera_position_global + head_offset;
|
||||
}
|
||||
}
|
||||
@@ -1819,7 +1814,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
|
||||
if (mSitCameraEnabled
|
||||
&& isAgentAvatarValid()
|
||||
&& pAvatar->isSitting()
|
||||
&& gAgentAvatarp->isSitting()
|
||||
&& mSitCameraReferenceObject.notNull())
|
||||
{
|
||||
// sit camera
|
||||
@@ -1835,7 +1830,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
local_camera_offset = mCameraZoomFraction * getCameraOffsetInitial() * gSavedSettings.getF32("CameraOffsetScale");
|
||||
|
||||
// are we sitting down?
|
||||
if (isAgentAvatarValid() && pAvatar->getParent())
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
LLQuaternion parent_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation();
|
||||
// slam agent coordinate frame to proper parent local version
|
||||
@@ -1851,7 +1846,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
local_camera_offset = gAgent.getFrameAgent().rotateToAbsolute( local_camera_offset );
|
||||
}
|
||||
|
||||
if (!mCameraCollidePlane.isExactlyZero() && (!isAgentAvatarValid() || !pAvatar->isSitting()))
|
||||
if (!mCameraCollidePlane.isExactlyZero() && (!isAgentAvatarValid() || !gAgentAvatarp->isSitting()))
|
||||
{
|
||||
LLVector3 plane_normal;
|
||||
plane_normal.setVec(mCameraCollidePlane.mV);
|
||||
@@ -1904,7 +1899,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
// set the global camera position
|
||||
LLVector3d camera_offset;
|
||||
|
||||
LLVector3 av_pos = !isAgentAvatarValid() ? LLVector3::zero : pAvatar->getRenderPosition();
|
||||
LLVector3 av_pos = !isAgentAvatarValid() ? LLVector3::zero : gAgentAvatarp->getRenderPosition();
|
||||
camera_offset.setVec( local_camera_offset );
|
||||
camera_position_global = frame_center_global + head_offset + camera_offset;
|
||||
|
||||
@@ -1916,8 +1911,8 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
LLVector3 vel = gAgent.getVelocity();
|
||||
|
||||
// lag by appropriate amount for flying
|
||||
F32 time_in_air = pAvatar->mTimeInAir.getElapsedTimeF32();
|
||||
if(!mCameraAnimating && pAvatar->mInAir && time_in_air > GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME)
|
||||
F32 time_in_air = gAgentAvatarp->mTimeInAir.getElapsedTimeF32();
|
||||
if(!mCameraAnimating && gAgentAvatarp->mInAir && time_in_air > GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME)
|
||||
{
|
||||
LLVector3 frame_at_axis = gAgent.getFrameAgent().getAtAxis();
|
||||
frame_at_axis -= projected_vec(frame_at_axis, gAgent.getReferenceUpVector());
|
||||
@@ -1929,7 +1924,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
||||
|
||||
lag_interp *= u;
|
||||
|
||||
if (gViewerWindow->getLeftMouseDown() && gViewerWindow->getLastPick().mObjectID == pAvatar->getID())
|
||||
if (gViewerWindow->getLeftMouseDown() && gViewerWindow->getLastPick().mObjectID == gAgentAvatarp->getID())
|
||||
{
|
||||
// disable camera lag when using mouse-directed steering
|
||||
target_lag.clearVec();
|
||||
|
||||
@@ -895,6 +895,7 @@ bool LLAppViewer::init()
|
||||
|
||||
LLViewerJoystick::getInstance()->init(false);
|
||||
|
||||
gGLActive = FALSE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1894,8 +1895,18 @@ bool LLAppViewer::initConfiguration()
|
||||
gSavedSettings.setString("VersionChannelName", LL_CHANNEL);
|
||||
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
gSavedSettings.setBOOL("ShowConsoleWindow", TRUE);
|
||||
gSavedSettings.setBOOL("AllowMultipleViewers", TRUE);
|
||||
// provide developer build only overrides for these control variables that are not
|
||||
// persisted to settings.xml
|
||||
LLControlVariable* c = gSavedSettings.getControl("ShowConsoleWindow");
|
||||
if (c)
|
||||
{
|
||||
c->setValue(true, false);
|
||||
}
|
||||
c = gSavedSettings.getControl("AllowMultipleViewers");
|
||||
if (c)
|
||||
{
|
||||
c->setValue(true, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
//*FIX:Mani - Set default to disabling watchdog mainloop
|
||||
@@ -1952,10 +1963,8 @@ bool LLAppViewer::initConfiguration()
|
||||
|
||||
if(!initParseCommandLine(clp))
|
||||
{
|
||||
llwarns
|
||||
<< "Error parsing command line options. Command Line options ignored."
|
||||
<< llendl;
|
||||
|
||||
llwarns << "Error parsing command line options. Command Line options ignored." << llendl;
|
||||
|
||||
llinfos << "Command line usage:\n" << clp << llendl;
|
||||
|
||||
std::ostringstream msg;
|
||||
@@ -3464,7 +3473,7 @@ void LLAppViewer::saveFinalSnapshot()
|
||||
snap_filename += gDirUtilp->getDirDelimiter();
|
||||
snap_filename += SCREEN_LAST_FILENAME;
|
||||
// use full pixel dimensions of viewer window (not post-scale dimensions)
|
||||
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, TRUE);
|
||||
gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, TRUE);
|
||||
mSavedFinalSnapshot = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2004,7 +2004,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
||||
}
|
||||
|
||||
// If we're snapping the position by more than 0.5m, update LLViewerStats::mAgentPositionSnaps
|
||||
if ( isAvatar() && gAgentAvatarp == this && (mag_sqr > 0.25f) )
|
||||
if ( asAvatar() && asAvatar()->isSelf() && (mag_sqr > 0.25f) )
|
||||
{
|
||||
LLViewerStats::getInstance()->mAgentPositionSnaps.push( diff.length() );
|
||||
}
|
||||
|
||||
@@ -316,10 +316,8 @@ void validate_framebuffer_object();
|
||||
|
||||
bool addDeferredAttachments(LLRenderTarget& target)
|
||||
{
|
||||
bool ret1 = target.addColorAttachment(GL_RGBA);
|
||||
bool ret2 = target.addColorAttachment(GL_RGBA);
|
||||
return ret1 && //specular
|
||||
ret2; //normal+z
|
||||
return target.addColorAttachment(GL_RGBA) && //specular
|
||||
target.addColorAttachment(GL_RGBA); //normal+z
|
||||
}
|
||||
|
||||
LLPipeline::LLPipeline() :
|
||||
@@ -2390,7 +2388,8 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
|
||||
llassert(vobj); // trying to catch a bad assumption
|
||||
if (vobj) // this test may not be needed, see above
|
||||
{
|
||||
if (vobj->isAvatar() && ((LLVOAvatar*)vobj)->isImpostor())
|
||||
const LLVOAvatar* av = vobj->asAvatar();
|
||||
if (av && av->isImpostor())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2839,6 +2838,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
|
||||
|
||||
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
|
||||
{
|
||||
llassert_always(drawablep->isVisible());
|
||||
/*LLSpatialGroup* group = drawablep->getSpatialGroup();
|
||||
if (!group || group->changeLOD())
|
||||
{
|
||||
@@ -4962,7 +4962,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
|
||||
light->setAmbient(LLColor4::black);
|
||||
light->setSpecular(LLColor4::black);
|
||||
}
|
||||
if (isAgentAvatarValid() &&
|
||||
if (gAgentAvatarp &&
|
||||
gAgentAvatarp->mSpecialRenderMode == 3)
|
||||
{
|
||||
LLColor4 light_color = LLColor4::white;
|
||||
@@ -5066,16 +5066,13 @@ void LLPipeline::enableLightsDynamic()
|
||||
U32 mask = 0xff & (~2); // Local lights
|
||||
enableLights(mask);
|
||||
|
||||
|
||||
LLVOAvatar* avatarp = gAgentAvatarp;
|
||||
|
||||
if (avatarp && getLightingDetail() <= 0)
|
||||
if (isAgentAvatarValid() && getLightingDetail() <= 0)
|
||||
{
|
||||
if (avatarp->mSpecialRenderMode == 0) // normal
|
||||
if (gAgentAvatarp->mSpecialRenderMode == 0) // normal
|
||||
{
|
||||
gPipeline.enableLightsAvatar();
|
||||
}
|
||||
else if (avatarp->mSpecialRenderMode >= 1) // anim preview
|
||||
else if (gAgentAvatarp->mSpecialRenderMode >= 1) // anim preview
|
||||
{
|
||||
gPipeline.enableLightsAvatarEdit(LLColor4(0.7f, 0.6f, 0.3f, 1.f));
|
||||
}
|
||||
@@ -7735,15 +7732,15 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
||||
{
|
||||
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
|
||||
{
|
||||
LLVOAvatar* agent = gAgentAvatarp;
|
||||
BOOL skip_avatar_update = FALSE;
|
||||
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
agent = NULL;
|
||||
skip_avatar_update = TRUE;
|
||||
}
|
||||
|
||||
if (agent)
|
||||
if (!skip_avatar_update)
|
||||
{
|
||||
agent->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
|
||||
gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
|
||||
}
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
@@ -7969,9 +7966,9 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
||||
//LLGLState::checkTextureChannels();
|
||||
//LLGLState::checkClientArrays();
|
||||
|
||||
if (agent)
|
||||
if (!skip_avatar_update)
|
||||
{
|
||||
agent->updateAttachmentVisibility(gAgentCamera.getCameraMode());
|
||||
gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
|
||||
}
|
||||
|
||||
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
|
||||
|
||||
Reference in New Issue
Block a user