diff options
15 files changed, 152 insertions, 146 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 0fb297f..3b67d6e 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs | |||
@@ -91,7 +91,9 @@ namespace OpenSim.Data.NHibernate | |||
91 | { | 91 | { |
92 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; | 92 | user = session.Load(typeof(UserProfileData), uuid) as UserProfileData; |
93 | } | 93 | } |
94 | catch (Exception) {} | 94 | catch (Exception) |
95 | { | ||
96 | } | ||
95 | 97 | ||
96 | return (user != null); | 98 | return (user != null); |
97 | } | 99 | } |
@@ -161,10 +163,13 @@ namespace OpenSim.Data.NHibernate | |||
161 | { | 163 | { |
162 | UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData; | 164 | UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData; |
163 | 165 | ||
164 | if (old == null) { | 166 | if (old == null) |
167 | { | ||
165 | session.Save(agent); | 168 | session.Save(agent); |
166 | session.Transaction.Commit(); | 169 | session.Transaction.Commit(); |
167 | } else { | 170 | } |
171 | else | ||
172 | { | ||
168 | UpdateUserAgent(agent); | 173 | UpdateUserAgent(agent); |
169 | } | 174 | } |
170 | } | 175 | } |
@@ -235,13 +240,13 @@ namespace OpenSim.Data.NHibernate | |||
235 | 240 | ||
236 | // TODO: actually implement these | 241 | // TODO: actually implement these |
237 | public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { return; } | 242 | public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { return; } |
238 | public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;} | 243 | public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) { return; } |
239 | public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) {return;} | 244 | public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) { return; } |
240 | public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) {return;} | 245 | public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) { return; } |
241 | public override void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) {return;} | 246 | public override void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) { return; } |
242 | public override List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) {return new List<FriendListItem>();} | 247 | public override List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) { return new List<FriendListItem>(); } |
243 | public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) {return true;} | 248 | public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) { return true; } |
244 | public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory) {return true;} | 249 | public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory) { return true; } |
245 | 250 | ||
246 | /// Appearance | 251 | /// Appearance |
247 | /// TODO: stubs for now to get us to a compiling state gently | 252 | /// TODO: stubs for now to get us to a compiling state gently |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 714d8eb..6f1a3cb 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -136,13 +136,13 @@ namespace OpenSim | |||
136 | 136 | ||
137 | #region Console Commands | 137 | #region Console Commands |
138 | 138 | ||
139 | private void RunEchoTest(string[] cmdparams) | 139 | private void RunEchoTest(string[] cmdparams) |
140 | { | 140 | { |
141 | for (int i = 0; i < cmdparams.Length; i++) | 141 | for (int i = 0; i < cmdparams.Length; i++) |
142 | { | 142 | { |
143 | m_log.Info("[EchoTest]: <arg" + i + ">"+cmdparams[i]+"</arg" + i + ">"); | 143 | m_log.Info("[EchoTest]: <arg" + i + ">"+cmdparams[i]+"</arg" + i + ">"); |
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
147 | private void KickUserCommand(string[] cmdparams) | 147 | private void KickUserCommand(string[] cmdparams) |
148 | { | 148 | { |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs index 49347b2..1bda2a0 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs | |||
@@ -470,7 +470,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
470 | } | 470 | } |
471 | } | 471 | } |
472 | 472 | ||
473 | |||
474 | /// <summary> | 473 | /// <summary> |
475 | /// Checks to see height deltas in the tainted terrain patch at xStart ,yStart | 474 | /// Checks to see height deltas in the tainted terrain patch at xStart ,yStart |
476 | /// are all within the current estate limits | 475 | /// are all within the current estate limits |
@@ -493,7 +492,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
493 | double bakedHeight = m_revert[x, y]; | 492 | double bakedHeight = m_revert[x, y]; |
494 | double requestedDelta = requestedHeight - bakedHeight; | 493 | double requestedDelta = requestedHeight - bakedHeight; |
495 | 494 | ||
496 | if (requestedDelta > maxDelta ) | 495 | if (requestedDelta > maxDelta) |
497 | { | 496 | { |
498 | m_channel[x, y] = bakedHeight + maxDelta; | 497 | m_channel[x, y] = bakedHeight + maxDelta; |
499 | changesLimited = true; | 498 | changesLimited = true; |
@@ -509,7 +508,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
509 | return changesLimited; | 508 | return changesLimited; |
510 | } | 509 | } |
511 | 510 | ||
512 | |||
513 | /// <summary> | 511 | /// <summary> |
514 | /// Sends a copy of the current terrain to the scenes clients | 512 | /// Sends a copy of the current terrain to the scenes clients |
515 | /// </summary> | 513 | /// </summary> |
@@ -589,7 +587,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
589 | } | 587 | } |
590 | } | 588 | } |
591 | 589 | ||
592 | |||
593 | #region Console Commands | 590 | #region Console Commands |
594 | 591 | ||
595 | private void InterfaceLoadFile(Object[] args) | 592 | private void InterfaceLoadFile(Object[] args) |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 5acad88..37da33d 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -849,7 +849,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
849 | /// <returns></returns> | 849 | /// <returns></returns> |
850 | protected internal List<EntityBase> GetEntities() | 850 | protected internal List<EntityBase> GetEntities() |
851 | { | 851 | { |
852 | lock(Entities) | 852 | lock (Entities) |
853 | { | 853 | { |
854 | if (0 == Entities.Count) return null; | 854 | if (0 == Entities.Count) return null; |
855 | return new List<EntityBase>(Entities.Values); | 855 | return new List<EntityBase>(Entities.Values); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index d779dd7..b076855 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -918,7 +918,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
918 | } | 918 | } |
919 | 919 | ||
920 | } | 920 | } |
921 | 921 | ||
922 | /// <summary> | 922 | /// <summary> |
923 | /// <see>ClientMoveTaskInventoryItem</see> | 923 | /// <see>ClientMoveTaskInventoryItem</see> |
924 | /// </summary> | 924 | /// </summary> |
@@ -927,7 +927,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
927 | /// <param name="primLocalID"></param> | 927 | /// <param name="primLocalID"></param> |
928 | /// <param name="itemID"></param> | 928 | /// <param name="itemID"></param> |
929 | public void ClientMoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, uint primLocalId, LLUUID itemId) | 929 | public void ClientMoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, uint primLocalId, LLUUID itemId) |
930 | { | 930 | { |
931 | SceneObjectPart part = GetSceneObjectPart(primLocalId); | 931 | SceneObjectPart part = GetSceneObjectPart(primLocalId); |
932 | 932 | ||
933 | if (null == part) | 933 | if (null == part) |
@@ -948,19 +948,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
948 | return; | 948 | return; |
949 | } | 949 | } |
950 | 950 | ||
951 | MoveTaskInventoryItem(remoteClient, folderId, part, itemId); | 951 | MoveTaskInventoryItem(remoteClient, folderId, part, itemId); |
952 | } | 952 | } |
953 | 953 | ||
954 | /// <summary> | 954 | /// <summary> |
955 | /// <see>MoveTaskInventoryItem</see> | 955 | /// <see>MoveTaskInventoryItem</see> |
956 | /// </summary> | 956 | /// </summary> |
957 | /// <param name="remoteClient"></param> | 957 | /// <param name="remoteClient"></param> |
958 | /// <param name="folderID"></param> | 958 | /// <param name="folderID"></param> |
959 | /// <param name="part"></param> | 959 | /// <param name="part"></param> |
960 | /// <param name="itemID"></param> | 960 | /// <param name="itemID"></param> |
961 | public void MoveTaskInventoryItem(LLUUID avatarId, LLUUID folderId, SceneObjectPart part, LLUUID itemId) | 961 | public void MoveTaskInventoryItem(LLUUID avatarId, LLUUID folderId, SceneObjectPart part, LLUUID itemId) |
962 | { | 962 | { |
963 | ScenePresence avatar; | 963 | ScenePresence avatar; |
964 | 964 | ||
965 | if (TryGetAvatar(avatarId, out avatar)) | 965 | if (TryGetAvatar(avatarId, out avatar)) |
966 | { | 966 | { |
@@ -973,53 +973,53 @@ namespace OpenSim.Region.Environment.Scenes | |||
973 | "Avatar {0} cannot be found to update its prim item asset", | 973 | "Avatar {0} cannot be found to update its prim item asset", |
974 | avatarId); | 974 | avatarId); |
975 | } | 975 | } |
976 | } | 976 | } |
977 | 977 | ||
978 | /// <summary> | 978 | /// <summary> |
979 | /// Copy a task (prim) inventory item to another task (prim) | 979 | /// Copy a task (prim) inventory item to another task (prim) |
980 | /// </summary> | 980 | /// </summary> |
981 | /// <param name="destId"></param> | 981 | /// <param name="destId"></param> |
982 | /// <param name="part"></param> | 982 | /// <param name="part"></param> |
983 | /// <param name="itemId"></param> | 983 | /// <param name="itemId"></param> |
984 | public void MoveTaskInventoryItem(LLUUID destId, SceneObjectPart part, LLUUID itemId) | 984 | public void MoveTaskInventoryItem(LLUUID destId, SceneObjectPart part, LLUUID itemId) |
985 | { | 985 | { |
986 | TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId); | 986 | TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId); |
987 | 987 | ||
988 | if(srcTaskItem == null) | 988 | if (srcTaskItem == null) |
989 | { | 989 | { |
990 | // error was already logged | 990 | // error was already logged |
991 | return; | 991 | return; |
992 | } | 992 | } |
993 | 993 | ||
994 | SceneObjectPart destPart = GetSceneObjectPart(destId); | 994 | SceneObjectPart destPart = GetSceneObjectPart(destId); |
995 | 995 | ||
996 | if(destPart == null) | 996 | if (destPart == null) |
997 | { | 997 | { |
998 | m_log.ErrorFormat( | 998 | m_log.ErrorFormat( |
999 | "[PRIM INVENTORY]: " + | 999 | "[PRIM INVENTORY]: " + |
1000 | "Could not find prim for ID {0}", | 1000 | "Could not find prim for ID {0}", |
1001 | destId); | 1001 | destId); |
1002 | return; | 1002 | return; |
1003 | } | 1003 | } |
1004 | 1004 | ||
1005 | TaskInventoryItem destTaskItem = new TaskInventoryItem(); | 1005 | TaskInventoryItem destTaskItem = new TaskInventoryItem(); |
1006 | 1006 | ||
1007 | destTaskItem.ItemID = LLUUID.Random(); | 1007 | destTaskItem.ItemID = LLUUID.Random(); |
1008 | destTaskItem.CreatorID = srcTaskItem.CreatorID; | 1008 | destTaskItem.CreatorID = srcTaskItem.CreatorID; |
1009 | destTaskItem.AssetID = srcTaskItem.AssetID; | 1009 | destTaskItem.AssetID = srcTaskItem.AssetID; |
1010 | destTaskItem.GroupID = destPart.GroupID; | 1010 | destTaskItem.GroupID = destPart.GroupID; |
1011 | destTaskItem.OwnerID = destPart.OwnerID; | 1011 | destTaskItem.OwnerID = destPart.OwnerID; |
1012 | destTaskItem.ParentID = destPart.UUID; | 1012 | destTaskItem.ParentID = destPart.UUID; |
1013 | destTaskItem.ParentPartID = destPart.UUID; | 1013 | destTaskItem.ParentPartID = destPart.UUID; |
1014 | 1014 | ||
1015 | destTaskItem.BaseMask = srcTaskItem.BaseMask; | 1015 | destTaskItem.BaseMask = srcTaskItem.BaseMask; |
1016 | destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask; | 1016 | destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask; |
1017 | destTaskItem.GroupMask = srcTaskItem.GroupMask; | 1017 | destTaskItem.GroupMask = srcTaskItem.GroupMask; |
1018 | destTaskItem.OwnerMask = srcTaskItem.OwnerMask; | 1018 | destTaskItem.OwnerMask = srcTaskItem.OwnerMask; |
1019 | destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask; | 1019 | destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask; |
1020 | destTaskItem.Flags = srcTaskItem.Flags; | 1020 | destTaskItem.Flags = srcTaskItem.Flags; |
1021 | 1021 | ||
1022 | if(destPart.OwnerID != part.OwnerID) | 1022 | if (destPart.OwnerID != part.OwnerID) |
1023 | { | 1023 | { |
1024 | if (ExternalChecks.ExternalChecksPropagatePermissions()) | 1024 | if (ExternalChecks.ExternalChecksPropagatePermissions()) |
1025 | { | 1025 | { |
@@ -1035,18 +1035,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
1035 | } | 1035 | } |
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | destTaskItem.Description = srcTaskItem.Description; | 1038 | destTaskItem.Description = srcTaskItem.Description; |
1039 | destTaskItem.Name = srcTaskItem.Name; | 1039 | destTaskItem.Name = srcTaskItem.Name; |
1040 | destTaskItem.InvType = srcTaskItem.InvType; | 1040 | destTaskItem.InvType = srcTaskItem.InvType; |
1041 | destTaskItem.Type = srcTaskItem.Type; | 1041 | destTaskItem.Type = srcTaskItem.Type; |
1042 | 1042 | ||
1043 | destPart.AddInventoryItem(destTaskItem); | 1043 | destPart.AddInventoryItem(destTaskItem); |
1044 | 1044 | ||
1045 | if((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) | 1045 | if ((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) |
1046 | part.RemoveInventoryItem(itemId); | 1046 | part.RemoveInventoryItem(itemId); |
1047 | 1047 | ||
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | /// <summary> | 1050 | /// <summary> |
1051 | /// Update an item in a prim (task) inventory. | 1051 | /// Update an item in a prim (task) inventory. |
1052 | /// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see> | 1052 | /// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see> |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 72c5d7f..5a04a8e 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -1530,7 +1530,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1530 | ) | 1530 | ) |
1531 | { | 1531 | { |
1532 | #if SPAM | 1532 | #if SPAM |
1533 | System.Console.WriteLine( "reverting to geodesic sphere for prim: " + primName ); | 1533 | System.Console.WriteLine("reverting to geodesic sphere for prim: " + primName); |
1534 | #endif | 1534 | #endif |
1535 | return CreateSphereMesh(primName, primShape, size); | 1535 | return CreateSphereMesh(primName, primShape, size); |
1536 | } | 1536 | } |
@@ -1802,10 +1802,13 @@ namespace OpenSim.Region.Physics.Meshing | |||
1802 | #if SPAM | 1802 | #if SPAM |
1803 | int vCount = 0; | 1803 | int vCount = 0; |
1804 | 1804 | ||
1805 | foreach ( Vertex v in result.vertices ) | 1805 | foreach (Vertex v in result.vertices) |
1806 | if ( v != null ) | 1806 | { |
1807 | if (v != null) | ||
1807 | vCount++; | 1808 | vCount++; |
1808 | System.Console.WriteLine( "Mesh vertex count: " + vCount.ToString()); | 1809 | } |
1810 | |||
1811 | System.Console.WriteLine("Mesh vertex count: " + vCount.ToString()); | ||
1809 | #endif | 1812 | #endif |
1810 | 1813 | ||
1811 | return result; | 1814 | return result; |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index edb6375..876629e 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -1773,22 +1773,23 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1773 | } | 1773 | } |
1774 | } | 1774 | } |
1775 | 1775 | ||
1776 | 1776 | // Finished with all sim stepping. If requested, dump world state to file for debugging. | |
1777 | // Finished with all sim stepping. If requested, dump world state to file for debugging. | 1777 | // TODO: This call to the export function is already inside lock (OdeLock) - but is an extra lock needed? |
1778 | // TODO: This call to the export function is already inside lock(OdeLock) - but is an extra lock needed? | 1778 | // TODO: This overwrites all dump files in-place. Should this be a growing logfile, or separate snapshots? |
1779 | // TODO: This overwrites all dump files in-place. Should this be a growing logfile, or separate snapshots? | 1779 | if (physics_logging && (physics_logging_interval>0) && (framecount % physics_logging_interval == 0)) |
1780 | if(physics_logging && (physics_logging_interval>0) && (framecount % physics_logging_interval == 0) ) { | 1780 | { |
1781 | string fname = "state-" + world.ToString() + ".DIF"; // give each physics world a separate filename | 1781 | string fname = "state-" + world.ToString() + ".DIF"; // give each physics world a separate filename |
1782 | string prefix = "world" + world.ToString(); // prefix for variable names in exported .DIF file | 1782 | string prefix = "world" + world.ToString(); // prefix for variable names in exported .DIF file |
1783 | 1783 | ||
1784 | if(physics_logging_append_existing_logfile) { | 1784 | if (physics_logging_append_existing_logfile) |
1785 | string header = "-------------- START OF PHYSICS FRAME " + framecount.ToString() + " --------------"; | 1785 | { |
1786 | TextWriter fwriter = File.AppendText(fname); | 1786 | string header = "-------------- START OF PHYSICS FRAME " + framecount.ToString() + " --------------"; |
1787 | fwriter.WriteLine(header); | 1787 | TextWriter fwriter = File.AppendText(fname); |
1788 | fwriter.Close(); | 1788 | fwriter.WriteLine(header); |
1789 | } | 1789 | fwriter.Close(); |
1790 | d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); | 1790 | } |
1791 | } | 1791 | d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); |
1792 | } | ||
1792 | } | 1793 | } |
1793 | 1794 | ||
1794 | return fps; | 1795 | return fps; |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 08cf4a7..a9d1309 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -2697,40 +2697,40 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2697 | public void llGiveInventory(string destination, string inventory) | 2697 | public void llGiveInventory(string destination, string inventory) |
2698 | { | 2698 | { |
2699 | m_host.AddScriptLPS(1); | 2699 | m_host.AddScriptLPS(1); |
2700 | bool found = false; | 2700 | bool found = false; |
2701 | LLUUID destId = LLUUID.Zero; | 2701 | LLUUID destId = LLUUID.Zero; |
2702 | LLUUID objId = LLUUID.Zero; | 2702 | LLUUID objId = LLUUID.Zero; |
2703 | 2703 | ||
2704 | if(!LLUUID.TryParse(destination, out destId)) | 2704 | if (!LLUUID.TryParse(destination, out destId)) |
2705 | { | 2705 | { |
2706 | llSay(0, "Could not parse key " + destination); | 2706 | llSay(0, "Could not parse key " + destination); |
2707 | return; | 2707 | return; |
2708 | } | 2708 | } |
2709 | 2709 | ||
2710 | // move the first object found with this inventory name | 2710 | // move the first object found with this inventory name |
2711 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) | 2711 | foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) |
2712 | { | 2712 | { |
2713 | if (inv.Value.Name == inventory) | 2713 | if (inv.Value.Name == inventory) |
2714 | { | 2714 | { |
2715 | found = true; | 2715 | found = true; |
2716 | objId = inv.Key; | 2716 | objId = inv.Key; |
2717 | break; | 2717 | break; |
2718 | } | 2718 | } |
2719 | } | 2719 | } |
2720 | 2720 | ||
2721 | // check if destination is an avatar | 2721 | // check if destination is an avatar |
2722 | if (World.GetScenePresence(destId) != null) | 2722 | if (World.GetScenePresence(destId) != null) |
2723 | { | 2723 | { |
2724 | // destination is an avatar | 2724 | // destination is an avatar |
2725 | World.MoveTaskInventoryItem(destId, null, m_host, objId); | 2725 | World.MoveTaskInventoryItem(destId, null, m_host, objId); |
2726 | } | 2726 | } |
2727 | else | 2727 | else |
2728 | { | 2728 | { |
2729 | // destination is an object | 2729 | // destination is an object |
2730 | World.MoveTaskInventoryItem(destId, m_host, objId); | 2730 | World.MoveTaskInventoryItem(destId, m_host, objId); |
2731 | } | 2731 | } |
2732 | 2732 | ||
2733 | if (!found) | 2733 | if (!found) |
2734 | llSay(0, "Could not find object " + inventory); | 2734 | llSay(0, "Could not find object " + inventory); |
2735 | } | 2735 | } |
2736 | 2736 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs index f7f2676..c57e72e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/ApiManager.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
39 | 39 | ||
40 | public string[] GetApis() | 40 | public string[] GetApis() |
41 | { | 41 | { |
42 | if(m_Apis.Count > 0) | 42 | if (m_Apis.Count > 0) |
43 | { | 43 | { |
44 | List<string> l = new List<string>(m_Apis.Keys); | 44 | List<string> l = new List<string>(m_Apis.Keys); |
45 | return l.ToArray(); | 45 | return l.ToArray(); |
@@ -53,10 +53,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
53 | { | 53 | { |
54 | string name = t.ToString(); | 54 | string name = t.ToString(); |
55 | int idx = name.LastIndexOf('.'); | 55 | int idx = name.LastIndexOf('.'); |
56 | if(idx != -1) | 56 | if (idx != -1) |
57 | name = name.Substring(idx+1); | 57 | name = name.Substring(idx+1); |
58 | 58 | ||
59 | if(name.EndsWith("_Api")) | 59 | if (name.EndsWith("_Api")) |
60 | { | 60 | { |
61 | name = name.Substring(0, name.Length - 4); | 61 | name = name.Substring(0, name.Length - 4); |
62 | m_Apis[name] = t; | 62 | m_Apis[name] = t; |
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
69 | 69 | ||
70 | public IScriptApi CreateApi(string api) | 70 | public IScriptApi CreateApi(string api) |
71 | { | 71 | { |
72 | if(!m_Apis.ContainsKey(api)) | 72 | if (!m_Apis.ContainsKey(api)) |
73 | return null; | 73 | return null; |
74 | 74 | ||
75 | IScriptApi ret = (IScriptApi)(Activator.CreateInstance(m_Apis[api])); | 75 | IScriptApi ret = (IScriptApi)(Activator.CreateInstance(m_Apis[api])); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index 8c967a2..fcd1df8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | |||
@@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
95 | public AsyncCommandManager(IScriptEngine _ScriptEngine) | 95 | public AsyncCommandManager(IScriptEngine _ScriptEngine) |
96 | { | 96 | { |
97 | m_ScriptEngine = _ScriptEngine; | 97 | m_ScriptEngine = _ScriptEngine; |
98 | if(!m_Managers.Contains(this)) | 98 | if (!m_Managers.Contains(this)) |
99 | m_Managers.Add(this); | 99 | m_Managers.Add(this); |
100 | 100 | ||
101 | ReadConfig(); | 101 | ReadConfig(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 202fce7..57c1e02 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2553,7 +2553,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2553 | LLUUID destId = LLUUID.Zero; | 2553 | LLUUID destId = LLUUID.Zero; |
2554 | LLUUID objId = LLUUID.Zero; | 2554 | LLUUID objId = LLUUID.Zero; |
2555 | 2555 | ||
2556 | if(!LLUUID.TryParse(destination, out destId)) | 2556 | if (!LLUUID.TryParse(destination, out destId)) |
2557 | { | 2557 | { |
2558 | llSay(0, "Could not parse key " + destination); | 2558 | llSay(0, "Could not parse key " + destination); |
2559 | return; | 2559 | return; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 7b3907f..08ee203 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
46 | 46 | ||
47 | public void ApiTypeLSL(IScriptApi api) | 47 | public void ApiTypeLSL(IScriptApi api) |
48 | { | 48 | { |
49 | if(!(api is ILSL_Api)) | 49 | if (!(api is ILSL_Api)) |
50 | return; | 50 | return; |
51 | 51 | ||
52 | m_LSL_Functions = (ILSL_Api)api; | 52 | m_LSL_Functions = (ILSL_Api)api; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 168804d..34e2fb1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
47 | 47 | ||
48 | public void ApiTypeOSSL(IScriptApi api) | 48 | public void ApiTypeOSSL(IScriptApi api) |
49 | { | 49 | { |
50 | if(!(api is IOSSL_Api)) | 50 | if (!(api is IOSSL_Api)) |
51 | return; | 51 | return; |
52 | 52 | ||
53 | m_OSSL_Functions = (IOSSL_Api)api; | 53 | m_OSSL_Functions = (IOSSL_Api)api; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index aa2c9c2..c12b1f8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | |||
@@ -44,9 +44,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
44 | { | 44 | { |
45 | MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance); | 45 | MethodInfo[] myArrayMethodInfo = GetType().GetMethods(BindingFlags.Public|BindingFlags.Instance); |
46 | 46 | ||
47 | foreach(MethodInfo mi in myArrayMethodInfo) | 47 | foreach (MethodInfo mi in myArrayMethodInfo) |
48 | { | 48 | { |
49 | if(mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType") | 49 | if (mi.Name.Length > 7 && mi.Name.Substring(0, 7) == "ApiType") |
50 | { | 50 | { |
51 | string type=mi.Name.Substring(7); | 51 | string type=mi.Name.Substring(7); |
52 | inits[type]=mi; | 52 | inits[type]=mi; |
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
63 | 63 | ||
64 | public void InitApi(string api, IScriptApi data) | 64 | public void InitApi(string api, IScriptApi data) |
65 | { | 65 | { |
66 | if(!inits.ContainsKey(api)) | 66 | if (!inits.ContainsKey(api)) |
67 | return; | 67 | return; |
68 | 68 | ||
69 | MethodInfo mi = inits[api]; | 69 | MethodInfo mi = inits[api]; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 6b080a0..8edae6d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -1476,7 +1476,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1476 | 1476 | ||
1477 | public override bool Equals(Object o) | 1477 | public override bool Equals(Object o) |
1478 | { | 1478 | { |
1479 | if(!(o is LSLFloat)) | 1479 | if (!(o is LSLFloat)) |
1480 | return false; | 1480 | return false; |
1481 | 1481 | ||
1482 | return value == ((LSLFloat)o).value; | 1482 | return value == ((LSLFloat)o).value; |