summaryrefslogtreecommitdiff
path: root/indra/llprimitive/lltextureentry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive/lltextureentry.cpp')
-rw-r--r--indra/llprimitive/lltextureentry.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 3c1d031ff5..34eff17519 100644
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -403,7 +403,7 @@ S32 LLTextureEntry::setOffsetT(F32 t)
S32 LLTextureEntry::setRotation(F32 theta)
{
- if (mRotation != theta)
+ if (mRotation != theta && llfinite(theta))
{
mRotation = theta;
return TEM_CHANGE_TEXTURE;
@@ -423,24 +423,10 @@ S32 LLTextureEntry::setBumpShinyFullbright(U8 bump)
S32 LLTextureEntry::setMediaTexGen(U8 media)
{
- if (mMediaFlags != media)
- {
- mMediaFlags = media;
-
- // Special code for media handling
- if( hasMedia() && mMediaEntry == NULL)
- {
- mMediaEntry = new LLMediaEntry;
- }
- else if ( ! hasMedia() && mMediaEntry != NULL)
- {
- delete mMediaEntry;
- mMediaEntry = NULL;
- }
-
- return TEM_CHANGE_MEDIA;
- }
- return TEM_CHANGE_NONE;
+ S32 result = TEM_CHANGE_NONE;
+ result |= setTexGen(media & TEM_TEX_GEN_MASK);
+ result |= setMediaFlags(media & TEM_MEDIA_MASK);
+ return result;
}
S32 LLTextureEntry::setBumpmap(U8 bump)