LLAgentCamera transition (1/2)
This commit is contained in:
@@ -73,106 +73,6 @@
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
BOOL LLAgent::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position)
|
||||
{
|
||||
if(gSavedSettings.getBOOL("PrivateLookAt"))
|
||||
{
|
||||
if(!mLookAt || mLookAt->isDead())
|
||||
return FALSE;
|
||||
position.clearVec();
|
||||
return mLookAt->setLookAt(LOOKAT_TARGET_NONE, mAvatarObject, position);
|
||||
}
|
||||
|
||||
if(object && object->isAttachment())
|
||||
{
|
||||
LLViewerObject* parent = object;
|
||||
while(parent)
|
||||
{
|
||||
if (parent == mAvatarObject)
|
||||
{
|
||||
// looking at an attachment on ourselves, which we don't want to do
|
||||
object = mAvatarObject;
|
||||
position.clearVec();
|
||||
}
|
||||
parent = (LLViewerObject*)parent->getParent();
|
||||
}
|
||||
}
|
||||
if(!mLookAt || mLookAt->isDead())
|
||||
{
|
||||
mLookAt = (LLHUDEffectLookAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_LOOKAT);
|
||||
mLookAt->setSourceObject(mAvatarObject);
|
||||
}
|
||||
|
||||
return mLookAt->setLookAt(target_type, object, position);
|
||||
}
|
||||
|
||||
BOOL LLAgent::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
|
||||
{
|
||||
// disallow pointing at attachments and avatars
|
||||
if (object && (object->isAttachment() || object->isAvatar()) || gSavedSettings.getBOOL("DisablePointAtAndBeam"))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(!mPointAt || mPointAt->isDead())
|
||||
{
|
||||
mPointAt = (LLHUDEffectPointAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINTAT);
|
||||
mPointAt->setSourceObject(mAvatarObject);
|
||||
}
|
||||
|
||||
return mPointAt->setPointAt(target_type, object, position);
|
||||
}
|
||||
|
||||
ELookAtType LLAgent::getLookAtType()
|
||||
{
|
||||
if (mLookAt)
|
||||
{
|
||||
return mLookAt->getLookAtType();
|
||||
}
|
||||
|
||||
return LOOKAT_TARGET_NONE;
|
||||
}
|
||||
|
||||
EPointAtType LLAgent::getPointAtType()
|
||||
{
|
||||
if (mPointAt)
|
||||
{
|
||||
return mPointAt->getPointAtType();
|
||||
}
|
||||
|
||||
return POINTAT_TARGET_NONE;
|
||||
}
|
||||
|
||||
// Draw a representation of current autopilot target
|
||||
void LLAgent::renderAutoPilotTarget()
|
||||
{
|
||||
if (mAutoPilot)
|
||||
{
|
||||
F32 height_meters;
|
||||
LLVector3d target_global;
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
|
||||
// not textured
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
// lovely green
|
||||
glColor4f(0.f, 1.f, 1.f, 1.f);
|
||||
|
||||
target_global = mAutoPilotTargetGlobal;
|
||||
|
||||
gGL.translatef((F32)(target_global.mdV[VX]), (F32)(target_global.mdV[VY]), (F32)(target_global.mdV[VZ]));
|
||||
|
||||
height_meters = 1.f;
|
||||
|
||||
glScalef(height_meters, height_meters, height_meters);
|
||||
|
||||
gSphere.render(1500.f);
|
||||
|
||||
gGL.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
extern BOOL gDebugSelect;
|
||||
|
||||
@@ -1156,3 +1056,4 @@ void LLViewerObjectList::renderObjectBeacons()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user