All your codebase are belong to us.
This commit is contained in:
@@ -1142,12 +1142,12 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
|
||||
const LLTextureEntry* te = getTE(face_index);
|
||||
scale_s[face_index] = (F32) te->mScaleS;
|
||||
scale_t[face_index] = (F32) te->mScaleT;
|
||||
offset_s[face_index] = (S16) llround((llclamp(te->mOffsetS,-1.0f,1.0f) * (F32)0x7FFF)) ;
|
||||
offset_t[face_index] = (S16) llround((llclamp(te->mOffsetT,-1.0f,1.0f) * (F32)0x7FFF)) ;
|
||||
image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * TEXTURE_ROTATION_PACK_FACTOR));
|
||||
offset_s[face_index] = (S16) llmath::llround((llclamp(te->mOffsetS,-1.0f,1.0f) * (F32)0x7FFF)) ;
|
||||
offset_t[face_index] = (S16) llmath::llround((llclamp(te->mOffsetT,-1.0f,1.0f) * (F32)0x7FFF)) ;
|
||||
image_rot[face_index] = (S16) llmath::llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * TEXTURE_ROTATION_PACK_FACTOR));
|
||||
bump[face_index] = te->getBumpShinyFullbright();
|
||||
media_flags[face_index] = te->getMediaTexGen();
|
||||
glow[face_index] = (U8) llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF));
|
||||
glow[face_index] = (U8) llmath::llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF));
|
||||
|
||||
// Directly sending material_ids is not safe!
|
||||
memcpy(&material_data[face_index*16],getTE(face_index)->getMaterialID().get(),16); /* Flawfinder: ignore */
|
||||
@@ -1227,12 +1227,12 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
|
||||
const LLTextureEntry* te = getTE(face_index);
|
||||
scale_s[face_index] = (F32) te->mScaleS;
|
||||
scale_t[face_index] = (F32) te->mScaleT;
|
||||
offset_s[face_index] = (S16) llround((llclamp(te->mOffsetS,-1.0f,1.0f) * (F32)0x7FFF)) ;
|
||||
offset_t[face_index] = (S16) llround((llclamp(te->mOffsetT,-1.0f,1.0f) * (F32)0x7FFF)) ;
|
||||
image_rot[face_index] = (S16) llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * TEXTURE_ROTATION_PACK_FACTOR));
|
||||
offset_s[face_index] = (S16) llmath::llround((llclamp(te->mOffsetS,-1.0f,1.0f) * (F32)0x7FFF)) ;
|
||||
offset_t[face_index] = (S16) llmath::llround((llclamp(te->mOffsetT,-1.0f,1.0f) * (F32)0x7FFF)) ;
|
||||
image_rot[face_index] = (S16) llmath::llround(((fmod(te->mRotation, F_TWO_PI)/F_TWO_PI) * TEXTURE_ROTATION_PACK_FACTOR));
|
||||
bump[face_index] = te->getBumpShinyFullbright();
|
||||
media_flags[face_index] = te->getMediaTexGen();
|
||||
glow[face_index] = (U8) llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF));
|
||||
glow[face_index] = (U8) llmath::llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF));
|
||||
|
||||
// Directly sending material_ids is not safe!
|
||||
memcpy(&material_data[face_index*16],getTE(face_index)->getMaterialID().get(),16); /* Flawfinder: ignore */
|
||||
|
||||
Reference in New Issue
Block a user