summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-06-22 15:02:19 -0700
committerBryan O'Sullivan <bos@lindenlab.com>2009-06-22 15:02:19 -0700
commitbaa73fddd9287ddafd2d31551cb253b355ed910a (patch)
treee3f0986617fe6c0ee0a14df6aac13c6bb6f92507 /indra/newview/llviewerobject.cpp
parentdc3833f31b8a20220ddb1775e1625c016c397435 (diff)
parentfcaa1ad46fd1df4cfec9dee12caf6e7b5bf32136 (diff)
Merge with viewer-2.0.0-3 branch
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp33
1 files changed, 30 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index f0693c1b79..dc4f2b2990 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -79,6 +79,7 @@
#include "llviewertextureanim.h"
#include "llviewerwindow.h" // For getSpinAxis
#include "llvoavatar.h"
+#include "llvoavatarself.h"
#include "llvoclouds.h"
#include "llvograss.h"
#include "llvoground.h"
@@ -124,7 +125,18 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
case LL_PCODE_VOLUME:
res = new LLVOVolume(id, pcode, regionp); break;
case LL_PCODE_LEGACY_AVATAR:
- res = new LLVOAvatar(id, pcode, regionp); break;
+ {
+ if (id == gAgentID)
+ {
+ res = new LLVOAvatarSelf(id, pcode, regionp);
+ }
+ else
+ {
+ res = new LLVOAvatar(id, pcode, regionp);
+ }
+ static_cast<LLVOAvatar*>(res)->initInstance();
+ break;
+ }
case LL_PCODE_LEGACY_GRASS:
res = new LLVOGrass(id, pcode, regionp); break;
case LL_PCODE_LEGACY_PART_SYS:
@@ -2745,7 +2757,7 @@ void LLViewerObject::setPixelAreaAndAngle(LLAgent &agent)
F32 mid_scale = getMidScale();
F32 min_scale = getMinScale();
- // IW: esitmate - when close to large objects, computing range based on distance from center is no good
+ // IW: estimate - when close to large objects, computing range based on distance from center is no good
// to try to get a min distance from face, subtract min_scale/2 from the range.
// This means we'll load too much detail sometimes, but that's better than not enough
// I don't think there's a better way to do this without calculating distance per-poly
@@ -3730,7 +3742,6 @@ S32 LLViewerObject::setTEColor(const U8 te, const LLColor4& color)
else if (color != tep->getColor())
{
retval = LLPrimitive::setTEColor(te, color);
- //setChanged(TEXTURE);
if (mDrawable.notNull() && retval)
{
// These should only happen on updates which are not the initial update.
@@ -3777,6 +3788,22 @@ S32 LLViewerObject::setTETexGen(const U8 te, const U8 texgen)
return retval;
}
+S32 LLViewerObject::setTEMediaTexGen(const U8 te, const U8 media)
+{
+ S32 retval = 0;
+ const LLTextureEntry *tep = getTE(te);
+ if (!tep)
+ {
+ llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ }
+ else if (media != tep->getMediaTexGen())
+ {
+ retval = LLPrimitive::setTEMediaTexGen(te, media);
+ setChanged(TEXTURE);
+ }
+ return retval;
+}
+
S32 LLViewerObject::setTEShiny(const U8 te, const U8 shiny)
{
S32 retval = 0;