diff options
author | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
commit | 7d89e122930be39e84a6d174548fa2d12ac0484a (patch) | |
tree | e5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |
parent | * minor: speculatively try a change to bamboo.build to see if this generates ... (diff) | |
download | opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2 opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz |
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle.
* This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big!
* Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 586 |
1 files changed, 305 insertions, 281 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index bcdff8f..0c5d60b 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -32,9 +32,8 @@ using System.Runtime.Remoting.Lifetime; | |||
32 | using System.Text; | 32 | using System.Text; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using Axiom.Math; | 35 | using OpenMetaverse; |
36 | using libsecondlife; | 36 | using OpenMetaverse.Packets; |
37 | using libsecondlife.Packets; | ||
38 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Communications.Cache; | 38 | using OpenSim.Framework.Communications.Cache; |
40 | using OpenSim.Region.Environment; | 39 | using OpenSim.Region.Environment; |
@@ -60,10 +59,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
60 | internal ScriptEngineBase.ScriptEngine m_ScriptEngine; | 59 | internal ScriptEngineBase.ScriptEngine m_ScriptEngine; |
61 | internal SceneObjectPart m_host; | 60 | internal SceneObjectPart m_host; |
62 | internal uint m_localID; | 61 | internal uint m_localID; |
63 | internal LLUUID m_itemID; | 62 | internal UUID m_itemID; |
64 | internal bool throwErrorOnNotImplemented = true; | 63 | internal bool throwErrorOnNotImplemented = true; |
65 | 64 | ||
66 | public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) | 65 | public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) |
67 | { | 66 | { |
68 | m_ScriptEngine = ScriptEngine; | 67 | m_ScriptEngine = ScriptEngine; |
69 | m_host = host; | 68 | m_host = host; |
@@ -151,11 +150,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
151 | return World.GetCommander(name); | 150 | return World.GetCommander(name); |
152 | } | 151 | } |
153 | 152 | ||
154 | private LLUUID InventorySelf() | 153 | private UUID InventorySelf() |
155 | { | 154 | { |
156 | LLUUID invItemID = new LLUUID(); | 155 | UUID invItemID = new UUID(); |
157 | 156 | ||
158 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 157 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
159 | { | 158 | { |
160 | if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) | 159 | if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) |
161 | { | 160 | { |
@@ -167,54 +166,54 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
167 | return invItemID; | 166 | return invItemID; |
168 | } | 167 | } |
169 | 168 | ||
170 | private LLUUID InventoryKey(string name, int type) | 169 | private UUID InventoryKey(string name, int type) |
171 | { | 170 | { |
172 | m_host.AddScriptLPS(1); | 171 | m_host.AddScriptLPS(1); |
173 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 172 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
174 | { | 173 | { |
175 | if (inv.Value.Name == name) | 174 | if (inv.Value.Name == name) |
176 | { | 175 | { |
177 | if (inv.Value.Type != type) | 176 | if (inv.Value.Type != type) |
178 | return LLUUID.Zero; | 177 | return UUID.Zero; |
179 | 178 | ||
180 | return inv.Value.AssetID.ToString(); | 179 | return inv.Value.AssetID.ToString(); |
181 | } | 180 | } |
182 | } | 181 | } |
183 | return LLUUID.Zero; | 182 | return UUID.Zero; |
184 | } | 183 | } |
185 | 184 | ||
186 | private LLUUID InventoryKey(string name) | 185 | private UUID InventoryKey(string name) |
187 | { | 186 | { |
188 | m_host.AddScriptLPS(1); | 187 | m_host.AddScriptLPS(1); |
189 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 188 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
190 | { | 189 | { |
191 | if (inv.Value.Name == name) | 190 | if (inv.Value.Name == name) |
192 | { | 191 | { |
193 | return inv.Value.AssetID.ToString(); | 192 | return inv.Value.AssetID.ToString(); |
194 | } | 193 | } |
195 | } | 194 | } |
196 | return LLUUID.Zero; | 195 | return UUID.Zero; |
197 | } | 196 | } |
198 | 197 | ||
199 | 198 | ||
200 | /// <summary> | 199 | /// <summary> |
201 | /// accepts a valid LLUUID, -or- a name of an inventory item. | 200 | /// accepts a valid UUID, -or- a name of an inventory item. |
202 | /// Returns a valid LLUUID or LLUUID.Zero if key invalid and item not found | 201 | /// Returns a valid UUID or UUID.Zero if key invalid and item not found |
203 | /// in prim inventory. | 202 | /// in prim inventory. |
204 | /// </summary> | 203 | /// </summary> |
205 | /// <param name="k"></param> | 204 | /// <param name="k"></param> |
206 | /// <returns></returns> | 205 | /// <returns></returns> |
207 | private LLUUID KeyOrName(string k) | 206 | private UUID KeyOrName(string k) |
208 | { | 207 | { |
209 | LLUUID key = LLUUID.Zero; | 208 | UUID key = UUID.Zero; |
210 | 209 | ||
211 | // if we can parse the string as a key, use it. | 210 | // if we can parse the string as a key, use it. |
212 | if (LLUUID.TryParse(k, out key)) | 211 | if (UUID.TryParse(k, out key)) |
213 | { | 212 | { |
214 | return key; | 213 | return key; |
215 | } | 214 | } |
216 | // else try to locate the name in inventory of object. found returns key, | 215 | // else try to locate the name in inventory of object. found returns key, |
217 | // not found returns LLUUID.Zero which will translate to the default particle texture | 216 | // not found returns UUID.Zero which will translate to the default particle texture |
218 | else | 217 | else |
219 | { | 218 | { |
220 | return InventoryKey(k); | 219 | return InventoryKey(k); |
@@ -573,7 +572,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
573 | if (text.Length > 1023) | 572 | if (text.Length > 1023) |
574 | text = text.Substring(0, 1023); | 573 | text = text.Substring(0, 1023); |
575 | 574 | ||
576 | World.SimChat(Helpers.StringToField(text), | 575 | World.SimChat(Utils.StringToBytes(text), |
577 | ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); | 576 | ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); |
578 | 577 | ||
579 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 578 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
@@ -587,7 +586,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
587 | if (text.Length > 1023) | 586 | if (text.Length > 1023) |
588 | text = text.Substring(0, 1023); | 587 | text = text.Substring(0, 1023); |
589 | 588 | ||
590 | World.SimChat(Helpers.StringToField(text), | 589 | World.SimChat(Utils.StringToBytes(text), |
591 | ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); | 590 | ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); |
592 | 591 | ||
593 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 592 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
@@ -601,7 +600,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
601 | if (text.Length > 1023) | 600 | if (text.Length > 1023) |
602 | text = text.Substring(0, 1023); | 601 | text = text.Substring(0, 1023); |
603 | 602 | ||
604 | World.SimChat(Helpers.StringToField(text), | 603 | World.SimChat(Utils.StringToBytes(text), |
605 | ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true); | 604 | ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true); |
606 | 605 | ||
607 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 606 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
@@ -628,8 +627,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
628 | public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) | 627 | public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) |
629 | { | 628 | { |
630 | m_host.AddScriptLPS(1); | 629 | m_host.AddScriptLPS(1); |
631 | LLUUID keyID; | 630 | UUID keyID; |
632 | LLUUID.TryParse(ID, out keyID); | 631 | UUID.TryParse(ID, out keyID); |
633 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 632 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
634 | return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); | 633 | return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); |
635 | } | 634 | } |
@@ -651,8 +650,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
651 | public void llSensor(string name, string id, int type, double range, double arc) | 650 | public void llSensor(string name, string id, int type, double range, double arc) |
652 | { | 651 | { |
653 | m_host.AddScriptLPS(1); | 652 | m_host.AddScriptLPS(1); |
654 | LLUUID keyID = LLUUID.Zero; | 653 | UUID keyID = UUID.Zero; |
655 | LLUUID.TryParse(id, out keyID); | 654 | UUID.TryParse(id, out keyID); |
656 | 655 | ||
657 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); | 656 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); |
658 | } | 657 | } |
@@ -660,8 +659,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
660 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) | 659 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) |
661 | { | 660 | { |
662 | m_host.AddScriptLPS(1); | 661 | m_host.AddScriptLPS(1); |
663 | LLUUID keyID = LLUUID.Zero; | 662 | UUID keyID = UUID.Zero; |
664 | LLUUID.TryParse(id, out keyID); | 663 | UUID.TryParse(id, out keyID); |
665 | 664 | ||
666 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); | 665 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); |
667 | } | 666 | } |
@@ -672,7 +671,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
672 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.UnSetSenseRepeaterEvents(m_localID, m_itemID); | 671 | m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.UnSetSenseRepeaterEvents(m_localID, m_itemID); |
673 | } | 672 | } |
674 | 673 | ||
675 | public string resolveName(LLUUID objecUUID) | 674 | public string resolveName(UUID objecUUID) |
676 | { | 675 | { |
677 | // try avatar username surname | 676 | // try avatar username surname |
678 | CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID); | 677 | CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID); |
@@ -708,7 +707,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
708 | { | 707 | { |
709 | if ((number >= 0) && (number <= SenseList.Length)) | 708 | if ((number >= 0) && (number <= SenseList.Length)) |
710 | { | 709 | { |
711 | LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; | 710 | UUID SensedUUID = (UUID)SenseList.Data[number]; |
712 | return resolveName(SensedUUID); | 711 | return resolveName(SensedUUID); |
713 | } | 712 | } |
714 | } | 713 | } |
@@ -741,14 +740,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
741 | return String.Empty; | 740 | return String.Empty; |
742 | } | 741 | } |
743 | 742 | ||
744 | public LLUUID uuidDetectedKey(int number) | 743 | public UUID uuidDetectedKey(int number) |
745 | { | 744 | { |
746 | LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID); | 745 | LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID); |
747 | if (SenseList != null) | 746 | if (SenseList != null) |
748 | { | 747 | { |
749 | if ((number >= 0) && (number < SenseList.Length)) | 748 | if ((number >= 0) && (number < SenseList.Length)) |
750 | { | 749 | { |
751 | LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; | 750 | UUID SensedUUID = (UUID)SenseList.Data[number]; |
752 | return SensedUUID; | 751 | return SensedUUID; |
753 | } | 752 | } |
754 | } | 753 | } |
@@ -768,14 +767,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
768 | { | 767 | { |
769 | if (script.llDetectParams._key[number]) | 768 | if (script.llDetectParams._key[number]) |
770 | { | 769 | { |
771 | return new LLUUID(script.llDetectParams._key[number]); | 770 | return new UUID(script.llDetectParams._key[number]); |
772 | } | 771 | } |
773 | } | 772 | } |
774 | } | 773 | } |
775 | } | 774 | } |
776 | } | 775 | } |
777 | } | 776 | } |
778 | return LLUUID.Zero; | 777 | return UUID.Zero; |
779 | } | 778 | } |
780 | 779 | ||
781 | public EntityBase entityDetectedKey(int number) | 780 | public EntityBase entityDetectedKey(int number) |
@@ -785,7 +784,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
785 | { | 784 | { |
786 | if ((number >= 0) && (number < SenseList.Length)) | 785 | if ((number >= 0) && (number < SenseList.Length)) |
787 | { | 786 | { |
788 | LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; | 787 | UUID SensedUUID = (UUID)SenseList.Data[number]; |
789 | EntityBase SensedObject = null; | 788 | EntityBase SensedObject = null; |
790 | lock (World.Entities) | 789 | lock (World.Entities) |
791 | { | 790 | { |
@@ -810,7 +809,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
810 | { | 809 | { |
811 | if (script.llDetectParams._key[number]) | 810 | if (script.llDetectParams._key[number]) |
812 | { | 811 | { |
813 | LLUUID SensedUUID = new LLUUID(script.llDetectParams._key[number]); | 812 | UUID SensedUUID = new UUID(script.llDetectParams._key[number]); |
814 | EntityBase SensedObject = null; | 813 | EntityBase SensedObject = null; |
815 | lock (World.Entities) | 814 | lock (World.Entities) |
816 | { | 815 | { |
@@ -830,8 +829,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
830 | public string llDetectedKey(int number) | 829 | public string llDetectedKey(int number) |
831 | { | 830 | { |
832 | m_host.AddScriptLPS(1); | 831 | m_host.AddScriptLPS(1); |
833 | LLUUID SensedUUID = uuidDetectedKey(number); | 832 | UUID SensedUUID = uuidDetectedKey(number); |
834 | if (SensedUUID == LLUUID.Zero) | 833 | if (SensedUUID == UUID.Zero) |
835 | return String.Empty; | 834 | return String.Empty; |
836 | return SensedUUID.ToString(); | 835 | return SensedUUID.ToString(); |
837 | } | 836 | } |
@@ -843,7 +842,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
843 | EntityBase SensedObject = entityDetectedKey(number); | 842 | EntityBase SensedObject = entityDetectedKey(number); |
844 | if (SensedObject ==null) | 843 | if (SensedObject ==null) |
845 | return String.Empty; | 844 | return String.Empty; |
846 | LLUUID SensedUUID = uuidDetectedKey(number); | 845 | UUID SensedUUID = uuidDetectedKey(number); |
847 | if (World.GetScenePresence(SensedUUID) == null) | 846 | if (World.GetScenePresence(SensedUUID) == null) |
848 | { | 847 | { |
849 | // sensed object is not an avatar | 848 | // sensed object is not an avatar |
@@ -870,7 +869,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
870 | return 0; | 869 | return 0; |
871 | int mask = 0; | 870 | int mask = 0; |
872 | 871 | ||
873 | LLUUID SensedUUID = uuidDetectedKey(number); | 872 | UUID SensedUUID = uuidDetectedKey(number); |
874 | LSL_Types.Vector3 ZeroVector = new LSL_Types.Vector3(0, 0, 0); | 873 | LSL_Types.Vector3 ZeroVector = new LSL_Types.Vector3(0, 0, 0); |
875 | 874 | ||
876 | if (World.GetScenePresence(SensedUUID) != null) mask |= 0x01; // actor | 875 | if (World.GetScenePresence(SensedUUID) != null) mask |= 0x01; // actor |
@@ -888,7 +887,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
888 | EntityBase SensedObject = entityDetectedKey(number); | 887 | EntityBase SensedObject = entityDetectedKey(number); |
889 | if (SensedObject == null) | 888 | if (SensedObject == null) |
890 | return new LSL_Types.Vector3(0, 0, 0); | 889 | return new LSL_Types.Vector3(0, 0, 0); |
891 | return new LSL_Types.Vector3(SensedObject.AbsolutePosition.X,SensedObject.AbsolutePosition.Y,SensedObject.AbsolutePosition.Z); | 890 | return new LSL_Types.Vector3( |
891 | SensedObject.AbsolutePosition.X, | ||
892 | SensedObject.AbsolutePosition.Y, | ||
893 | SensedObject.AbsolutePosition.Z); | ||
892 | } | 894 | } |
893 | 895 | ||
894 | public LSL_Types.Vector3 llDetectedVel(int number) | 896 | public LSL_Types.Vector3 llDetectedVel(int number) |
@@ -897,7 +899,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
897 | EntityBase SensedObject = entityDetectedKey(number); | 899 | EntityBase SensedObject = entityDetectedKey(number); |
898 | if (SensedObject == null) | 900 | if (SensedObject == null) |
899 | return new LSL_Types.Vector3(0, 0, 0); | 901 | return new LSL_Types.Vector3(0, 0, 0); |
900 | return new LSL_Types.Vector3(SensedObject.Velocity.X, SensedObject.Velocity.Y, SensedObject.Velocity.Z); | 902 | return new LSL_Types.Vector3( |
903 | SensedObject.Velocity.X, | ||
904 | SensedObject.Velocity.Y, | ||
905 | SensedObject.Velocity.Z); | ||
901 | } | 906 | } |
902 | 907 | ||
903 | public LSL_Types.Vector3 llDetectedGrab(int number) | 908 | public LSL_Types.Vector3 llDetectedGrab(int number) |
@@ -910,7 +915,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
910 | return new LSL_Types.Vector3( | 915 | return new LSL_Types.Vector3( |
911 | SensedObject.AbsolutePosition.X, | 916 | SensedObject.AbsolutePosition.X, |
912 | SensedObject.AbsolutePosition.Y, | 917 | SensedObject.AbsolutePosition.Y, |
913 | SensedObject.AbsolutePosition.Y); | 918 | SensedObject.AbsolutePosition.Z); |
914 | } | 919 | } |
915 | 920 | ||
916 | public LSL_Types.Quaternion llDetectedRot(int number) | 921 | public LSL_Types.Quaternion llDetectedRot(int number) |
@@ -919,7 +924,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
919 | EntityBase SensedObject = entityDetectedKey(number); | 924 | EntityBase SensedObject = entityDetectedKey(number); |
920 | if (SensedObject == null) | 925 | if (SensedObject == null) |
921 | return new LSL_Types.Quaternion(); | 926 | return new LSL_Types.Quaternion(); |
922 | return new LSL_Types.Quaternion(SensedObject.Rotation.x, SensedObject.Rotation.y, SensedObject.Rotation.z, SensedObject.Rotation.w); | 927 | return new LSL_Types.Quaternion( |
928 | SensedObject.Rotation.X, | ||
929 | SensedObject.Rotation.Y, | ||
930 | SensedObject.Rotation.Z, | ||
931 | SensedObject.Rotation.W); | ||
923 | } | 932 | } |
924 | 933 | ||
925 | public LSL_Types.LSLInteger llDetectedGroup(int number) | 934 | public LSL_Types.LSLInteger llDetectedGroup(int number) |
@@ -1005,7 +1014,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1005 | 1014 | ||
1006 | if ((status & BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) == BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) | 1015 | if ((status & BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) == BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) |
1007 | { | 1016 | { |
1008 | m_host.AddFlag(LLObject.ObjectFlags.CastShadows); | 1017 | m_host.AddFlag(PrimFlags.CastShadows); |
1009 | } | 1018 | } |
1010 | 1019 | ||
1011 | if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) | 1020 | if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) |
@@ -1055,25 +1064,25 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1055 | public LSL_Types.LSLInteger llGetStatus(int status) | 1064 | public LSL_Types.LSLInteger llGetStatus(int status) |
1056 | { | 1065 | { |
1057 | m_host.AddScriptLPS(1); | 1066 | m_host.AddScriptLPS(1); |
1058 | // Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); | 1067 | // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); |
1059 | switch (status) | 1068 | switch (status) |
1060 | { | 1069 | { |
1061 | case BuiltIn_Commands_BaseClass.STATUS_PHYSICS: | 1070 | case BuiltIn_Commands_BaseClass.STATUS_PHYSICS: |
1062 | if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == (uint)LLObject.ObjectFlags.Physics) | 1071 | if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == (uint)PrimFlags.Physics) |
1063 | { | 1072 | { |
1064 | return 1; | 1073 | return 1; |
1065 | } | 1074 | } |
1066 | return 0; | 1075 | return 0; |
1067 | 1076 | ||
1068 | case BuiltIn_Commands_BaseClass.STATUS_PHANTOM: | 1077 | case BuiltIn_Commands_BaseClass.STATUS_PHANTOM: |
1069 | if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) == (uint)LLObject.ObjectFlags.Phantom) | 1078 | if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == (uint)PrimFlags.Phantom) |
1070 | { | 1079 | { |
1071 | return 1; | 1080 | return 1; |
1072 | } | 1081 | } |
1073 | return 0; | 1082 | return 0; |
1074 | 1083 | ||
1075 | case BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS: | 1084 | case BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS: |
1076 | if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.CastShadows) == (uint)LLObject.ObjectFlags.CastShadows) | 1085 | if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.CastShadows) == (uint)PrimFlags.CastShadows) |
1077 | { | 1086 | { |
1078 | return 1; | 1087 | return 1; |
1079 | } | 1088 | } |
@@ -1140,7 +1149,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1140 | scale.y = World.m_maxNonphys; | 1149 | scale.y = World.m_maxNonphys; |
1141 | if (scale.z > World.m_maxNonphys) | 1150 | if (scale.z > World.m_maxNonphys) |
1142 | scale.z = World.m_maxNonphys; | 1151 | scale.z = World.m_maxNonphys; |
1143 | LLVector3 tmp = part.Scale; | 1152 | Vector3 tmp = part.Scale; |
1144 | tmp.X = (float)scale.x; | 1153 | tmp.X = (float)scale.x; |
1145 | tmp.Y = (float)scale.y; | 1154 | tmp.Y = (float)scale.y; |
1146 | tmp.Z = (float)scale.z; | 1155 | tmp.Z = (float)scale.z; |
@@ -1163,8 +1172,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1163 | 1172 | ||
1164 | private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face) | 1173 | private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face) |
1165 | { | 1174 | { |
1166 | LLObject.TextureEntry tex = part.Shape.Textures; | 1175 | Primitive.TextureEntry tex = part.Shape.Textures; |
1167 | LLColor texcolor; | 1176 | Color4 texcolor; |
1168 | if (face > -1) | 1177 | if (face > -1) |
1169 | { | 1178 | { |
1170 | texcolor = tex.CreateFace((uint)face).RGBA; | 1179 | texcolor = tex.CreateFace((uint)face).RGBA; |
@@ -1200,7 +1209,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1200 | 1209 | ||
1201 | public void SetGlow(SceneObjectPart part, int face, float glow) | 1210 | public void SetGlow(SceneObjectPart part, int face, float glow) |
1202 | { | 1211 | { |
1203 | LLObject.TextureEntry tex = part.Shape.Textures; | 1212 | Primitive.TextureEntry tex = part.Shape.Textures; |
1204 | if (face > -1) | 1213 | if (face > -1) |
1205 | { | 1214 | { |
1206 | tex.CreateFace((uint) face); | 1215 | tex.CreateFace((uint) face); |
@@ -1247,7 +1256,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1247 | break; | 1256 | break; |
1248 | } | 1257 | } |
1249 | 1258 | ||
1250 | LLObject.TextureEntry tex = part.Shape.Textures; | 1259 | Primitive.TextureEntry tex = part.Shape.Textures; |
1251 | if (face > -1) | 1260 | if (face > -1) |
1252 | { | 1261 | { |
1253 | tex.CreateFace((uint) face); | 1262 | tex.CreateFace((uint) face); |
@@ -1275,7 +1284,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1275 | 1284 | ||
1276 | public void SetFullBright(SceneObjectPart part, int face, bool bright) | 1285 | public void SetFullBright(SceneObjectPart part, int face, bool bright) |
1277 | { | 1286 | { |
1278 | LLObject.TextureEntry tex = part.Shape.Textures; | 1287 | Primitive.TextureEntry tex = part.Shape.Textures; |
1279 | if (face > -1) | 1288 | if (face > -1) |
1280 | { | 1289 | { |
1281 | tex.CreateFace((uint) face); | 1290 | tex.CreateFace((uint) face); |
@@ -1301,7 +1310,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1301 | public double llGetAlpha(int face) | 1310 | public double llGetAlpha(int face) |
1302 | { | 1311 | { |
1303 | m_host.AddScriptLPS(1); | 1312 | m_host.AddScriptLPS(1); |
1304 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 1313 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
1305 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color | 1314 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color |
1306 | { | 1315 | { |
1307 | return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); | 1316 | return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); |
@@ -1322,8 +1331,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1322 | 1331 | ||
1323 | private void SetAlpha(SceneObjectPart part, double alpha, int face) | 1332 | private void SetAlpha(SceneObjectPart part, double alpha, int face) |
1324 | { | 1333 | { |
1325 | LLObject.TextureEntry tex = part.Shape.Textures; | 1334 | Primitive.TextureEntry tex = part.Shape.Textures; |
1326 | LLColor texcolor; | 1335 | Color4 texcolor; |
1327 | if (face > -1) | 1336 | if (face > -1) |
1328 | { | 1337 | { |
1329 | texcolor = tex.CreateFace((uint)face).RGBA; | 1338 | texcolor = tex.CreateFace((uint)face).RGBA; |
@@ -1450,8 +1459,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1450 | public LSL_Types.Vector3 llGetColor(int face) | 1459 | public LSL_Types.Vector3 llGetColor(int face) |
1451 | { | 1460 | { |
1452 | m_host.AddScriptLPS(1); | 1461 | m_host.AddScriptLPS(1); |
1453 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 1462 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
1454 | LLColor texcolor; | 1463 | Color4 texcolor; |
1455 | LSL_Types.Vector3 rgb; | 1464 | LSL_Types.Vector3 rgb; |
1456 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color | 1465 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color |
1457 | { | 1466 | { |
@@ -1484,21 +1493,21 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1484 | 1493 | ||
1485 | private void SetTexture(SceneObjectPart part, string texture, int face) | 1494 | private void SetTexture(SceneObjectPart part, string texture, int face) |
1486 | { | 1495 | { |
1487 | LLUUID textureID=new LLUUID(); | 1496 | UUID textureID=new UUID(); |
1488 | 1497 | ||
1489 | if (!LLUUID.TryParse(texture, out textureID)) | 1498 | if (!UUID.TryParse(texture, out textureID)) |
1490 | { | 1499 | { |
1491 | textureID=InventoryKey(texture, (int)AssetType.Texture); | 1500 | textureID=InventoryKey(texture, (int)AssetType.Texture); |
1492 | } | 1501 | } |
1493 | 1502 | ||
1494 | if (textureID == LLUUID.Zero) | 1503 | if (textureID == UUID.Zero) |
1495 | return; | 1504 | return; |
1496 | 1505 | ||
1497 | LLObject.TextureEntry tex = part.Shape.Textures; | 1506 | Primitive.TextureEntry tex = part.Shape.Textures; |
1498 | 1507 | ||
1499 | if (face > -1) | 1508 | if (face > -1) |
1500 | { | 1509 | { |
1501 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); | 1510 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); |
1502 | texface.TextureID = textureID; | 1511 | texface.TextureID = textureID; |
1503 | tex.FaceTextures[face] = texface; | 1512 | tex.FaceTextures[face] = texface; |
1504 | part.UpdateTexture(tex); | 1513 | part.UpdateTexture(tex); |
@@ -1529,10 +1538,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1529 | 1538 | ||
1530 | private void ScaleTexture(SceneObjectPart part, double u, double v, int face) | 1539 | private void ScaleTexture(SceneObjectPart part, double u, double v, int face) |
1531 | { | 1540 | { |
1532 | LLObject.TextureEntry tex = part.Shape.Textures; | 1541 | Primitive.TextureEntry tex = part.Shape.Textures; |
1533 | if (face > -1) | 1542 | if (face > -1) |
1534 | { | 1543 | { |
1535 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); | 1544 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); |
1536 | texface.RepeatU = (float)u; | 1545 | texface.RepeatU = (float)u; |
1537 | texface.RepeatV = (float)v; | 1546 | texface.RepeatV = (float)v; |
1538 | tex.FaceTextures[face] = texface; | 1547 | tex.FaceTextures[face] = texface; |
@@ -1565,10 +1574,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1565 | 1574 | ||
1566 | private void OffsetTexture(SceneObjectPart part, double u, double v, int face) | 1575 | private void OffsetTexture(SceneObjectPart part, double u, double v, int face) |
1567 | { | 1576 | { |
1568 | LLObject.TextureEntry tex = part.Shape.Textures; | 1577 | Primitive.TextureEntry tex = part.Shape.Textures; |
1569 | if (face > -1) | 1578 | if (face > -1) |
1570 | { | 1579 | { |
1571 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); | 1580 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); |
1572 | texface.OffsetU = (float)u; | 1581 | texface.OffsetU = (float)u; |
1573 | texface.OffsetV = (float)v; | 1582 | texface.OffsetV = (float)v; |
1574 | tex.FaceTextures[face] = texface; | 1583 | tex.FaceTextures[face] = texface; |
@@ -1601,10 +1610,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1601 | 1610 | ||
1602 | private void RotateTexture(SceneObjectPart part, double rotation, int face) | 1611 | private void RotateTexture(SceneObjectPart part, double rotation, int face) |
1603 | { | 1612 | { |
1604 | LLObject.TextureEntry tex = part.Shape.Textures; | 1613 | Primitive.TextureEntry tex = part.Shape.Textures; |
1605 | if (face > -1) | 1614 | if (face > -1) |
1606 | { | 1615 | { |
1607 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); | 1616 | Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); |
1608 | texface.Rotation = (float)rotation; | 1617 | texface.Rotation = (float)rotation; |
1609 | tex.FaceTextures[face] = texface; | 1618 | tex.FaceTextures[face] = texface; |
1610 | part.UpdateTexture(tex); | 1619 | part.UpdateTexture(tex); |
@@ -1628,14 +1637,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1628 | public string llGetTexture(int face) | 1637 | public string llGetTexture(int face) |
1629 | { | 1638 | { |
1630 | m_host.AddScriptLPS(1); | 1639 | m_host.AddScriptLPS(1); |
1631 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 1640 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
1632 | if (face == -1) | 1641 | if (face == -1) |
1633 | { | 1642 | { |
1634 | face = 0; | 1643 | face = 0; |
1635 | } | 1644 | } |
1636 | if (face > -1) | 1645 | if (face > -1) |
1637 | { | 1646 | { |
1638 | LLObject.TextureEntryFace texface; | 1647 | Primitive.TextureEntryFace texface; |
1639 | texface = tex.GetFace((uint)face); | 1648 | texface = tex.GetFace((uint)face); |
1640 | return texface.TextureID.ToString(); | 1649 | return texface.TextureID.ToString(); |
1641 | } | 1650 | } |
@@ -1665,11 +1674,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1665 | 1674 | ||
1666 | if (part.ParentID != 0) | 1675 | if (part.ParentID != 0) |
1667 | { | 1676 | { |
1668 | part.UpdateOffSet(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); | 1677 | part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); |
1669 | } | 1678 | } |
1670 | else | 1679 | else |
1671 | { | 1680 | { |
1672 | part.UpdateGroupPosition(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); | 1681 | part.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); |
1673 | } | 1682 | } |
1674 | } | 1683 | } |
1675 | 1684 | ||
@@ -1709,7 +1718,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1709 | 1718 | ||
1710 | private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) | 1719 | private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) |
1711 | { | 1720 | { |
1712 | part.UpdateRotation(new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); | 1721 | part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); |
1713 | // Update rotation does not move the object in the physics scene if it's a linkset. | 1722 | // Update rotation does not move the object in the physics scene if it's a linkset. |
1714 | part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; | 1723 | part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; |
1715 | } | 1724 | } |
@@ -1717,14 +1726,18 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1717 | public LSL_Types.Quaternion llGetRot() | 1726 | public LSL_Types.Quaternion llGetRot() |
1718 | { | 1727 | { |
1719 | m_host.AddScriptLPS(1); | 1728 | m_host.AddScriptLPS(1); |
1720 | LLQuaternion q = m_host.RotationOffset; | 1729 | Quaternion q = m_host.RotationOffset; |
1721 | return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); | 1730 | return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); |
1722 | } | 1731 | } |
1723 | 1732 | ||
1724 | public LSL_Types.Quaternion llGetLocalRot() | 1733 | public LSL_Types.Quaternion llGetLocalRot() |
1725 | { | 1734 | { |
1726 | m_host.AddScriptLPS(1); | 1735 | m_host.AddScriptLPS(1); |
1727 | return new LSL_Types.Quaternion(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W); | 1736 | return new LSL_Types.Quaternion( |
1737 | m_host.RotationOffset.X, | ||
1738 | m_host.RotationOffset.Y, | ||
1739 | m_host.RotationOffset.Z, | ||
1740 | m_host.RotationOffset.W); | ||
1728 | } | 1741 | } |
1729 | 1742 | ||
1730 | public void llSetForce(LSL_Types.Vector3 force, int local) | 1743 | public void llSetForce(LSL_Types.Vector3 force, int local) |
@@ -1769,7 +1782,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1769 | public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range) | 1782 | public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range) |
1770 | { | 1783 | { |
1771 | m_host.AddScriptLPS(1); | 1784 | m_host.AddScriptLPS(1); |
1772 | return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); | 1785 | return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range); |
1773 | 1786 | ||
1774 | } | 1787 | } |
1775 | 1788 | ||
@@ -1795,7 +1808,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1795 | public void llMoveToTarget(LSL_Types.Vector3 target, double tau) | 1808 | public void llMoveToTarget(LSL_Types.Vector3 target, double tau) |
1796 | { | 1809 | { |
1797 | m_host.AddScriptLPS(1); | 1810 | m_host.AddScriptLPS(1); |
1798 | m_host.MoveToTarget(new LLVector3((float)target.x, (float)target.y, (float)target.z), (float)tau); | 1811 | m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau); |
1799 | } | 1812 | } |
1800 | 1813 | ||
1801 | public void llStopMoveToTarget() | 1814 | public void llStopMoveToTarget() |
@@ -1816,7 +1829,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1816 | if (force.z > 20000) | 1829 | if (force.z > 20000) |
1817 | force.z = 20000; | 1830 | force.z = 20000; |
1818 | 1831 | ||
1819 | m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), local != 0); | 1832 | m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0); |
1820 | } | 1833 | } |
1821 | 1834 | ||
1822 | public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) | 1835 | public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) |
@@ -1925,7 +1938,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1925 | { | 1938 | { |
1926 | m_host.AddScriptLPS(1); | 1939 | m_host.AddScriptLPS(1); |
1927 | 1940 | ||
1928 | if (m_host.Sound != LLUUID.Zero) | 1941 | if (m_host.Sound != UUID.Zero) |
1929 | llStopSound(); | 1942 | llStopSound(); |
1930 | 1943 | ||
1931 | m_host.Sound = KeyOrName(sound); | 1944 | m_host.Sound = KeyOrName(sound); |
@@ -1967,7 +1980,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1967 | { | 1980 | { |
1968 | m_host.AddScriptLPS(1); | 1981 | m_host.AddScriptLPS(1); |
1969 | 1982 | ||
1970 | m_host.Sound = LLUUID.Zero; | 1983 | m_host.Sound = UUID.Zero; |
1971 | m_host.SoundGain = 0; | 1984 | m_host.SoundGain = 0; |
1972 | m_host.SoundFlags = 0; | 1985 | m_host.SoundFlags = 0; |
1973 | m_host.SoundRadius = 0; | 1986 | m_host.SoundRadius = 0; |
@@ -1975,7 +1988,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1975 | m_host.ScheduleFullUpdate(); | 1988 | m_host.ScheduleFullUpdate(); |
1976 | m_host.SendFullUpdateToAllClients(); | 1989 | m_host.SendFullUpdateToAllClients(); |
1977 | 1990 | ||
1978 | // m_host.SendSound(LLUUID.Zero.ToString(), 1.0, false, 2); | 1991 | // m_host.SendSound(UUID.Zero.ToString(), 1.0, false, 2); |
1979 | } | 1992 | } |
1980 | 1993 | ||
1981 | public void llPreloadSound(string sound) | 1994 | public void llPreloadSound(string sound) |
@@ -2223,13 +2236,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2223 | 2236 | ||
2224 | public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) | 2237 | public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) |
2225 | { | 2238 | { |
2226 | LLUUID invItemID=InventorySelf(); | 2239 | UUID invItemID=InventorySelf(); |
2227 | if (invItemID == LLUUID.Zero) | 2240 | if (invItemID == UUID.Zero) |
2228 | return 0; | 2241 | return 0; |
2229 | 2242 | ||
2230 | m_host.AddScriptLPS(1); | 2243 | m_host.AddScriptLPS(1); |
2231 | 2244 | ||
2232 | if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) | 2245 | if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) |
2233 | return 0; | 2246 | return 0; |
2234 | 2247 | ||
2235 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_DEBIT) == 0) | 2248 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_DEBIT) == 0) |
@@ -2238,9 +2251,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2238 | return 0; | 2251 | return 0; |
2239 | } | 2252 | } |
2240 | 2253 | ||
2241 | LLUUID toID=new LLUUID(); | 2254 | UUID toID=new UUID(); |
2242 | 2255 | ||
2243 | if (!LLUUID.TryParse(destination, out toID)) | 2256 | if (!UUID.TryParse(destination, out toID)) |
2244 | { | 2257 | { |
2245 | LSLError("Bad key in llGiveMoney"); | 2258 | LSLError("Bad key in llGiveMoney"); |
2246 | return 0; | 2259 | return 0; |
@@ -2303,7 +2316,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2303 | // it's possible to have two items with the same task inventory name. | 2316 | // it's possible to have two items with the same task inventory name. |
2304 | // this is an easter egg of sorts. | 2317 | // this is an easter egg of sorts. |
2305 | 2318 | ||
2306 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 2319 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
2307 | { | 2320 | { |
2308 | if (inv.Value.Name == inventory) | 2321 | if (inv.Value.Name == inventory) |
2309 | { | 2322 | { |
@@ -2314,18 +2327,18 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2314 | continue; | 2327 | continue; |
2315 | } | 2328 | } |
2316 | 2329 | ||
2317 | LLVector3 llpos = new LLVector3((float)pos.x, (float)pos.y, (float)pos.z); | 2330 | Vector3 llpos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z); |
2318 | 2331 | ||
2319 | // test if we're further away then 10m | 2332 | // test if we're further away then 10m |
2320 | if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10) | 2333 | if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10) |
2321 | return; // wiki says, if it's further away then 10m, silently fail. | 2334 | return; // wiki says, if it's further away then 10m, silently fail. |
2322 | 2335 | ||
2323 | LLVector3 llvel = new LLVector3((float)vel.x, (float)vel.y, (float)vel.z); | 2336 | Vector3 llvel = new Vector3((float)vel.x, (float)vel.y, (float)vel.z); |
2324 | 2337 | ||
2325 | // need the magnitude later | 2338 | // need the magnitude later |
2326 | float velmag = (float)Util.GetMagnitude(llvel); | 2339 | float velmag = (float)Util.GetMagnitude(llvel); |
2327 | 2340 | ||
2328 | SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); | 2341 | SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); |
2329 | 2342 | ||
2330 | // If either of these are null, then there was an unknown error. | 2343 | // If either of these are null, then there was an unknown error. |
2331 | if (new_group == null) | 2344 | if (new_group == null) |
@@ -2336,7 +2349,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2336 | // objects rezzed with this method are die_at_edge by default. | 2349 | // objects rezzed with this method are die_at_edge by default. |
2337 | new_group.RootPart.SetDieAtEdge(true); | 2350 | new_group.RootPart.SetDieAtEdge(true); |
2338 | 2351 | ||
2339 | m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "object_rez", EventQueueManager.llDetectNull, new Object[] { new LSL_Types.LSLString(new_group.RootPart.UUID.ToString()) }); | 2352 | m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "object_rez", EventQueueManager.llDetectNull, new Object[] { new LSL_Types.LSLString(new_group.RootPart.ToString()) }); |
2340 | float groupmass = new_group.GetMass(); | 2353 | float groupmass = new_group.GetMass(); |
2341 | 2354 | ||
2342 | //Recoil. | 2355 | //Recoil. |
@@ -2401,7 +2414,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2401 | return; | 2414 | return; |
2402 | } | 2415 | } |
2403 | 2416 | ||
2404 | if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) | 2417 | if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero) |
2405 | { | 2418 | { |
2406 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); | 2419 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); |
2407 | 2420 | ||
@@ -2428,7 +2441,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2428 | return; | 2441 | return; |
2429 | } | 2442 | } |
2430 | 2443 | ||
2431 | if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) | 2444 | if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero) |
2432 | { | 2445 | { |
2433 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); | 2446 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); |
2434 | 2447 | ||
@@ -2489,14 +2502,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2489 | 2502 | ||
2490 | // TODO: figure out values for client, fromSession, and imSessionID | 2503 | // TODO: figure out values for client, fromSession, and imSessionID |
2491 | // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch()); | 2504 | // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch()); |
2492 | LLUUID friendTransactionID = LLUUID.Random(); | 2505 | UUID friendTransactionID = UUID.Random(); |
2493 | 2506 | ||
2494 | //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); | 2507 | //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); |
2495 | 2508 | ||
2496 | GridInstantMessage msg = new GridInstantMessage(); | 2509 | GridInstantMessage msg = new GridInstantMessage(); |
2497 | msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.UUID; | 2510 | msg.fromAgentID = new Guid(m_host.ToString()); // fromAgentID.Guid; |
2498 | msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID; | 2511 | msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID; |
2499 | msg.toAgentID = new Guid(user); // toAgentID.UUID; | 2512 | msg.toAgentID = new Guid(user); // toAgentID.Guid; |
2500 | msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here | 2513 | msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here |
2501 | // Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); | 2514 | // Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); |
2502 | // Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); | 2515 | // Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); |
@@ -2514,8 +2527,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2514 | msg.fromGroup = false;// fromGroup; | 2527 | msg.fromGroup = false;// fromGroup; |
2515 | msg.offline = (byte)0; //offline; | 2528 | msg.offline = (byte)0; //offline; |
2516 | msg.ParentEstateID = 0; //ParentEstateID; | 2529 | msg.ParentEstateID = 0; //ParentEstateID; |
2517 | msg.Position = new sLLVector3();// new sLLVector3(m_host.AbsolutePosition); | 2530 | msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition); |
2518 | msg.RegionID = World.RegionInfo.RegionID.UUID;//RegionID.UUID; | 2531 | msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; |
2519 | msg.binaryBucket = new byte[0];// binaryBucket; | 2532 | msg.binaryBucket = new byte[0];// binaryBucket; |
2520 | World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 2533 | World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
2521 | // ScriptSleep(2000); | 2534 | // ScriptSleep(2000); |
@@ -2543,7 +2556,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2543 | public string llGetKey() | 2556 | public string llGetKey() |
2544 | { | 2557 | { |
2545 | m_host.AddScriptLPS(1); | 2558 | m_host.AddScriptLPS(1); |
2546 | return m_host.UUID.ToString(); | 2559 | return m_host.ToString(); |
2547 | } | 2560 | } |
2548 | 2561 | ||
2549 | public void llSetBuoyancy(double buoyancy) | 2562 | public void llSetBuoyancy(double buoyancy) |
@@ -2607,11 +2620,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2607 | { | 2620 | { |
2608 | m_host.AddScriptLPS(1); | 2621 | m_host.AddScriptLPS(1); |
2609 | 2622 | ||
2610 | LLUUID invItemID=InventorySelf(); | 2623 | UUID invItemID=InventorySelf(); |
2611 | if (invItemID == LLUUID.Zero) | 2624 | if (invItemID == UUID.Zero) |
2612 | return; | 2625 | return; |
2613 | 2626 | ||
2614 | if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) | 2627 | if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) |
2615 | return; | 2628 | return; |
2616 | 2629 | ||
2617 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) | 2630 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) |
@@ -2620,9 +2633,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2620 | 2633 | ||
2621 | if (presence != null) | 2634 | if (presence != null) |
2622 | { | 2635 | { |
2623 | // Do NOT try to parse LLUUID, animations cannot be triggered by ID | 2636 | // Do NOT try to parse UUID, animations cannot be triggered by ID |
2624 | LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); | 2637 | UUID animID=InventoryKey(anim, (int)AssetType.Animation); |
2625 | if (animID == LLUUID.Zero) | 2638 | if (animID == UUID.Zero) |
2626 | presence.AddAnimation(anim); | 2639 | presence.AddAnimation(anim); |
2627 | else | 2640 | else |
2628 | presence.AddAnimation(animID); | 2641 | presence.AddAnimation(animID); |
@@ -2634,30 +2647,30 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2634 | { | 2647 | { |
2635 | m_host.AddScriptLPS(1); | 2648 | m_host.AddScriptLPS(1); |
2636 | 2649 | ||
2637 | LLUUID invItemID=InventorySelf(); | 2650 | UUID invItemID=InventorySelf(); |
2638 | if (invItemID == LLUUID.Zero) | 2651 | if (invItemID == UUID.Zero) |
2639 | return; | 2652 | return; |
2640 | 2653 | ||
2641 | if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) | 2654 | if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) |
2642 | return; | 2655 | return; |
2643 | 2656 | ||
2644 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) | 2657 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) |
2645 | { | 2658 | { |
2646 | LLUUID animID = new LLUUID(); | 2659 | UUID animID = new UUID(); |
2647 | 2660 | ||
2648 | if (!LLUUID.TryParse(anim, out animID)) | 2661 | if (!UUID.TryParse(anim, out animID)) |
2649 | { | 2662 | { |
2650 | animID=InventoryKey(anim); | 2663 | animID=InventoryKey(anim); |
2651 | } | 2664 | } |
2652 | 2665 | ||
2653 | if (animID == LLUUID.Zero) | 2666 | if (animID == UUID.Zero) |
2654 | return; | 2667 | return; |
2655 | 2668 | ||
2656 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); | 2669 | ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); |
2657 | 2670 | ||
2658 | if (presence != null) | 2671 | if (presence != null) |
2659 | { | 2672 | { |
2660 | if (animID == LLUUID.Zero) | 2673 | if (animID == UUID.Zero) |
2661 | presence.RemoveAnimation(anim); | 2674 | presence.RemoveAnimation(anim); |
2662 | else | 2675 | else |
2663 | presence.RemoveAnimation(animID); | 2676 | presence.RemoveAnimation(animID); |
@@ -2680,8 +2693,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2680 | public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) | 2693 | public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) |
2681 | { | 2694 | { |
2682 | m_host.AddScriptLPS(1); | 2695 | m_host.AddScriptLPS(1); |
2683 | m_host.RotationalVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | 2696 | m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); |
2684 | m_host.AngularVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | 2697 | m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); |
2685 | m_host.ScheduleTerseUpdate(); | 2698 | m_host.ScheduleTerseUpdate(); |
2686 | m_host.SendTerseUpdateToAllClients(); | 2699 | m_host.SendTerseUpdateToAllClients(); |
2687 | } | 2700 | } |
@@ -2700,19 +2713,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2700 | 2713 | ||
2701 | public void llRequestPermissions(string agent, int perm) | 2714 | public void llRequestPermissions(string agent, int perm) |
2702 | { | 2715 | { |
2703 | LLUUID agentID=new LLUUID(); | 2716 | UUID agentID=new UUID(); |
2704 | 2717 | ||
2705 | if (!LLUUID.TryParse(agent, out agentID)) | 2718 | if (!UUID.TryParse(agent, out agentID)) |
2706 | return; | 2719 | return; |
2707 | 2720 | ||
2708 | LLUUID invItemID=InventorySelf(); | 2721 | UUID invItemID=InventorySelf(); |
2709 | 2722 | ||
2710 | if (invItemID == LLUUID.Zero) | 2723 | if (invItemID == UUID.Zero) |
2711 | return; // Not in a prim? How?? | 2724 | return; // Not in a prim? How?? |
2712 | 2725 | ||
2713 | if (agentID == LLUUID.Zero || perm == 0) // Releasing permissions | 2726 | if (agentID == UUID.Zero || perm == 0) // Releasing permissions |
2714 | { | 2727 | { |
2715 | m_host.TaskInventory[invItemID].PermsGranter=LLUUID.Zero; | 2728 | m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero; |
2716 | m_host.TaskInventory[invItemID].PermsMask=0; | 2729 | m_host.TaskInventory[invItemID].PermsMask=0; |
2717 | 2730 | ||
2718 | m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( | 2731 | m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( |
@@ -2786,14 +2799,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2786 | m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(0)}); | 2799 | m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(0)}); |
2787 | } | 2800 | } |
2788 | 2801 | ||
2789 | void handleScriptAnswer(IClientAPI client, LLUUID taskID, LLUUID itemID, int answer) | 2802 | void handleScriptAnswer(IClientAPI client, UUID taskID, UUID itemID, int answer) |
2790 | { | 2803 | { |
2791 | if (taskID != m_host.UUID) | 2804 | if (taskID != m_host.UUID) |
2792 | return; | 2805 | return; |
2793 | 2806 | ||
2794 | LLUUID invItemID=InventorySelf(); | 2807 | UUID invItemID=InventorySelf(); |
2795 | 2808 | ||
2796 | if (invItemID == LLUUID.Zero) | 2809 | if (invItemID == UUID.Zero) |
2797 | return; | 2810 | return; |
2798 | 2811 | ||
2799 | client.OnScriptAnswer-=handleScriptAnswer; | 2812 | client.OnScriptAnswer-=handleScriptAnswer; |
@@ -2816,7 +2829,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2816 | } | 2829 | } |
2817 | } | 2830 | } |
2818 | 2831 | ||
2819 | return LLUUID.Zero.ToString(); | 2832 | return UUID.Zero.ToString(); |
2820 | } | 2833 | } |
2821 | 2834 | ||
2822 | public LSL_Types.LSLInteger llGetPermissions() | 2835 | public LSL_Types.LSLInteger llGetPermissions() |
@@ -2854,8 +2867,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2854 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 2867 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
2855 | if (linknumber > -1) | 2868 | if (linknumber > -1) |
2856 | { | 2869 | { |
2857 | LLObject.TextureEntry tex = part.Shape.Textures; | 2870 | Primitive.TextureEntry tex = part.Shape.Textures; |
2858 | LLColor texcolor; | 2871 | Color4 texcolor; |
2859 | if (face > -1) | 2872 | if (face > -1) |
2860 | { | 2873 | { |
2861 | texcolor = tex.CreateFace((uint)face).RGBA; | 2874 | texcolor = tex.CreateFace((uint)face).RGBA; |
@@ -2901,8 +2914,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2901 | { | 2914 | { |
2902 | linknumber = w; | 2915 | linknumber = w; |
2903 | part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 2916 | part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
2904 | LLObject.TextureEntry tex = part.Shape.Textures; | 2917 | Primitive.TextureEntry tex = part.Shape.Textures; |
2905 | LLColor texcolor; | 2918 | Color4 texcolor; |
2906 | if (face > -1) | 2919 | if (face > -1) |
2907 | { | 2920 | { |
2908 | texcolor = tex.CreateFace((uint)face).RGBA; | 2921 | texcolor = tex.CreateFace((uint)face).RGBA; |
@@ -2945,7 +2958,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2945 | public void llCreateLink(string target, int parent) | 2958 | public void llCreateLink(string target, int parent) |
2946 | { | 2959 | { |
2947 | m_host.AddScriptLPS(1); | 2960 | m_host.AddScriptLPS(1); |
2948 | LLUUID invItemID = InventorySelf(); | 2961 | UUID invItemID = InventorySelf(); |
2949 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CHANGE_LINKS) == 0) { | 2962 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CHANGE_LINKS) == 0) { |
2950 | ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); | 2963 | ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); |
2951 | return; | 2964 | return; |
@@ -2970,7 +2983,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2970 | childPrim.RootPart.UpdateFlag = uf; | 2983 | childPrim.RootPart.UpdateFlag = uf; |
2971 | } | 2984 | } |
2972 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); | 2985 | parentPrim.TriggerScriptChangedEvent(Changed.LINK); |
2973 | parentPrim.RootPart.AddFlag(LLObject.ObjectFlags.CreateSelected); | 2986 | parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); |
2974 | parentPrim.GetProperties(client); | 2987 | parentPrim.GetProperties(client); |
2975 | 2988 | ||
2976 | ScriptSleep(1000); | 2989 | ScriptSleep(1000); |
@@ -2994,11 +3007,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2994 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); | 3007 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); |
2995 | if (part != null) | 3008 | if (part != null) |
2996 | { | 3009 | { |
2997 | return part.UUID.ToString(); | 3010 | return part.ToString(); |
2998 | } | 3011 | } |
2999 | else | 3012 | else |
3000 | { | 3013 | { |
3001 | return LLUUID.Zero.ToString(); | 3014 | return UUID.Zero.ToString(); |
3002 | } | 3015 | } |
3003 | } | 3016 | } |
3004 | 3017 | ||
@@ -3020,7 +3033,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3020 | { | 3033 | { |
3021 | m_host.AddScriptLPS(1); | 3034 | m_host.AddScriptLPS(1); |
3022 | int count = 0; | 3035 | int count = 0; |
3023 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 3036 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
3024 | { | 3037 | { |
3025 | if (inv.Value.Type == type || type == -1) | 3038 | if (inv.Value.Type == type || type == -1) |
3026 | { | 3039 | { |
@@ -3034,7 +3047,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3034 | { | 3047 | { |
3035 | m_host.AddScriptLPS(1); | 3048 | m_host.AddScriptLPS(1); |
3036 | ArrayList keys = new ArrayList(); | 3049 | ArrayList keys = new ArrayList(); |
3037 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 3050 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
3038 | { | 3051 | { |
3039 | if (inv.Value.Type == type || type == -1) | 3052 | if (inv.Value.Type == type || type == -1) |
3040 | { | 3053 | { |
@@ -3055,7 +3068,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3055 | 3068 | ||
3056 | public void llSetScriptState(string name, int run) | 3069 | public void llSetScriptState(string name, int run) |
3057 | { | 3070 | { |
3058 | LLUUID item; | 3071 | UUID item; |
3059 | ScriptManager sm; | 3072 | ScriptManager sm; |
3060 | IScript script = null; | 3073 | IScript script = null; |
3061 | 3074 | ||
@@ -3064,7 +3077,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3064 | // These functions are supposed to be robust, | 3077 | // These functions are supposed to be robust, |
3065 | // so get the state one step at a time. | 3078 | // so get the state one step at a time. |
3066 | 3079 | ||
3067 | if ((item = ScriptByName(name)) != LLUUID.Zero) | 3080 | if ((item = ScriptByName(name)) != UUID.Zero) |
3068 | { | 3081 | { |
3069 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) | 3082 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) |
3070 | { | 3083 | { |
@@ -3098,17 +3111,17 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3098 | { | 3111 | { |
3099 | m_host.AddScriptLPS(1); | 3112 | m_host.AddScriptLPS(1); |
3100 | bool found = false; | 3113 | bool found = false; |
3101 | LLUUID destId = LLUUID.Zero; | 3114 | UUID destId = UUID.Zero; |
3102 | LLUUID objId = LLUUID.Zero; | 3115 | UUID objId = UUID.Zero; |
3103 | 3116 | ||
3104 | if (!LLUUID.TryParse(destination, out destId)) | 3117 | if (!UUID.TryParse(destination, out destId)) |
3105 | { | 3118 | { |
3106 | llSay(0, "Could not parse key " + destination); | 3119 | llSay(0, "Could not parse key " + destination); |
3107 | return; | 3120 | return; |
3108 | } | 3121 | } |
3109 | 3122 | ||
3110 | // move the first object found with this inventory name | 3123 | // move the first object found with this inventory name |
3111 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 3124 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
3112 | { | 3125 | { |
3113 | if (inv.Value.Name == inventory) | 3126 | if (inv.Value.Name == inventory) |
3114 | { | 3127 | { |
@@ -3186,22 +3199,22 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3186 | { | 3199 | { |
3187 | if (item.Type == 3 && item.Name == name) | 3200 | if (item.Type == 3 && item.Name == name) |
3188 | { | 3201 | { |
3189 | LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest( | 3202 | UUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest( |
3190 | m_localID, m_itemID, item.AssetID.ToString()); | 3203 | m_localID, m_itemID, item.AssetID.ToString()); |
3191 | 3204 | ||
3192 | LLVector3 region = new LLVector3( | 3205 | Vector3 region = new Vector3( |
3193 | World.RegionInfo.RegionLocX * Constants.RegionSize, | 3206 | World.RegionInfo.RegionLocX * Constants.RegionSize, |
3194 | World.RegionInfo.RegionLocY * Constants.RegionSize, | 3207 | World.RegionInfo.RegionLocY * Constants.RegionSize, |
3195 | 0); | 3208 | 0); |
3196 | 3209 | ||
3197 | World.AssetCache.GetAsset(item.AssetID, | 3210 | World.AssetCache.GetAsset(item.AssetID, |
3198 | delegate(LLUUID i, AssetBase a) | 3211 | delegate(UUID i, AssetBase a) |
3199 | { | 3212 | { |
3200 | AssetLandmark lm = new AssetLandmark(a); | 3213 | AssetLandmark lm = new AssetLandmark(a); |
3201 | 3214 | ||
3202 | float rx = (uint)(lm.RegionHandle >> 32); | 3215 | float rx = (uint)(lm.RegionHandle >> 32); |
3203 | float ry = (uint)lm.RegionHandle; | 3216 | float ry = (uint)lm.RegionHandle; |
3204 | region = lm.Position + new LLVector3(rx, ry, 0) - region; | 3217 | region = lm.Position + new Vector3(rx, ry, 0) - region; |
3205 | 3218 | ||
3206 | string reply = region.ToString(); | 3219 | string reply = region.ToString(); |
3207 | m_ScriptEngine.m_ASYNCLSLCommandManager. | 3220 | m_ScriptEngine.m_ASYNCLSLCommandManager. |
@@ -3226,8 +3239,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3226 | public void llTeleportAgentHome(string agent) | 3239 | public void llTeleportAgentHome(string agent) |
3227 | { | 3240 | { |
3228 | m_host.AddScriptLPS(1); | 3241 | m_host.AddScriptLPS(1); |
3229 | LLUUID agentId = new LLUUID(); | 3242 | UUID agentId = new UUID(); |
3230 | if (LLUUID.TryParse(agent, out agentId)) | 3243 | if (UUID.TryParse(agent, out agentId)) |
3231 | { | 3244 | { |
3232 | ScenePresence presence = World.GetScenePresence(agentId); | 3245 | ScenePresence presence = World.GetScenePresence(agentId); |
3233 | if (presence != null) | 3246 | if (presence != null) |
@@ -3243,7 +3256,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3243 | public void llModifyLand(int action, int brush) | 3256 | public void llModifyLand(int action, int brush) |
3244 | { | 3257 | { |
3245 | m_host.AddScriptLPS(1); | 3258 | m_host.AddScriptLPS(1); |
3246 | World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0)); | 3259 | World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0)); |
3247 | } | 3260 | } |
3248 | 3261 | ||
3249 | public void llCollisionSound(string impact_sound, double impact_volume) | 3262 | public void llCollisionSound(string impact_sound, double impact_volume) |
@@ -3277,7 +3290,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3277 | m_host.AddScriptLPS(1); | 3290 | m_host.AddScriptLPS(1); |
3278 | 3291 | ||
3279 | uint partLocalID; | 3292 | uint partLocalID; |
3280 | LLUUID partItemID; | 3293 | UUID partItemID; |
3281 | 3294 | ||
3282 | switch ((int)linknum) | 3295 | switch ((int)linknum) |
3283 | { | 3296 | { |
@@ -3452,7 +3465,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3452 | SceneObjectPart targ = World.GetSceneObjectPart(target); | 3465 | SceneObjectPart targ = World.GetSceneObjectPart(target); |
3453 | if (targ == null) | 3466 | if (targ == null) |
3454 | return; | 3467 | return; |
3455 | targ.ApplyImpulse(new LLVector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0); | 3468 | targ.ApplyImpulse(new Vector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0); |
3456 | } | 3469 | } |
3457 | 3470 | ||
3458 | public void llPassCollisions(int pass) | 3471 | public void llPassCollisions(int pass) |
@@ -3731,7 +3744,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3731 | public string llGetInventoryKey(string name) | 3744 | public string llGetInventoryKey(string name) |
3732 | { | 3745 | { |
3733 | m_host.AddScriptLPS(1); | 3746 | m_host.AddScriptLPS(1); |
3734 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 3747 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
3735 | { | 3748 | { |
3736 | if (inv.Value.Name == name) | 3749 | if (inv.Value.Name == name) |
3737 | { | 3750 | { |
@@ -3741,11 +3754,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3741 | } | 3754 | } |
3742 | else | 3755 | else |
3743 | { | 3756 | { |
3744 | return LLUUID.Zero.ToString(); | 3757 | return UUID.Zero.ToString(); |
3745 | } | 3758 | } |
3746 | } | 3759 | } |
3747 | } | 3760 | } |
3748 | return LLUUID.Zero.ToString(); | 3761 | return UUID.Zero.ToString(); |
3749 | } | 3762 | } |
3750 | 3763 | ||
3751 | public void llAllowInventoryDrop(int add) | 3764 | public void llAllowInventoryDrop(int add) |
@@ -3763,10 +3776,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3763 | m_host.AddScriptLPS(1); | 3776 | m_host.AddScriptLPS(1); |
3764 | 3777 | ||
3765 | LSL_Types.Vector3 SunDoubleVector3; | 3778 | LSL_Types.Vector3 SunDoubleVector3; |
3766 | LLVector3 SunFloatVector3; | 3779 | Vector3 SunFloatVector3; |
3767 | 3780 | ||
3768 | // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule | 3781 | // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule |
3769 | // have to convert from LLVector3 (float) to LSL_Types.Vector3 (double) | 3782 | // have to convert from Vector3 (float) to LSL_Types.Vector3 (double) |
3770 | SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector; | 3783 | SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector; |
3771 | SunDoubleVector3.x = (double)SunFloatVector3.X; | 3784 | SunDoubleVector3.x = (double)SunFloatVector3.X; |
3772 | SunDoubleVector3.y = (double)SunFloatVector3.Y; | 3785 | SunDoubleVector3.y = (double)SunFloatVector3.Y; |
@@ -3778,7 +3791,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3778 | public LSL_Types.Vector3 llGetTextureOffset(int face) | 3791 | public LSL_Types.Vector3 llGetTextureOffset(int face) |
3779 | { | 3792 | { |
3780 | m_host.AddScriptLPS(1); | 3793 | m_host.AddScriptLPS(1); |
3781 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 3794 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
3782 | LSL_Types.Vector3 offset; | 3795 | LSL_Types.Vector3 offset; |
3783 | if (face == -1) | 3796 | if (face == -1) |
3784 | { | 3797 | { |
@@ -3793,7 +3806,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3793 | public LSL_Types.Vector3 llGetTextureScale(int side) | 3806 | public LSL_Types.Vector3 llGetTextureScale(int side) |
3794 | { | 3807 | { |
3795 | m_host.AddScriptLPS(1); | 3808 | m_host.AddScriptLPS(1); |
3796 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 3809 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
3797 | LSL_Types.Vector3 scale; | 3810 | LSL_Types.Vector3 scale; |
3798 | if (side == -1) | 3811 | if (side == -1) |
3799 | { | 3812 | { |
@@ -3808,7 +3821,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3808 | public double llGetTextureRot(int face) | 3821 | public double llGetTextureRot(int face) |
3809 | { | 3822 | { |
3810 | m_host.AddScriptLPS(1); | 3823 | m_host.AddScriptLPS(1); |
3811 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 3824 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
3812 | if (face == -1) | 3825 | if (face == -1) |
3813 | { | 3826 | { |
3814 | face = 0; | 3827 | face = 0; |
@@ -3825,14 +3838,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3825 | public string llGetOwnerKey(string id) | 3838 | public string llGetOwnerKey(string id) |
3826 | { | 3839 | { |
3827 | m_host.AddScriptLPS(1); | 3840 | m_host.AddScriptLPS(1); |
3828 | LLUUID key = new LLUUID(); | 3841 | UUID key = new UUID(); |
3829 | if (LLUUID.TryParse(id, out key)) | 3842 | if (UUID.TryParse(id, out key)) |
3830 | { | 3843 | { |
3831 | return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); | 3844 | return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); |
3832 | } | 3845 | } |
3833 | else | 3846 | else |
3834 | { | 3847 | { |
3835 | return LLUUID.Zero.ToString(); | 3848 | return UUID.Zero.ToString(); |
3836 | } | 3849 | } |
3837 | } | 3850 | } |
3838 | 3851 | ||
@@ -4041,8 +4054,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4041 | return 2; | 4054 | return 2; |
4042 | if (src.Data[index] is String) | 4055 | if (src.Data[index] is String) |
4043 | { | 4056 | { |
4044 | LLUUID tuuid; | 4057 | UUID tuuid; |
4045 | if (LLUUID.TryParse(src.Data[index].ToString(), out tuuid)) | 4058 | if (UUID.TryParse(src.Data[index].ToString(), out tuuid)) |
4046 | { | 4059 | { |
4047 | return 3; | 4060 | return 3; |
4048 | } | 4061 | } |
@@ -4454,8 +4467,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4454 | public string llKey2Name(string id) | 4467 | public string llKey2Name(string id) |
4455 | { | 4468 | { |
4456 | m_host.AddScriptLPS(1); | 4469 | m_host.AddScriptLPS(1); |
4457 | LLUUID key = new LLUUID(); | 4470 | UUID key = new UUID(); |
4458 | if (LLUUID.TryParse(id,out key)) | 4471 | if (UUID.TryParse(id,out key)) |
4459 | { | 4472 | { |
4460 | ScenePresence presence = World.GetScenePresence(key); | 4473 | ScenePresence presence = World.GetScenePresence(key); |
4461 | 4474 | ||
@@ -4479,7 +4492,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4479 | { | 4492 | { |
4480 | m_host.AddScriptLPS(1); | 4493 | m_host.AddScriptLPS(1); |
4481 | Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); | 4494 | Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); |
4482 | pTexAnim.Flags =(uint) mode; | 4495 | pTexAnim.Flags =(Primitive.TextureAnimMode)mode; |
4483 | 4496 | ||
4484 | //ALL_SIDES | 4497 | //ALL_SIDES |
4485 | if (face == -1) | 4498 | if (face == -1) |
@@ -4568,8 +4581,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4568 | public LSL_Types.LSLInteger llOverMyLand(string id) | 4581 | public LSL_Types.LSLInteger llOverMyLand(string id) |
4569 | { | 4582 | { |
4570 | m_host.AddScriptLPS(1); | 4583 | m_host.AddScriptLPS(1); |
4571 | LLUUID key = new LLUUID(); | 4584 | UUID key = new UUID(); |
4572 | if (LLUUID.TryParse(id,out key)) | 4585 | if (UUID.TryParse(id,out key)) |
4573 | { | 4586 | { |
4574 | ScenePresence presence = World.GetScenePresence(key); | 4587 | ScenePresence presence = World.GetScenePresence(key); |
4575 | if (presence != null) // object is an avatar | 4588 | if (presence != null) // object is an avatar |
@@ -4612,8 +4625,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4612 | { | 4625 | { |
4613 | m_host.AddScriptLPS(1); | 4626 | m_host.AddScriptLPS(1); |
4614 | 4627 | ||
4615 | LLUUID key = new LLUUID(); | 4628 | UUID key = new UUID(); |
4616 | if (LLUUID.TryParse(id, out key)) | 4629 | if (UUID.TryParse(id, out key)) |
4617 | { | 4630 | { |
4618 | ScenePresence av = World.GetScenePresence(key); | 4631 | ScenePresence av = World.GetScenePresence(key); |
4619 | 4632 | ||
@@ -4751,8 +4764,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4751 | Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); | 4764 | Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); |
4752 | 4765 | ||
4753 | // TODO find out about the other defaults and add them here | 4766 | // TODO find out about the other defaults and add them here |
4754 | ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); | 4767 | ps.PartStartColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f); |
4755 | ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); | 4768 | ps.PartEndColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f); |
4756 | ps.PartStartScaleX = 1.0f; | 4769 | ps.PartStartScaleX = 1.0f; |
4757 | ps.PartStartScaleY = 1.0f; | 4770 | ps.PartStartScaleY = 1.0f; |
4758 | ps.PartEndScaleX = 1.0f; | 4771 | ps.PartEndScaleX = 1.0f; |
@@ -4800,7 +4813,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4800 | 4813 | ||
4801 | case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR: | 4814 | case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR: |
4802 | tempv = (LSL_Types.Vector3)rules.Data[i + 1]; | 4815 | tempv = (LSL_Types.Vector3)rules.Data[i + 1]; |
4803 | //prules.PartEndColor = new LLColor(tempv.x,tempv.y,tempv.z,1); | 4816 | //prules.PartEndColor = new Color4(tempv.x,tempv.y,tempv.z,1); |
4804 | 4817 | ||
4805 | prules.PartEndColor.R = (float)tempv.x; | 4818 | prules.PartEndColor.R = (float)tempv.x; |
4806 | prules.PartEndColor.G = (float)tempv.y; | 4819 | prules.PartEndColor.G = (float)tempv.y; |
@@ -4879,8 +4892,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4879 | break; | 4892 | break; |
4880 | 4893 | ||
4881 | case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TARGET_KEY: | 4894 | case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TARGET_KEY: |
4882 | LLUUID key = LLUUID.Zero; | 4895 | UUID key = UUID.Zero; |
4883 | if (LLUUID.TryParse(rules.Data[i + 1].ToString(), out key)) | 4896 | if (UUID.TryParse(rules.Data[i + 1].ToString(), out key)) |
4884 | { | 4897 | { |
4885 | prules.Target = key; | 4898 | prules.Target = key; |
4886 | } | 4899 | } |
@@ -4924,37 +4937,37 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4924 | NotImplemented("llGroundRepel"); | 4937 | NotImplemented("llGroundRepel"); |
4925 | } | 4938 | } |
4926 | 4939 | ||
4927 | private LLUUID GetTaskInventoryItem(string name) | 4940 | private UUID GetTaskInventoryItem(string name) |
4928 | { | 4941 | { |
4929 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 4942 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
4930 | { | 4943 | { |
4931 | if (inv.Value.Name == name) | 4944 | if (inv.Value.Name == name) |
4932 | return inv.Key; | 4945 | return inv.Key; |
4933 | } | 4946 | } |
4934 | return LLUUID.Zero; | 4947 | return UUID.Zero; |
4935 | } | 4948 | } |
4936 | 4949 | ||
4937 | public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) | 4950 | public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) |
4938 | { | 4951 | { |
4939 | m_host.AddScriptLPS(1); | 4952 | m_host.AddScriptLPS(1); |
4940 | 4953 | ||
4941 | LLUUID destID; | 4954 | UUID destID; |
4942 | if (!LLUUID.TryParse(destination, out destID)) | 4955 | if (!UUID.TryParse(destination, out destID)) |
4943 | return; | 4956 | return; |
4944 | 4957 | ||
4945 | List<LLUUID> itemList = new List<LLUUID>(); | 4958 | List<UUID> itemList = new List<UUID>(); |
4946 | 4959 | ||
4947 | foreach (Object item in inventory.Data) | 4960 | foreach (Object item in inventory.Data) |
4948 | { | 4961 | { |
4949 | LLUUID itemID; | 4962 | UUID itemID; |
4950 | if (LLUUID.TryParse(item.ToString(), out itemID)) | 4963 | if (UUID.TryParse(item.ToString(), out itemID)) |
4951 | { | 4964 | { |
4952 | itemList.Add(itemID); | 4965 | itemList.Add(itemID); |
4953 | } | 4966 | } |
4954 | else | 4967 | else |
4955 | { | 4968 | { |
4956 | itemID = GetTaskInventoryItem(item.ToString()); | 4969 | itemID = GetTaskInventoryItem(item.ToString()); |
4957 | if (itemID != LLUUID.Zero) | 4970 | if (itemID != UUID.Zero) |
4958 | itemList.Add(itemID); | 4971 | itemList.Add(itemID); |
4959 | } | 4972 | } |
4960 | } | 4973 | } |
@@ -5015,7 +5028,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5015 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 | 5028 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 |
5016 | 5029 | ||
5017 | m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); | 5030 | m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); |
5018 | m_host.SitTargetOrientation = new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z); | 5031 | m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); |
5019 | } | 5032 | } |
5020 | 5033 | ||
5021 | public string llAvatarOnSitTarget() | 5034 | public string llAvatarOnSitTarget() |
@@ -5027,12 +5040,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5027 | public void llAddToLandPassList(string avatar, double hours) | 5040 | public void llAddToLandPassList(string avatar, double hours) |
5028 | { | 5041 | { |
5029 | m_host.AddScriptLPS(1); | 5042 | m_host.AddScriptLPS(1); |
5030 | LLUUID key; | 5043 | UUID key; |
5031 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 5044 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
5032 | if (land.OwnerID == m_host.OwnerID) | 5045 | if (land.OwnerID == m_host.OwnerID) |
5033 | { | 5046 | { |
5034 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 5047 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
5035 | if (LLUUID.TryParse(avatar, out key)) | 5048 | if (UUID.TryParse(avatar, out key)) |
5036 | { | 5049 | { |
5037 | entry.AgentID = key; | 5050 | entry.AgentID = key; |
5038 | entry.Flags = ParcelManager.AccessList.Access; | 5051 | entry.Flags = ParcelManager.AccessList.Access; |
@@ -5058,13 +5071,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5058 | public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) | 5071 | public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) |
5059 | { | 5072 | { |
5060 | m_host.AddScriptLPS(1); | 5073 | m_host.AddScriptLPS(1); |
5061 | m_host.SetCameraEyeOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); | 5074 | m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z)); |
5062 | } | 5075 | } |
5063 | 5076 | ||
5064 | public void llSetCameraAtOffset(LSL_Types.Vector3 offset) | 5077 | public void llSetCameraAtOffset(LSL_Types.Vector3 offset) |
5065 | { | 5078 | { |
5066 | m_host.AddScriptLPS(1); | 5079 | m_host.AddScriptLPS(1); |
5067 | m_host.SetCameraAtOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); | 5080 | m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z)); |
5068 | } | 5081 | } |
5069 | 5082 | ||
5070 | public string llDumpList2String(LSL_Types.list src, string seperator) | 5083 | public string llDumpList2String(LSL_Types.list src, string seperator) |
@@ -5086,7 +5099,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5086 | public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos) | 5099 | public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos) |
5087 | { | 5100 | { |
5088 | m_host.AddScriptLPS(1); | 5101 | m_host.AddScriptLPS(1); |
5089 | bool result = World.scriptDanger(m_host.LocalId, new LLVector3((float)pos.x, (float)pos.y, (float)pos.z)); | 5102 | bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z)); |
5090 | if (result) | 5103 | if (result) |
5091 | { | 5104 | { |
5092 | return 1; | 5105 | return 1; |
@@ -5101,8 +5114,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5101 | public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) | 5114 | public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) |
5102 | { | 5115 | { |
5103 | m_host.AddScriptLPS(1); | 5116 | m_host.AddScriptLPS(1); |
5104 | LLUUID av = new LLUUID(); | 5117 | UUID av = new UUID(); |
5105 | if (!LLUUID.TryParse(avatar,out av)) | 5118 | if (!UUID.TryParse(avatar,out av)) |
5106 | { | 5119 | { |
5107 | LSLError("First parameter to llDialog needs to be a key"); | 5120 | LSLError("First parameter to llDialog needs to be a key"); |
5108 | return; | 5121 | return; |
@@ -5127,7 +5140,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5127 | } | 5140 | } |
5128 | buts[i] = buttons.Data[i].ToString(); | 5141 | buts[i] = buttons.Data[i].ToString(); |
5129 | } | 5142 | } |
5130 | World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new LLUUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); | 5143 | World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); |
5131 | // ScriptSleep(1000); | 5144 | // ScriptSleep(1000); |
5132 | } | 5145 | } |
5133 | 5146 | ||
@@ -5144,7 +5157,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5144 | 5157 | ||
5145 | public void llResetOtherScript(string name) | 5158 | public void llResetOtherScript(string name) |
5146 | { | 5159 | { |
5147 | LLUUID item; | 5160 | UUID item; |
5148 | ScriptManager sm; | 5161 | ScriptManager sm; |
5149 | IScript script = null; | 5162 | IScript script = null; |
5150 | 5163 | ||
@@ -5153,7 +5166,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5153 | // These functions are supposed to be robust, | 5166 | // These functions are supposed to be robust, |
5154 | // so get the state one step at a time. | 5167 | // so get the state one step at a time. |
5155 | 5168 | ||
5156 | if ((item = ScriptByName(name)) != LLUUID.Zero) | 5169 | if ((item = ScriptByName(name)) != UUID.Zero) |
5157 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) | 5170 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) |
5158 | sm.ResetScript(m_localID, item); | 5171 | sm.ResetScript(m_localID, item); |
5159 | 5172 | ||
@@ -5168,7 +5181,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5168 | 5181 | ||
5169 | public LSL_Types.LSLInteger llGetScriptState(string name) | 5182 | public LSL_Types.LSLInteger llGetScriptState(string name) |
5170 | { | 5183 | { |
5171 | LLUUID item; | 5184 | UUID item; |
5172 | ScriptManager sm; | 5185 | ScriptManager sm; |
5173 | IScript script = null; | 5186 | IScript script = null; |
5174 | 5187 | ||
@@ -5177,7 +5190,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5177 | // These functions are supposed to be robust, | 5190 | // These functions are supposed to be robust, |
5178 | // so get the state one step at a time. | 5191 | // so get the state one step at a time. |
5179 | 5192 | ||
5180 | if ((item = ScriptByName(name)) != LLUUID.Zero) | 5193 | if ((item = ScriptByName(name)) != UUID.Zero) |
5181 | { | 5194 | { |
5182 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) | 5195 | if ((sm = m_ScriptEngine.m_ScriptManager) != null) |
5183 | { | 5196 | { |
@@ -5216,10 +5229,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5216 | { | 5229 | { |
5217 | m_host.AddScriptLPS(1); | 5230 | m_host.AddScriptLPS(1); |
5218 | bool found = false; | 5231 | bool found = false; |
5219 | LLUUID destId = LLUUID.Zero; | 5232 | UUID destId = UUID.Zero; |
5220 | LLUUID srcId = LLUUID.Zero; | 5233 | UUID srcId = UUID.Zero; |
5221 | 5234 | ||
5222 | if (!LLUUID.TryParse(target, out destId)) | 5235 | if (!UUID.TryParse(target, out destId)) |
5223 | { | 5236 | { |
5224 | llSay(0, "Could not parse key " + target); | 5237 | llSay(0, "Could not parse key " + target); |
5225 | return; | 5238 | return; |
@@ -5232,7 +5245,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5232 | } | 5245 | } |
5233 | 5246 | ||
5234 | // copy the first script found with this inventory name | 5247 | // copy the first script found with this inventory name |
5235 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 5248 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
5236 | { | 5249 | { |
5237 | if (inv.Value.Name == name) | 5250 | if (inv.Value.Name == name) |
5238 | { | 5251 | { |
@@ -5264,8 +5277,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5264 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 5277 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
5265 | if (xmlrpcMod.IsEnabled()) | 5278 | if (xmlrpcMod.IsEnabled()) |
5266 | { | 5279 | { |
5267 | LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, LLUUID.Zero); | 5280 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero); |
5268 | object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; | 5281 | object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; |
5269 | m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); | 5282 | m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); |
5270 | } | 5283 | } |
5271 | // ScriptSleep(1000); | 5284 | // ScriptSleep(1000); |
@@ -5583,9 +5596,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
5583 | private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) | 5596 | private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) |
5584 | { | 5597 | { |
5585 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 5598 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
5586 | LLUUID sculptId; | 5599 | UUID sculptId; |
5587 | 5600 | ||
5588 | if (!LLUUID.TryParse(map, out sculptId)) | 5601 | if (!UUID.TryParse(map, out sculptId)) |
5589 | { | 5602 | { |
5590 | llSay(0, "Could not parse key " + map); | 5603 | llSay(0, "Could not parse key " + map); |
5591 | return; | 5604 | return; |
@@ -6015,9 +6028,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6015 | ScenePresence av = World.GetScenePresence(id); | 6028 | ScenePresence av = World.GetScenePresence(id); |
6016 | if (av == null) | 6029 | if (av == null) |
6017 | return l; | 6030 | return l; |
6018 | LLUUID[] anims; | 6031 | UUID[] anims; |
6019 | anims = av.GetAnimationArray(); | 6032 | anims = av.GetAnimationArray(); |
6020 | foreach (LLUUID foo in anims) | 6033 | foreach (UUID foo in anims) |
6021 | l.Add(foo.ToString()); | 6034 | l.Add(foo.ToString()); |
6022 | return l; | 6035 | return l; |
6023 | } | 6036 | } |
@@ -6025,8 +6038,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6025 | public void llSetParcelMusicURL(string url) | 6038 | public void llSetParcelMusicURL(string url) |
6026 | { | 6039 | { |
6027 | m_host.AddScriptLPS(1); | 6040 | m_host.AddScriptLPS(1); |
6028 | LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | 6041 | UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
6029 | if (landowner == LLUUID.Zero) | 6042 | if (landowner == UUID.Zero) |
6030 | { | 6043 | { |
6031 | return; | 6044 | return; |
6032 | } | 6045 | } |
@@ -6041,9 +6054,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6041 | public void osSetParcelMediaURL(string url) | 6054 | public void osSetParcelMediaURL(string url) |
6042 | { | 6055 | { |
6043 | m_host.AddScriptLPS(1); | 6056 | m_host.AddScriptLPS(1); |
6044 | LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | 6057 | UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
6045 | 6058 | ||
6046 | if (landowner == LLUUID.Zero) | 6059 | if (landowner == UUID.Zero) |
6047 | { | 6060 | { |
6048 | return; | 6061 | return; |
6049 | } | 6062 | } |
@@ -6059,13 +6072,20 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6059 | public LSL_Types.Vector3 llGetRootPosition() | 6072 | public LSL_Types.Vector3 llGetRootPosition() |
6060 | { | 6073 | { |
6061 | m_host.AddScriptLPS(1); | 6074 | m_host.AddScriptLPS(1); |
6062 | return new LSL_Types.Vector3(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, m_host.ParentGroup.AbsolutePosition.Z); | 6075 | return new LSL_Types.Vector3( |
6076 | m_host.ParentGroup.AbsolutePosition.X, | ||
6077 | m_host.ParentGroup.AbsolutePosition.Y, | ||
6078 | m_host.ParentGroup.AbsolutePosition.Z); | ||
6063 | } | 6079 | } |
6064 | 6080 | ||
6065 | public LSL_Types.Quaternion llGetRootRotation() | 6081 | public LSL_Types.Quaternion llGetRootRotation() |
6066 | { | 6082 | { |
6067 | m_host.AddScriptLPS(1); | 6083 | m_host.AddScriptLPS(1); |
6068 | return new LSL_Types.Quaternion(m_host.ParentGroup.GroupRotation.X, m_host.ParentGroup.GroupRotation.Y, m_host.ParentGroup.GroupRotation.Z, m_host.ParentGroup.GroupRotation.W); | 6084 | return new LSL_Types.Quaternion( |
6085 | m_host.ParentGroup.GroupRotation.X, | ||
6086 | m_host.ParentGroup.GroupRotation.Y, | ||
6087 | m_host.ParentGroup.GroupRotation.Z, | ||
6088 | m_host.ParentGroup.GroupRotation.W); | ||
6069 | } | 6089 | } |
6070 | 6090 | ||
6071 | public string llGetObjectDesc() | 6091 | public string llGetObjectDesc() |
@@ -6097,8 +6117,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6097 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 6117 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
6098 | if (linknumber > -1) | 6118 | if (linknumber > -1) |
6099 | { | 6119 | { |
6100 | LLObject.TextureEntry tex = part.Shape.Textures; | 6120 | Primitive.TextureEntry tex = part.Shape.Textures; |
6101 | LLColor texcolor; | 6121 | Color4 texcolor; |
6102 | if (face > -1) | 6122 | if (face > -1) |
6103 | { | 6123 | { |
6104 | texcolor = tex.CreateFace((uint)face).RGBA; | 6124 | texcolor = tex.CreateFace((uint)face).RGBA; |
@@ -6136,8 +6156,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6136 | { | 6156 | { |
6137 | linknumber = w; | 6157 | linknumber = w; |
6138 | part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 6158 | part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
6139 | LLObject.TextureEntry tex = part.Shape.Textures; | 6159 | Primitive.TextureEntry tex = part.Shape.Textures; |
6140 | LLColor texcolor; | 6160 | Color4 texcolor; |
6141 | if (face > -1) | 6161 | if (face > -1) |
6142 | { | 6162 | { |
6143 | texcolor = tex.CreateFace((uint)face).RGBA; | 6163 | texcolor = tex.CreateFace((uint)face).RGBA; |
@@ -6184,7 +6204,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6184 | 6204 | ||
6185 | public LSL_Types.Vector3 llGetGeometricCenter() | 6205 | public LSL_Types.Vector3 llGetGeometricCenter() |
6186 | { | 6206 | { |
6187 | return new LSL_Types.Vector3(m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z); | 6207 | return new LSL_Types.Vector3( |
6208 | m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z); | ||
6188 | } | 6209 | } |
6189 | 6210 | ||
6190 | public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules) | 6211 | public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules) |
@@ -6205,21 +6226,21 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6205 | break; | 6226 | break; |
6206 | 6227 | ||
6207 | case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS: | 6228 | case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS: |
6208 | if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) | 6229 | if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0) |
6209 | res.Add(new LSL_Types.LSLInteger(1)); | 6230 | res.Add(new LSL_Types.LSLInteger(1)); |
6210 | else | 6231 | else |
6211 | res.Add(new LSL_Types.LSLInteger(0)); | 6232 | res.Add(new LSL_Types.LSLInteger(0)); |
6212 | break; | 6233 | break; |
6213 | 6234 | ||
6214 | case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ: | 6235 | case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ: |
6215 | if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) | 6236 | if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0) |
6216 | res.Add(new LSL_Types.LSLInteger(1)); | 6237 | res.Add(new LSL_Types.LSLInteger(1)); |
6217 | else | 6238 | else |
6218 | res.Add(new LSL_Types.LSLInteger(0)); | 6239 | res.Add(new LSL_Types.LSLInteger(0)); |
6219 | break; | 6240 | break; |
6220 | 6241 | ||
6221 | case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM: | 6242 | case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM: |
6222 | if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) | 6243 | if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0) |
6223 | res.Add(new LSL_Types.LSLInteger(1)); | 6244 | res.Add(new LSL_Types.LSLInteger(1)); |
6224 | else | 6245 | else |
6225 | res.Add(new LSL_Types.LSLInteger(0)); | 6246 | res.Add(new LSL_Types.LSLInteger(0)); |
@@ -6324,8 +6345,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6324 | if (face == -1) | 6345 | if (face == -1) |
6325 | face = 0; | 6346 | face = 0; |
6326 | 6347 | ||
6327 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 6348 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
6328 | LLObject.TextureEntryFace texface = tex.GetFace((uint)face); | 6349 | Primitive.TextureEntryFace texface = tex.GetFace((uint)face); |
6329 | 6350 | ||
6330 | res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); | 6351 | res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); |
6331 | res.Add(new LSL_Types.Vector3(texface.RepeatU, | 6352 | res.Add(new LSL_Types.Vector3(texface.RepeatU, |
@@ -6344,7 +6365,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6344 | face=Convert.ToInt32("" + rules.Data[idx++]); | 6365 | face=Convert.ToInt32("" + rules.Data[idx++]); |
6345 | 6366 | ||
6346 | tex = m_host.Shape.Textures; | 6367 | tex = m_host.Shape.Textures; |
6347 | LLColor texcolor; | 6368 | Color4 texcolor; |
6348 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color | 6369 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color |
6349 | texcolor = tex.DefaultTexture.RGBA; | 6370 | texcolor = tex.DefaultTexture.RGBA; |
6350 | else | 6371 | else |
@@ -6698,7 +6719,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6698 | public void llSetLocalRot(LSL_Types.Quaternion rot) | 6719 | public void llSetLocalRot(LSL_Types.Quaternion rot) |
6699 | { | 6720 | { |
6700 | m_host.AddScriptLPS(1); | 6721 | m_host.AddScriptLPS(1); |
6701 | m_host.RotationOffset = new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); | 6722 | m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); |
6702 | // ScriptSleep(200); | 6723 | // ScriptSleep(200); |
6703 | } | 6724 | } |
6704 | 6725 | ||
@@ -6954,7 +6975,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6954 | public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) | 6975 | public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) |
6955 | { | 6976 | { |
6956 | m_host.AddScriptLPS(1); | 6977 | m_host.AddScriptLPS(1); |
6957 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 6978 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
6958 | { | 6979 | { |
6959 | if (inv.Value.Name == item) | 6980 | if (inv.Value.Name == item) |
6960 | { | 6981 | { |
@@ -6985,7 +7006,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6985 | public string llGetInventoryCreator(string item) | 7006 | public string llGetInventoryCreator(string item) |
6986 | { | 7007 | { |
6987 | m_host.AddScriptLPS(1); | 7008 | m_host.AddScriptLPS(1); |
6988 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 7009 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
6989 | { | 7010 | { |
6990 | if (inv.Value.Name == item) | 7011 | if (inv.Value.Name == item) |
6991 | { | 7012 | { |
@@ -7000,7 +7021,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7000 | { | 7021 | { |
7001 | m_host.AddScriptLPS(1); | 7022 | m_host.AddScriptLPS(1); |
7002 | 7023 | ||
7003 | World.SimChatBroadcast(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); | 7024 | World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); |
7004 | // IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 7025 | // IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
7005 | // wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); | 7026 | // wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); |
7006 | } | 7027 | } |
@@ -7021,7 +7042,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7021 | if (info == null) | 7042 | if (info == null) |
7022 | { | 7043 | { |
7023 | // ScriptSleep(1000); | 7044 | // ScriptSleep(1000); |
7024 | return LLUUID.Zero.ToString(); | 7045 | return UUID.Zero.ToString(); |
7025 | } | 7046 | } |
7026 | reply = new LSL_Types.Vector3( | 7047 | reply = new LSL_Types.Vector3( |
7027 | info.RegionLocX * Constants.RegionSize, | 7048 | info.RegionLocX * Constants.RegionSize, |
@@ -7038,7 +7059,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7038 | if (info == null) | 7059 | if (info == null) |
7039 | { | 7060 | { |
7040 | // ScriptSleep(1000); | 7061 | // ScriptSleep(1000); |
7041 | return LLUUID.Zero.ToString(); | 7062 | return UUID.Zero.ToString(); |
7042 | } | 7063 | } |
7043 | int access = info.RegionSettings.Maturity; | 7064 | int access = info.RegionSettings.Maturity; |
7044 | if (access == 0) | 7065 | if (access == 0) |
@@ -7053,11 +7074,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7053 | break; | 7074 | break; |
7054 | default: | 7075 | default: |
7055 | // ScriptSleep(1000); | 7076 | // ScriptSleep(1000); |
7056 | return LLUUID.Zero.ToString(); // Raise no event | 7077 | return UUID.Zero.ToString(); // Raise no event |
7057 | } | 7078 | } |
7058 | LLUUID rq = LLUUID.Random(); | 7079 | UUID rq = UUID.Random(); |
7059 | 7080 | ||
7060 | LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager. | 7081 | UUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager. |
7061 | m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString()); | 7082 | m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString()); |
7062 | 7083 | ||
7063 | m_ScriptEngine.m_ASYNCLSLCommandManager. | 7084 | m_ScriptEngine.m_ASYNCLSLCommandManager. |
@@ -7069,7 +7090,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7069 | catch(Exception e) | 7090 | catch(Exception e) |
7070 | { | 7091 | { |
7071 | Console.WriteLine(e.ToString()); | 7092 | Console.WriteLine(e.ToString()); |
7072 | return LLUUID.Zero.ToString(); | 7093 | return UUID.Zero.ToString(); |
7073 | } | 7094 | } |
7074 | } | 7095 | } |
7075 | 7096 | ||
@@ -7082,8 +7103,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7082 | public double llGetObjectMass(string id) | 7103 | public double llGetObjectMass(string id) |
7083 | { | 7104 | { |
7084 | m_host.AddScriptLPS(1); | 7105 | m_host.AddScriptLPS(1); |
7085 | LLUUID key = new LLUUID(); | 7106 | UUID key = new UUID(); |
7086 | if (LLUUID.TryParse(id,out key)) | 7107 | if (UUID.TryParse(id,out key)) |
7087 | { | 7108 | { |
7088 | return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass(); | 7109 | return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass(); |
7089 | } | 7110 | } |
@@ -7175,7 +7196,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7175 | public void llLoadURL(string avatar_id, string message, string url) | 7196 | public void llLoadURL(string avatar_id, string message, string url) |
7176 | { | 7197 | { |
7177 | m_host.AddScriptLPS(1); | 7198 | m_host.AddScriptLPS(1); |
7178 | LLUUID avatarId = new LLUUID(avatar_id); | 7199 | UUID avatarId = new UUID(avatar_id); |
7179 | m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, | 7200 | m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, |
7180 | url); | 7201 | url); |
7181 | // ScriptSleep(10000); | 7202 | // ScriptSleep(10000); |
@@ -7321,7 +7342,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7321 | public LSL_Types.LSLInteger llGetInventoryType(string name) | 7342 | public LSL_Types.LSLInteger llGetInventoryType(string name) |
7322 | { | 7343 | { |
7323 | m_host.AddScriptLPS(1); | 7344 | m_host.AddScriptLPS(1); |
7324 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 7345 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
7325 | { | 7346 | { |
7326 | if (inv.Value.Name == name) | 7347 | if (inv.Value.Name == name) |
7327 | { | 7348 | { |
@@ -7350,10 +7371,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7350 | public LSL_Types.Vector3 llGetCameraPos() | 7371 | public LSL_Types.Vector3 llGetCameraPos() |
7351 | { | 7372 | { |
7352 | m_host.AddScriptLPS(1); | 7373 | m_host.AddScriptLPS(1); |
7353 | LLUUID invItemID=InventorySelf(); | 7374 | UUID invItemID=InventorySelf(); |
7354 | if (invItemID == LLUUID.Zero) | 7375 | if (invItemID == UUID.Zero) |
7355 | return new LSL_Types.Vector3(); | 7376 | return new LSL_Types.Vector3(); |
7356 | if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) | 7377 | if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) |
7357 | return new LSL_Types.Vector3(); | 7378 | return new LSL_Types.Vector3(); |
7358 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0) | 7379 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0) |
7359 | { | 7380 | { |
@@ -7363,7 +7384,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7363 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); | 7384 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); |
7364 | if (presence != null) | 7385 | if (presence != null) |
7365 | { | 7386 | { |
7366 | LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); | 7387 | LSL_Types.Vector3 pos = new LSL_Types.Vector3( |
7388 | presence.CameraPosition.X, | ||
7389 | presence.CameraPosition.Y, | ||
7390 | presence.CameraPosition.Z); | ||
7367 | return pos; | 7391 | return pos; |
7368 | } | 7392 | } |
7369 | return new LSL_Types.Vector3(); | 7393 | return new LSL_Types.Vector3(); |
@@ -7426,12 +7450,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7426 | public void llAddToLandBanList(string avatar, double hours) | 7450 | public void llAddToLandBanList(string avatar, double hours) |
7427 | { | 7451 | { |
7428 | m_host.AddScriptLPS(1); | 7452 | m_host.AddScriptLPS(1); |
7429 | LLUUID key; | 7453 | UUID key; |
7430 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 7454 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
7431 | if (land.OwnerID == m_host.OwnerID) | 7455 | if (land.OwnerID == m_host.OwnerID) |
7432 | { | 7456 | { |
7433 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 7457 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
7434 | if (LLUUID.TryParse(avatar, out key)) | 7458 | if (UUID.TryParse(avatar, out key)) |
7435 | { | 7459 | { |
7436 | entry.AgentID = key; | 7460 | entry.AgentID = key; |
7437 | entry.Flags = ParcelManager.AccessList.Ban; | 7461 | entry.Flags = ParcelManager.AccessList.Ban; |
@@ -7445,11 +7469,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7445 | public void llRemoveFromLandPassList(string avatar) | 7469 | public void llRemoveFromLandPassList(string avatar) |
7446 | { | 7470 | { |
7447 | m_host.AddScriptLPS(1); | 7471 | m_host.AddScriptLPS(1); |
7448 | LLUUID key; | 7472 | UUID key; |
7449 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 7473 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
7450 | if (land.OwnerID == m_host.OwnerID) | 7474 | if (land.OwnerID == m_host.OwnerID) |
7451 | { | 7475 | { |
7452 | if (LLUUID.TryParse(avatar, out key)) | 7476 | if (UUID.TryParse(avatar, out key)) |
7453 | { | 7477 | { |
7454 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) | 7478 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) |
7455 | { | 7479 | { |
@@ -7467,11 +7491,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7467 | public void llRemoveFromLandBanList(string avatar) | 7491 | public void llRemoveFromLandBanList(string avatar) |
7468 | { | 7492 | { |
7469 | m_host.AddScriptLPS(1); | 7493 | m_host.AddScriptLPS(1); |
7470 | LLUUID key; | 7494 | UUID key; |
7471 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 7495 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
7472 | if (land.OwnerID == m_host.OwnerID) | 7496 | if (land.OwnerID == m_host.OwnerID) |
7473 | { | 7497 | { |
7474 | if (LLUUID.TryParse(avatar, out key)) | 7498 | if (UUID.TryParse(avatar, out key)) |
7475 | { | 7499 | { |
7476 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) | 7500 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) |
7477 | { | 7501 | { |
@@ -7491,16 +7515,16 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7491 | m_host.AddScriptLPS(1); | 7515 | m_host.AddScriptLPS(1); |
7492 | 7516 | ||
7493 | // our key in the object we are in | 7517 | // our key in the object we are in |
7494 | LLUUID invItemID=InventorySelf(); | 7518 | UUID invItemID=InventorySelf(); |
7495 | if (invItemID == LLUUID.Zero) return; | 7519 | if (invItemID == UUID.Zero) return; |
7496 | 7520 | ||
7497 | // the object we are in | 7521 | // the object we are in |
7498 | LLUUID objectID = m_host.ParentUUID; | 7522 | UUID objectID = m_host.ParentUUID; |
7499 | if (objectID == LLUUID.Zero) return; | 7523 | if(objectID == UUID.Zero) return; |
7500 | 7524 | ||
7501 | // we need the permission first, to know which avatar we want to set the camera for | 7525 | // we need the permission first, to know which avatar we want to set the camera for |
7502 | LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; | 7526 | UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; |
7503 | if (agentID == LLUUID.Zero) return; | 7527 | if (agentID == UUID.Zero) return; |
7504 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; | 7528 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; |
7505 | 7529 | ||
7506 | ScenePresence presence = World.GetScenePresence(agentID); | 7530 | ScenePresence presence = World.GetScenePresence(agentID); |
@@ -7542,16 +7566,16 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7542 | m_host.AddScriptLPS(1); | 7566 | m_host.AddScriptLPS(1); |
7543 | 7567 | ||
7544 | // our key in the object we are in | 7568 | // our key in the object we are in |
7545 | LLUUID invItemID=InventorySelf(); | 7569 | UUID invItemID=InventorySelf(); |
7546 | if (invItemID == LLUUID.Zero) return; | 7570 | if (invItemID == UUID.Zero) return; |
7547 | 7571 | ||
7548 | // the object we are in | 7572 | // the object we are in |
7549 | LLUUID objectID = m_host.ParentUUID; | 7573 | UUID objectID = m_host.ParentUUID; |
7550 | if (objectID == LLUUID.Zero) return; | 7574 | if(objectID == UUID.Zero) return; |
7551 | 7575 | ||
7552 | // we need the permission first, to know which avatar we want to clear the camera for | 7576 | // we need the permission first, to know which avatar we want to clear the camera for |
7553 | LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; | 7577 | UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; |
7554 | if (agentID == LLUUID.Zero) return; | 7578 | if (agentID == UUID.Zero) return; |
7555 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; | 7579 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; |
7556 | 7580 | ||
7557 | ScenePresence presence = World.GetScenePresence(agentID); | 7581 | ScenePresence presence = World.GetScenePresence(agentID); |
@@ -7650,9 +7674,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7650 | param.Add(o.ToString()); | 7674 | param.Add(o.ToString()); |
7651 | } | 7675 | } |
7652 | 7676 | ||
7653 | LLVector3 position = m_host.AbsolutePosition; | 7677 | Vector3 position = m_host.AbsolutePosition; |
7654 | LLVector3 velocity = m_host.Velocity; | 7678 | Vector3 velocity = m_host.Velocity; |
7655 | LLQuaternion rotation = m_host.RotationOffset; | 7679 | Quaternion rotation = m_host.RotationOffset; |
7656 | ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); | 7680 | ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); |
7657 | RegionInfo regionInfo = World.RegionInfo; | 7681 | RegionInfo regionInfo = World.RegionInfo; |
7658 | 7682 | ||
@@ -7668,10 +7692,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7668 | httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; | 7692 | httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; |
7669 | httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); | 7693 | httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); |
7670 | 7694 | ||
7671 | LLUUID reqID = httpScriptMod. | 7695 | UUID reqID = httpScriptMod. |
7672 | StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); | 7696 | StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); |
7673 | 7697 | ||
7674 | if (reqID != LLUUID.Zero) | 7698 | if (reqID != UUID.Zero) |
7675 | return reqID.ToString(); | 7699 | return reqID.ToString(); |
7676 | else | 7700 | else |
7677 | return null; | 7701 | return null; |
@@ -7781,7 +7805,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7781 | LSL_Types.list ret = new LSL_Types.list(); | 7805 | LSL_Types.list ret = new LSL_Types.list(); |
7782 | if (land != null) | 7806 | if (land != null) |
7783 | { | 7807 | { |
7784 | foreach (KeyValuePair<LLUUID, int> d in land.getLandObjectOwners()) | 7808 | foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners()) |
7785 | { | 7809 | { |
7786 | ret.Add(d.Key.ToString()); | 7810 | ret.Add(d.Key.ToString()); |
7787 | ret.Add(d.Value); | 7811 | ret.Add(d.Value); |
@@ -7794,7 +7818,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7794 | public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) | 7818 | public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) |
7795 | { | 7819 | { |
7796 | m_host.AddScriptLPS(1); | 7820 | m_host.AddScriptLPS(1); |
7797 | SceneObjectPart part = World.GetSceneObjectPart(new LLUUID(object_id)); | 7821 | SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id)); |
7798 | if (part == null) | 7822 | if (part == null) |
7799 | { | 7823 | { |
7800 | return 0; | 7824 | return 0; |
@@ -7900,8 +7924,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7900 | { | 7924 | { |
7901 | m_host.AddScriptLPS(1); | 7925 | m_host.AddScriptLPS(1); |
7902 | LSL_Types.list ret = new LSL_Types.list(); | 7926 | LSL_Types.list ret = new LSL_Types.list(); |
7903 | LLUUID key = new LLUUID(); | 7927 | UUID key = new UUID(); |
7904 | if (LLUUID.TryParse(id, out key)) | 7928 | if (UUID.TryParse(id, out key)) |
7905 | { | 7929 | { |
7906 | ScenePresence av = World.GetScenePresence(key); | 7930 | ScenePresence av = World.GetScenePresence(key); |
7907 | 7931 | ||
@@ -7921,19 +7945,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7921 | ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); | 7945 | ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); |
7922 | break; | 7946 | break; |
7923 | case "4": | 7947 | case "4": |
7924 | ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); | 7948 | ret.Add(new LSL_Types.Quaternion((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W)); |
7925 | break; | 7949 | break; |
7926 | case "5": | 7950 | case "5": |
7927 | ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); | 7951 | ret.Add(new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z)); |
7928 | break; | 7952 | break; |
7929 | case "6": | 7953 | case "6": |
7930 | ret.Add(id); | 7954 | ret.Add(id); |
7931 | break; | 7955 | break; |
7932 | case "7": | 7956 | case "7": |
7933 | ret.Add(LLUUID.Zero.ToString()); | 7957 | ret.Add(UUID.Zero.ToString()); |
7934 | break; | 7958 | break; |
7935 | case "8": | 7959 | case "8": |
7936 | ret.Add(LLUUID.Zero.ToString()); | 7960 | ret.Add(UUID.Zero.ToString()); |
7937 | break; | 7961 | break; |
7938 | } | 7962 | } |
7939 | } | 7963 | } |
@@ -7953,7 +7977,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7953 | ret.Add(obj.Description); | 7977 | ret.Add(obj.Description); |
7954 | break; | 7978 | break; |
7955 | case "3": | 7979 | case "3": |
7956 | ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X,obj.AbsolutePosition.Y,obj.AbsolutePosition.Z)); | 7980 | ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z)); |
7957 | break; | 7981 | break; |
7958 | case "4": | 7982 | case "4": |
7959 | ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); | 7983 | ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); |
@@ -7979,14 +8003,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7979 | } | 8003 | } |
7980 | 8004 | ||
7981 | 8005 | ||
7982 | internal LLUUID ScriptByName(string name) | 8006 | internal UUID ScriptByName(string name) |
7983 | { | 8007 | { |
7984 | foreach (TaskInventoryItem item in m_host.TaskInventory.Values) | 8008 | foreach (TaskInventoryItem item in m_host.TaskInventory.Values) |
7985 | { | 8009 | { |
7986 | if (item.Type == 10 && item.Name == name) | 8010 | if (item.Type == 10 && item.Name == name) |
7987 | return item.ItemID; | 8011 | return item.ItemID; |
7988 | } | 8012 | } |
7989 | return LLUUID.Zero; | 8013 | return UUID.Zero; |
7990 | } | 8014 | } |
7991 | 8015 | ||
7992 | internal void ShoutError(string msg) | 8016 | internal void ShoutError(string msg) |
@@ -8063,7 +8087,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
8063 | String[] notecardLines = { "0" }; | 8087 | String[] notecardLines = { "0" }; |
8064 | notecardLines[0] = String.Empty; | 8088 | notecardLines[0] = String.Empty; |
8065 | 8089 | ||
8066 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 8090 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
8067 | { | 8091 | { |
8068 | if ((inv.Value.Name == name) && (inv.Value.InvType == (int)InventoryType.Notecard)) | 8092 | if ((inv.Value.Name == name) && (inv.Value.InvType == (int)InventoryType.Notecard)) |
8069 | { | 8093 | { |