bug fix: dynamic testures set to ALL_SIDES, preserve other face data already present

0.9.0-post-fixes
UbitUmarov 2017-07-07 04:57:57 +01:00
parent dfef16297b
commit ead95e85c5
1 changed files with 5 additions and 1 deletions

View File

@ -428,12 +428,16 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
// FIXME: Need to return the appropriate ID if only a single face is replaced.
oldID = tmptex.DefaultTexture.TextureID;
// not using parts number of faces because that fails on old meshs
if (Face == ALL_SIDES)
{
oldID = tmptex.DefaultTexture.TextureID;
tmptex.DefaultTexture.TextureID = textureID;
for(int i = 0; i < tmptex.FaceTextures.Length; i++)
tmptex.FaceTextures[i] = null;
{
if(tmptex.FaceTextures[i] != null)
tmptex.FaceTextures[i].TextureID = textureID;
}
}
else
{