aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine
diff options
context:
space:
mode:
authorJeff Ames2007-12-20 05:43:02 +0000
committerJeff Ames2007-12-20 05:43:02 +0000
commitbe2ad79e52efb5eb543057e8e73fa601d0b91c87 (patch)
tree688a11b5737835b3cd46b2beaf01c6e9d23ace09 /OpenSim/Region/ScriptEngine/DotNetEngine
parent*Added event called after any movement is handled (OnClientMovement) - will b... (diff)
downloadopensim-SC_OLD-be2ad79e52efb5eb543057e8e73fa601d0b91c87.zip
opensim-SC_OLD-be2ad79e52efb5eb543057e8e73fa601d0b91c87.tar.gz
opensim-SC_OLD-be2ad79e52efb5eb543057e8e73fa601d0b91c87.tar.bz2
opensim-SC_OLD-be2ad79e52efb5eb543057e8e73fa601d0b91c87.tar.xz
Added patch from Johan. First attempt to solve the LibSL.Packet GC problem. Works with LibSL rev>1532
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs36
1 files changed, 11 insertions, 25 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 832ccf1..1cb307f 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
@@ -471,11 +471,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
471 } 471 }
472 else if (face == -1) 472 else if (face == -1)
473 { 473 {
474 texcolor = tex.DefaultTexture.RGBA;
475 texcolor.R = (float)Math.Abs(color.x - 1);
476 texcolor.G = (float)Math.Abs(color.y - 1);
477 texcolor.B = (float)Math.Abs(color.z - 1);
478 tex.DefaultTexture.RGBA = texcolor;
479 for (uint i = 0; i < 32; i++) 474 for (uint i = 0; i < 32; i++)
480 { 475 {
481 if (tex.FaceTextures[i] != null) 476 if (tex.FaceTextures[i] != null)
@@ -499,7 +494,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
499 LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); 494 LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length);
500 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 495 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
501 { 496 {
502 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); 497 return (double)((tex.FaceTextures[0].RGBA.A * 255) / 255);
503 } 498 }
504 if (face > -1) 499 if (face > -1)
505 { 500 {
@@ -522,9 +517,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
522 } 517 }
523 else if (face == -1) 518 else if (face == -1)
524 { 519 {
525 texcolor = tex.DefaultTexture.RGBA;
526 texcolor.A = (float)Math.Abs(alpha - 1);
527 tex.DefaultTexture.RGBA = texcolor;
528 for (int i = 0; i < 32; i++) 520 for (int i = 0; i < 32; i++)
529 { 521 {
530 if (tex.FaceTextures[i] != null) 522 if (tex.FaceTextures[i] != null)
@@ -548,7 +540,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
548 LSL_Types.Vector3 rgb; 540 LSL_Types.Vector3 rgb;
549 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 541 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
550 { 542 {
551 texcolor = tex.DefaultTexture.RGBA; 543 texcolor = tex.FaceTextures[0].RGBA;
552 rgb.x = (255 - (texcolor.R * 255)) / 255; 544 rgb.x = (255 - (texcolor.R * 255)) / 255;
553 rgb.y = (255 - (texcolor.G * 255)) / 255; 545 rgb.y = (255 - (texcolor.G * 255)) / 255;
554 rgb.z = (255 - (texcolor.B * 255)) / 255; 546 rgb.z = (255 - (texcolor.B * 255)) / 255;
@@ -586,7 +578,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
586 tex.FaceTextures[i].TextureID = new LLUUID(texture); 578 tex.FaceTextures[i].TextureID = new LLUUID(texture);
587 } 579 }
588 } 580 }
589 tex.DefaultTexture.TextureID = new LLUUID(texture);
590 m_host.UpdateTexture(tex); 581 m_host.UpdateTexture(tex);
591 return; 582 return;
592 } 583 }
@@ -617,8 +608,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
617 608
618 } 609 }
619 } 610 }
620 tex.DefaultTexture.RepeatU = (float)u;
621 tex.DefaultTexture.RepeatV = (float)v;
622 m_host.UpdateTexture(tex); 611 m_host.UpdateTexture(tex);
623 return; 612 return;
624 } 613 }
@@ -648,8 +637,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
648 tex.FaceTextures[i].OffsetV = (float)v; 637 tex.FaceTextures[i].OffsetV = (float)v;
649 } 638 }
650 } 639 }
651 tex.DefaultTexture.OffsetU = (float)u;
652 tex.DefaultTexture.OffsetV = (float)v;
653 m_host.UpdateTexture(tex); 640 m_host.UpdateTexture(tex);
654 return; 641 return;
655 } 642 }
@@ -677,7 +664,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
677 tex.FaceTextures[i].Rotation = (float)rotation; 664 tex.FaceTextures[i].Rotation = (float)rotation;
678 } 665 }
679 } 666 }
680 tex.DefaultTexture.Rotation = (float)rotation;
681 m_host.UpdateTexture(tex); 667 m_host.UpdateTexture(tex);
682 return; 668 return;
683 } 669 }
@@ -696,7 +682,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
696 { 682 {
697 LLObject.TextureEntryFace texface; 683 LLObject.TextureEntryFace texface;
698 texface = tex.GetFace((uint)face); 684 texface = tex.GetFace((uint)face);
699 return texface.TextureID.ToStringHyphenated(); 685 return texface.TextureID.ToString();
700 } 686 }
701 NotImplemented("llGetTexture"); 687 NotImplemented("llGetTexture");
702 return ""; 688 return "";
@@ -1035,7 +1021,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1035 1021
1036 public string llGetOwner() 1022 public string llGetOwner()
1037 { 1023 {
1038 return m_host.ObjectOwner.ToStringHyphenated(); 1024 return m_host.ObjectOwner.ToString();
1039 } 1025 }
1040 1026
1041 public void llInstantMessage(string user, string message) 1027 public void llInstantMessage(string user, string message)
@@ -1063,7 +1049,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1063 1049
1064 public string llGetKey() 1050 public string llGetKey()
1065 { 1051 {
1066 return m_host.UUID.ToStringHyphenated(); 1052 return m_host.UUID.ToString();
1067 } 1053 }
1068 1054
1069 public void llSetBuoyancy(double buoyancy) 1055 public void llSetBuoyancy(double buoyancy)
@@ -1277,7 +1263,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1277 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 1263 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
1278 if (part != null) 1264 if (part != null)
1279 { 1265 {
1280 return part.UUID.ToStringHyphenated(); 1266 return part.UUID.ToString();
1281 } 1267 }
1282 else 1268 else
1283 { 1269 {
@@ -1621,11 +1607,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
1621 { 1607 {
1622 return "00000000-0000-0000-0000-000000000000"; 1608 return "00000000-0000-0000-0000-000000000000";
1623 } 1609 }
1624 //return OpenSim.Framework.ToStringHyphenated(src[index]); 1610 //return OpenSim.Framework.ToString(src[index]);
1625 LLUUID tmpkey; 1611 LLUUID tmpkey;
1626 if (LLUUID.TryParse(src.Data[index].ToString(), out tmpkey)) 1612 if (LLUUID.TryParse(src.Data[index].ToString(), out tmpkey))
1627 { 1613 {
1628 return tmpkey.ToStringHyphenated(); 1614 return tmpkey.ToString();
1629 } 1615 }
1630 else 1616 else
1631 { 1617 {
@@ -2380,7 +2366,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
2380 2366
2381 public string llGetCreator() 2367 public string llGetCreator()
2382 { 2368 {
2383 return m_host.ObjectCreator.ToStringHyphenated(); 2369 return m_host.ObjectCreator.ToString();
2384 } 2370 }
2385 2371
2386 public string llGetTimestamp() 2372 public string llGetTimestamp()
@@ -2807,14 +2793,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
2807 LLUUID createdTexture = 2793 LLUUID createdTexture =
2808 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 2794 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
2809 extraParams, timer); 2795 extraParams, timer);
2810 return createdTexture.ToStringHyphenated(); 2796 return createdTexture.ToString();
2811 } 2797 }
2812 else 2798 else
2813 { 2799 {
2814 //TODO update existing dynamic textures 2800 //TODO update existing dynamic textures
2815 } 2801 }
2816 2802
2817 return LLUUID.Zero.ToStringHyphenated(); 2803 return LLUUID.Zero.ToString();
2818 } 2804 }
2819 2805
2820 private void NotImplemented(string Command) 2806 private void NotImplemented(string Command)