aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs35
1 files changed, 32 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 1cb307f..a0cd43a 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -481,6 +481,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
481 texcolor.B = (float)Math.Abs(color.z - 1); 481 texcolor.B = (float)Math.Abs(color.z - 1);
482 tex.FaceTextures[i].RGBA = texcolor; 482 tex.FaceTextures[i].RGBA = texcolor;
483 } 483 }
484 texcolor = tex.DefaultTexture.RGBA;
485 texcolor.R = (float)Math.Abs(color.x - 1);
486 texcolor.G = (float)Math.Abs(color.y - 1);
487 texcolor.B = (float)Math.Abs(color.z - 1);
488 tex.DefaultTexture.RGBA = texcolor;
484 } 489 }
485 m_host.UpdateTexture(tex); 490 m_host.UpdateTexture(tex);
486 return; 491 return;
@@ -494,7 +499,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
494 LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); 499 LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length);
495 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 500 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
496 { 501 {
497 return (double)((tex.FaceTextures[0].RGBA.A * 255) / 255); 502 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255);
498 } 503 }
499 if (face > -1) 504 if (face > -1)
500 { 505 {
@@ -526,6 +531,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
526 tex.FaceTextures[i].RGBA = texcolor; 531 tex.FaceTextures[i].RGBA = texcolor;
527 } 532 }
528 } 533 }
534 texcolor = tex.DefaultTexture.RGBA;
535 texcolor.A = (float)Math.Abs(alpha - 1);
536 tex.DefaultTexture.RGBA = texcolor;
529 m_host.UpdateTexture(tex); 537 m_host.UpdateTexture(tex);
530 return; 538 return;
531 } 539 }
@@ -540,7 +548,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
540 LSL_Types.Vector3 rgb; 548 LSL_Types.Vector3 rgb;
541 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 549 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
542 { 550 {
543 texcolor = tex.FaceTextures[0].RGBA; 551 texcolor = tex.DefaultTexture.RGBA;
544 rgb.x = (255 - (texcolor.R * 255)) / 255; 552 rgb.x = (255 - (texcolor.R * 255)) / 255;
545 rgb.y = (255 - (texcolor.G * 255)) / 255; 553 rgb.y = (255 - (texcolor.G * 255)) / 255;
546 rgb.z = (255 - (texcolor.B * 255)) / 255; 554 rgb.z = (255 - (texcolor.B * 255)) / 255;
@@ -578,6 +586,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
578 tex.FaceTextures[i].TextureID = new LLUUID(texture); 586 tex.FaceTextures[i].TextureID = new LLUUID(texture);
579 } 587 }
580 } 588 }
589 tex.DefaultTexture.TextureID = new LLUUID(texture);
581 m_host.UpdateTexture(tex); 590 m_host.UpdateTexture(tex);
582 return; 591 return;
583 } 592 }
@@ -605,9 +614,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
605 { 614 {
606 tex.FaceTextures[i].RepeatU = (float)u; 615 tex.FaceTextures[i].RepeatU = (float)u;
607 tex.FaceTextures[i].RepeatV = (float)v; 616 tex.FaceTextures[i].RepeatV = (float)v;
608
609 } 617 }
610 } 618 }
619 tex.DefaultTexture.RepeatU = (float)u;
620 tex.DefaultTexture.RepeatV = (float)v;
611 m_host.UpdateTexture(tex); 621 m_host.UpdateTexture(tex);
612 return; 622 return;
613 } 623 }
@@ -637,6 +647,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
637 tex.FaceTextures[i].OffsetV = (float)v; 647 tex.FaceTextures[i].OffsetV = (float)v;
638 } 648 }
639 } 649 }
650 tex.DefaultTexture.OffsetU = (float)u;
651 tex.DefaultTexture.OffsetV = (float)v;
640 m_host.UpdateTexture(tex); 652 m_host.UpdateTexture(tex);
641 return; 653 return;
642 } 654 }
@@ -664,6 +676,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
664 tex.FaceTextures[i].Rotation = (float)rotation; 676 tex.FaceTextures[i].Rotation = (float)rotation;
665 } 677 }
666 } 678 }
679 tex.DefaultTexture.Rotation = (float)rotation;
667 m_host.UpdateTexture(tex); 680 m_host.UpdateTexture(tex);
668 return; 681 return;
669 } 682 }
@@ -1191,6 +1204,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1191 tex.FaceTextures[i].RGBA = texcolor; 1204 tex.FaceTextures[i].RGBA = texcolor;
1192 } 1205 }
1193 } 1206 }
1207 texcolor = tex.DefaultTexture.RGBA;
1208 texcolor.R = (float)Math.Abs(color.x - 1);
1209 texcolor.G = (float)Math.Abs(color.y - 1);
1210 texcolor.B = (float)Math.Abs(color.z - 1);
1211 tex.DefaultTexture.RGBA = texcolor;
1194 part.UpdateTexture(tex); 1212 part.UpdateTexture(tex);
1195 return; 1213 return;
1196 } 1214 }
@@ -1232,6 +1250,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1232 tex.FaceTextures[i].RGBA = texcolor; 1250 tex.FaceTextures[i].RGBA = texcolor;
1233 } 1251 }
1234 } 1252 }
1253 texcolor = tex.DefaultTexture.RGBA;
1254 texcolor.R = (float)Math.Abs(color.x - 1);
1255 texcolor.G = (float)Math.Abs(color.y - 1);
1256 texcolor.B = (float)Math.Abs(color.z - 1);
1257 tex.DefaultTexture.RGBA = texcolor;
1235 part.UpdateTexture(tex); 1258 part.UpdateTexture(tex);
1236 } 1259 }
1237 } 1260 }
@@ -2403,6 +2426,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
2403 tex.FaceTextures[i].RGBA = texcolor; 2426 tex.FaceTextures[i].RGBA = texcolor;
2404 } 2427 }
2405 } 2428 }
2429 texcolor = tex.DefaultTexture.RGBA;
2430 texcolor.A = (float)Math.Abs(alpha - 1);
2431 tex.DefaultTexture.RGBA = texcolor;
2406 part.UpdateTexture(tex); 2432 part.UpdateTexture(tex);
2407 return; 2433 return;
2408 } 2434 }
@@ -2438,6 +2464,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
2438 tex.FaceTextures[i].RGBA = texcolor; 2464 tex.FaceTextures[i].RGBA = texcolor;
2439 } 2465 }
2440 } 2466 }
2467 texcolor = tex.DefaultTexture.RGBA;
2468 texcolor.A = (float)Math.Abs(alpha - 1);
2469 tex.DefaultTexture.RGBA = texcolor;
2441 part.UpdateTexture(tex); 2470 part.UpdateTexture(tex);
2442 } 2471 }
2443 } 2472 }