aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCharles Krinke2007-12-22 22:49:37 +0000
committerCharles Krinke2007-12-22 22:49:37 +0000
commit5cd6f235ce858bd88820784375ef51d27cb039a1 (patch)
tree9861a2ff4a501195291723ec5e21ed231cd000eb
parentRemove a now unnecessary bit of inventory log verbosity (diff)
downloadopensim-SC_OLD-5cd6f235ce858bd88820784375ef51d27cb039a1.zip
opensim-SC_OLD-5cd6f235ce858bd88820784375ef51d27cb039a1.tar.gz
opensim-SC_OLD-5cd6f235ce858bd88820784375ef51d27cb039a1.tar.bz2
opensim-SC_OLD-5cd6f235ce858bd88820784375ef51d27cb039a1.tar.xz
Thank you, Alondria for:
Reverts the LSL Texture/Color functions back to the original code, allowing them to function again
Diffstat (limited to '')
-rw-r--r--CONTRIBUTORS.txt2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs35
3 files changed, 36 insertions, 5 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 5457f71..d4b1a8e 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -21,7 +21,9 @@ OpenSim Developers
21 21
22Patches 22Patches
23 23
24* Alondria
24* BigFootAg 25* BigFootAg
26* CharlieO
25* Danx0r 27* Danx0r
26* Dalien 28* Dalien
27* Darok 29* Darok
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index f3be4bd..5398de0 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1255,12 +1255,12 @@ namespace OpenSim.Region.Environment.Scenes
1255 tex.FaceTextures[i].RGBA = tmpcolor; 1255 tex.FaceTextures[i].RGBA = tmpcolor;
1256 } 1256 }
1257 } 1257 }
1258 tmpcolor = tex.FaceTextures[0].RGBA; 1258 tmpcolor = tex.DefaultTexture.RGBA;
1259 tmpcolor.A = tmpcolor.A * 255; 1259 tmpcolor.A = tmpcolor.A * 255;
1260 tmpcolor.R = tmpcolor.R * 255; 1260 tmpcolor.R = tmpcolor.R * 255;
1261 tmpcolor.G = tmpcolor.G * 255; 1261 tmpcolor.G = tmpcolor.G * 255;
1262 tmpcolor.B = tmpcolor.B * 255; 1262 tmpcolor.B = tmpcolor.B * 255;
1263 tex.FaceTextures[0].RGBA = tmpcolor; 1263 tex.DefaultTexture.RGBA = tmpcolor;
1264 UpdateTextureEntry(tex.ToBytes()); 1264 UpdateTextureEntry(tex.ToBytes());
1265 } 1265 }
1266 1266
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 }