aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMW2007-08-14 17:29:15 +0000
committerMW2007-08-14 17:29:15 +0000
commit181a90967ee9084676f84e74b2393855218c5723 (patch)
tree7eee2ef5dba2b95827e2849a8981075786cb5cc3 /OpenSim/Region/Environment
parentCorrect caps of Default.lsl for Linux. Thanks again krinkec. :) (diff)
downloadopensim-SC_OLD-181a90967ee9084676f84e74b2393855218c5723.zip
opensim-SC_OLD-181a90967ee9084676f84e74b2393855218c5723.tar.gz
opensim-SC_OLD-181a90967ee9084676f84e74b2393855218c5723.tar.bz2
opensim-SC_OLD-181a90967ee9084676f84e74b2393855218c5723.tar.xz
Start of inventory items, when you upload a texture the data will now be stored in the inventory database and you will still have that texture in inventory on later logins (Again only in standalone mode with authentication.)
Also there might be some problems if you upload textures in other regions to the start one (due to us not updating the CAPS url properly).
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs72
2 files changed, 48 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 72dc9c0..e61a5bd 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -727,7 +727,7 @@ namespace OpenSim.Region.Environment.Scenes
727 item.inventoryCurrentPermissions = 2147483647; 727 item.inventoryCurrentPermissions = 2147483647;
728 item.inventoryNextPermissions = nextOwnerMask; 728 item.inventoryNextPermissions = nextOwnerMask;
729 729
730 userInfo.ItemReceive(remoteClient.AgentId, item); 730 userInfo.AddItem(remoteClient.AgentId, item);
731 remoteClient.SendInventoryItemUpdate(item); 731 remoteClient.SendInventoryItemUpdate(item);
732 } 732 }
733 } 733 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 4254f74..f83e43c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -41,8 +41,9 @@ using OpenSim.Framework.Communications.Caches;
41using OpenSim.Region.Environment.LandManagement; 41using OpenSim.Region.Environment.LandManagement;
42using OpenSim.Region.Scripting; 42using OpenSim.Region.Scripting;
43using OpenSim.Region.Terrain; 43using OpenSim.Region.Terrain;
44using Caps=OpenSim.Region.Capabilities.Caps; 44using OpenSim.Framework.Data;
45using Timer=System.Timers.Timer; 45using Caps = OpenSim.Region.Capabilities.Caps;
46using Timer = System.Timers.Timer;
46 47
47namespace OpenSim.Region.Environment.Scenes 48namespace OpenSim.Region.Environment.Scenes
48{ 49{
@@ -205,7 +206,7 @@ namespace OpenSim.Region.Environment.Scenes
205 phyScene.GetResults(); 206 phyScene.GetResults();
206 } 207 }
207 208
208 List<EntityBase> moveEntities = new List<EntityBase>( Entities.Values ); 209 List<EntityBase> moveEntities = new List<EntityBase>(Entities.Values);
209 210
210 foreach (EntityBase entity in moveEntities) 211 foreach (EntityBase entity in moveEntities)
211 { 212 {
@@ -503,9 +504,9 @@ namespace OpenSim.Region.Environment.Scenes
503 { 504 {
504 if (obj is SceneObjectGroup) 505 if (obj is SceneObjectGroup)
505 { 506 {
506 if (((SceneObjectGroup) obj).LocalId == localID) 507 if (((SceneObjectGroup)obj).LocalId == localID)
507 { 508 {
508 RemoveEntity((SceneObjectGroup) obj); 509 RemoveEntity((SceneObjectGroup)obj);
509 return; 510 return;
510 } 511 }
511 } 512 }
@@ -607,8 +608,8 @@ namespace OpenSim.Region.Environment.Scenes
607 new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest); 608 new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest);
608 609
609 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); 610 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
610 611
611 //client.OnCreateNewInventoryItem += CreateNewInventoryItem; 612 //client.OnCreateNewInventoryItem += CreateNewInventoryItem;
612 client.OnCreateNewInventoryFolder += commsManager.UserProfiles.HandleCreateInventoryFolder; 613 client.OnCreateNewInventoryFolder += commsManager.UserProfiles.HandleCreateInventoryFolder;
613 client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents; 614 client.OnFetchInventoryDescendents += commsManager.UserProfiles.HandleFecthInventoryDescendents;
614 client.OnRequestTaskInventory += RequestTaskInventory; 615 client.OnRequestTaskInventory += RequestTaskInventory;
@@ -670,9 +671,9 @@ namespace OpenSim.Region.Environment.Scenes
670 671
671 ForEachScenePresence( 672 ForEachScenePresence(
672 delegate(ScenePresence presence) 673 delegate(ScenePresence presence)
673 { 674 {
674 presence.ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId); 675 presence.ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId);
675 }); 676 });
676 677
677 lock (Avatars) 678 lock (Avatars)
678 { 679 {
@@ -689,7 +690,7 @@ namespace OpenSim.Region.Environment.Scenes
689 } 690 }
690 } 691 }
691 // TODO: Add the removal from physics ? 692 // TODO: Add the removal from physics ?
692 693
693 // Remove client agent from profile, so new logins will work 694 // Remove client agent from profile, so new logins will work
694 commsManager.UserServer.clearUserAgent(agentID); 695 commsManager.UserServer.clearUserAgent(agentID);
695 696
@@ -787,7 +788,7 @@ namespace OpenSim.Region.Environment.Scenes
787 { 788 {
788 if (ent is SceneObjectGroup) 789 if (ent is SceneObjectGroup)
789 { 790 {
790 ((SceneObjectGroup) ent).SendFullUpdateToClient(client); 791 ((SceneObjectGroup)ent).SendFullUpdateToClient(client);
791 } 792 }
792 } 793 }
793 } 794 }
@@ -825,6 +826,7 @@ namespace OpenSim.Region.Environment.Scenes
825 new Caps(assetCache, httpListener, m_regInfo.ExternalHostName, m_regInfo.ExternalEndPoint.Port, 826 new Caps(assetCache, httpListener, m_regInfo.ExternalHostName, m_regInfo.ExternalEndPoint.Port,
826 agent.CapsPath, agent.AgentID); 827 agent.CapsPath, agent.AgentID);
827 cap.RegisterHandlers(); 828 cap.RegisterHandlers();
829 cap.AddNewInventoryItem = this.AddInventoryItem;
828 if (capsHandlers.ContainsKey(agent.AgentID)) 830 if (capsHandlers.ContainsKey(agent.AgentID))
829 { 831 {
830 MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + 832 MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " +
@@ -1009,7 +1011,7 @@ namespace OpenSim.Region.Environment.Scenes
1009 string result = ""; 1011 string result = "";
1010 for (int i = pos; i < commandParams.Length; i++) 1012 for (int i = pos; i < commandParams.Length; i++)
1011 { 1013 {
1012 result += commandParams[i]+ " "; 1014 result += commandParams[i] + " ";
1013 } 1015 }
1014 return result; 1016 return result;
1015 } 1017 }
@@ -1020,25 +1022,45 @@ namespace OpenSim.Region.Environment.Scenes
1020 public void AddScriptEngine(OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine, LogBase m_logger) 1022 public void AddScriptEngine(OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine, LogBase m_logger)
1021 { 1023 {
1022 ScriptEngines.Add(ScriptEngine); 1024 ScriptEngines.Add(ScriptEngine);
1025
1023 ScriptEngine.InitializeEngine(this, m_logger); 1026 ScriptEngine.InitializeEngine(this, m_logger);
1024 } 1027 }
1025 #endregion 1028 #endregion
1026 1029
1027 public LLUUID ConvertLocalIDToFullID(uint localID) 1030 public LLUUID ConvertLocalIDToFullID(uint localID)
1028 { 1031 {
1029 bool hasPrim = false; 1032 bool hasPrim = false;
1030 foreach (EntityBase ent in Entities.Values) 1033 foreach (EntityBase ent in Entities.Values)
1031 { 1034 {
1032 if (ent is SceneObjectGroup) 1035 if (ent is SceneObjectGroup)
1033 { 1036 {
1034 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); 1037 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
1035 if (hasPrim != false) 1038 if (hasPrim != false)
1036 { 1039 {
1037 return ((SceneObjectGroup)ent).GetPartsFullID(localID); 1040 return ((SceneObjectGroup)ent).GetPartsFullID(localID);
1038 } 1041 }
1039 } 1042 }
1040 } 1043 }
1041 return LLUUID.Zero; 1044 return LLUUID.Zero;
1045 }
1046
1047 public void AddInventoryItem(LLUUID userID, InventoryItemBase item)
1048 {
1049 if(this.Avatars.ContainsKey(userID))
1050 {
1051 this.AddInventoryItem(this.Avatars[userID].ControllingClient, item);
1052 }
1042 } 1053 }
1054
1055 public void AddInventoryItem(IClientAPI remoteClient, InventoryItemBase item)
1056 {
1057 CachedUserInfo userInfo = commsManager.UserProfiles.GetUserDetails(remoteClient.AgentId);
1058 if (userInfo != null)
1059 {
1060 userInfo.AddItem(remoteClient.AgentId, item);
1061 remoteClient.SendInventoryItemUpdate(item);
1062 }
1063 }
1064
1043 } 1065 }
1044} 1066}