aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs60
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs128
5 files changed, 109 insertions, 109 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 9bf6728..40650f3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -730,11 +730,11 @@ namespace OpenSim.Region.Environment.Scenes
730 730
731 if (item != null) 731 if (item != null)
732 { 732 {
733 group.AddInventoryItem(remoteClient, primLocalID, item, copyID); 733 group.AddInventoryItem(remoteClient, primLocalID, item, copyID);
734 m_log.InfoFormat( 734 m_log.InfoFormat(
735 "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", 735 "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
736 item.Name, primLocalID, remoteClient.Name); 736 item.Name, primLocalID, remoteClient.Name);
737 group.GetProperties(remoteClient); 737 group.GetProperties(remoteClient);
738 } 738 }
739 else 739 else
740 { 740 {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 8fdb468..5e0b8ba 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -134,10 +134,10 @@ namespace OpenSim.Region.Environment.Scenes
134 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs( 134 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(
135 agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); 135 agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated);
136 136
137 // First, allow all validators a stab at it 137 // First, allow all validators a stab at it
138 m_eventManager.TriggerValidateLandBuy(this, args); 138 m_eventManager.TriggerValidateLandBuy(this, args);
139 139
140 // Then, check validation and transfer 140 // Then, check validation and transfer
141 m_eventManager.TriggerLandBuy(this, args); 141 m_eventManager.TriggerLandBuy(this, args);
142 } 142 }
143 143
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 6e815a6..dd361bf 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -258,32 +258,32 @@ namespace OpenSim.Region.Environment.Scenes
258 } 258 }
259 } 259 }
260 260
261 // Assumes a lock is held on the inventory 261 // Assumes a lock is held on the inventory
262 private bool InventoryContainsName(string name) 262 private bool InventoryContainsName(string name)
263 { 263 {
264 foreach (TaskInventoryItem item in m_taskInventory.Values) 264 foreach (TaskInventoryItem item in m_taskInventory.Values)
265 { 265 {
266 if(item.Name == name) 266 if(item.Name == name)
267 return true; 267 return true;
268 } 268 }
269 return false; 269 return false;
270 } 270 }
271 271
272 private string FindAvailableInventoryName(string name) 272 private string FindAvailableInventoryName(string name)
273 { 273 {
274 if(!InventoryContainsName(name)) 274 if(!InventoryContainsName(name))
275 return name; 275 return name;
276 276
277 int suffix=1; 277 int suffix=1;
278 while(suffix < 256) 278 while(suffix < 256)
279 { 279 {
280 string tryName=String.Format("{0} {1}", name, suffix); 280 string tryName=String.Format("{0} {1}", name, suffix);
281 if(!InventoryContainsName(tryName)) 281 if(!InventoryContainsName(tryName))
282 return tryName; 282 return tryName;
283 suffix++; 283 suffix++;
284 } 284 }
285 return String.Empty; 285 return String.Empty;
286 } 286 }
287 287
288 /// <summary> 288 /// <summary>
289 /// Add an item to this prim's inventory. 289 /// Add an item to this prim's inventory.
@@ -295,11 +295,11 @@ namespace OpenSim.Region.Environment.Scenes
295 item.CreationDate = 1000; 295 item.CreationDate = 1000;
296 item.ParentPartID = UUID; 296 item.ParentPartID = UUID;
297 297
298 string name=FindAvailableInventoryName(item.Name); 298 string name=FindAvailableInventoryName(item.Name);
299 if(name == String.Empty) 299 if(name == String.Empty)
300 return; 300 return;
301 301
302 item.Name=name; 302 item.Name=name;
303 303
304 lock (m_taskInventory) 304 lock (m_taskInventory)
305 { 305 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 099d0f0..0608fa7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Environment.Scenes
97 public uint Category; 97 public uint Category;
98 98
99 // TODO: This needs to be persisted in next XML version update! 99 // TODO: This needs to be persisted in next XML version update!
100 [XmlIgnore] public int[] PayPrice = {0,0,0,0,0}; 100 [XmlIgnore] public int[] PayPrice = {0,0,0,0,0};
101 101
102 102
103 [XmlIgnore] public bool m_IsAttachment = false; 103 [XmlIgnore] public bool m_IsAttachment = false;
@@ -2038,18 +2038,18 @@ namespace OpenSim.Region.Environment.Scenes
2038 } 2038 }
2039 } 2039 }
2040 2040
2041 if(soundID == LLUUID.Zero) 2041 if(soundID == LLUUID.Zero)
2042 return; 2042 return;
2043 2043
2044 List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); 2044 List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars();
2045 foreach (ScenePresence p in avatarts) 2045 foreach (ScenePresence p in avatarts)
2046 { 2046 {
2047 double dis=Util.GetDistanceTo(p.AbsolutePosition, position); 2047 double dis=Util.GetDistanceTo(p.AbsolutePosition, position);
2048 if(dis > 100.0) // Max audio distance 2048 if(dis > 100.0) // Max audio distance
2049 continue; 2049 continue;
2050 2050
2051 // Scale by distance 2051 // Scale by distance
2052 volume*=((100.0-dis)/100.0); 2052 volume*=((100.0-dis)/100.0);
2053 2053
2054 if (triggered) 2054 if (triggered)
2055 { 2055 {
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 3f70108..94dbbb3 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment.Scenes
270 } 270 }
271 271
272 m_pos = value; 272 m_pos = value;
273 m_parentPosition=new LLVector3(0, 0, 0); 273 m_parentPosition=new LLVector3(0, 0, 0);
274 } 274 }
275 } 275 }
276 276
@@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Scenes
362 // Move them into an object to (hopefully) avoid threading issues. 362 // Move them into an object to (hopefully) avoid threading issues.
363 try 363 try
364 { 364 {
365 SetMovementAnimation(Animations.AnimsLLUUID["STAND"]); 365 SetMovementAnimation(Animations.AnimsLLUUID["STAND"]);
366 } 366 }
367 catch (KeyNotFoundException) 367 catch (KeyNotFoundException)
368 { 368 {
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Scenes
547 547
548 AddToPhysicalScene(); 548 AddToPhysicalScene();
549 m_physicsActor.Flying = isFlying; 549 m_physicsActor.Flying = isFlying;
550 SendAnimPack(); 550 SendAnimPack();
551 551
552 m_scene.SwapRootAgentCount(false); 552 m_scene.SwapRootAgentCount(false);
553 m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid); 553 m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(m_uuid);
@@ -570,15 +570,15 @@ namespace OpenSim.Region.Environment.Scenes
570 /// </summary> 570 /// </summary>
571 public void MakeChildAgent() 571 public void MakeChildAgent()
572 { 572 {
573 if(m_animations.Count > 0) 573 if(m_animations.Count > 0)
574 { 574 {
575 LLUUID movement=m_animations[0]; 575 LLUUID movement=m_animations[0];
576 576
577 m_animations.Clear(); 577 m_animations.Clear();
578 m_animationSeqs.Clear(); 578 m_animationSeqs.Clear();
579 579
580 SetMovementAnimation(movement); 580 SetMovementAnimation(movement);
581 } 581 }
582// m_log.DebugFormat( 582// m_log.DebugFormat(
583// "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}", 583// "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}",
584// Name, UUID, m_scene.RegionInfo.RegionName); 584// Name, UUID, m_scene.RegionInfo.RegionName);
@@ -611,10 +611,10 @@ namespace OpenSim.Region.Environment.Scenes
611 /// <param name="pos"></param> 611 /// <param name="pos"></param>
612 public void Teleport(LLVector3 pos) 612 public void Teleport(LLVector3 pos)
613 { 613 {
614 RemoveFromPhysicalScene(); 614 RemoveFromPhysicalScene();
615 Velocity = new LLVector3(0, 0, 0); 615 Velocity = new LLVector3(0, 0, 0);
616 AbsolutePosition = pos; 616 AbsolutePosition = pos;
617 AddToPhysicalScene(); 617 AddToPhysicalScene();
618 SendTerseUpdateToAllClients(); 618 SendTerseUpdateToAllClients();
619 } 619 }
620 620
@@ -1055,12 +1055,12 @@ namespace OpenSim.Region.Environment.Scenes
1055 1055
1056 public void AddAnimation(LLUUID animID) 1056 public void AddAnimation(LLUUID animID)
1057 { 1057 {
1058 if(m_isChildAgent) 1058 if(m_isChildAgent)
1059 return; 1059 return;
1060 1060
1061 // Don't let this animation become the movement animation 1061 // Don't let this animation become the movement animation
1062 if(m_animations.Count < 1) 1062 if(m_animations.Count < 1)
1063 SetMovementAnimation(Animations.AnimsLLUUID["STAND"]); 1063 SetMovementAnimation(Animations.AnimsLLUUID["STAND"]);
1064 1064
1065 if (!m_animations.Contains(animID)) 1065 if (!m_animations.Contains(animID))
1066 { 1066 {
@@ -1072,8 +1072,8 @@ namespace OpenSim.Region.Environment.Scenes
1072 1072
1073 public void RemoveAnimation(LLUUID animID) 1073 public void RemoveAnimation(LLUUID animID)
1074 { 1074 {
1075 if(m_isChildAgent) 1075 if(m_isChildAgent)
1076 return; 1076 return;
1077 1077
1078 if (m_animations.Contains(animID)) 1078 if (m_animations.Contains(animID))
1079 { 1079 {
@@ -1083,21 +1083,21 @@ namespace OpenSim.Region.Environment.Scenes
1083 } 1083 }
1084 else 1084 else
1085 { 1085 {
1086 // What a HACK!! Anim list really needs to be an object! 1086 // What a HACK!! Anim list really needs to be an object!
1087 int idx; 1087 int idx;
1088 1088
1089 for(idx=0;idx < m_animations.Count;idx++) 1089 for(idx=0;idx < m_animations.Count;idx++)
1090 { 1090 {
1091 if(m_animations[idx] == animID) 1091 if(m_animations[idx] == animID)
1092 { 1092 {
1093 int seq=m_animationSeqs[idx]; 1093 int seq=m_animationSeqs[idx];
1094 1094
1095 m_animations.Remove(animID); 1095 m_animations.Remove(animID);
1096 m_animationSeqs.Remove(seq); 1096 m_animationSeqs.Remove(seq);
1097 SendAnimPack(); 1097 SendAnimPack();
1098 break; 1098 break;
1099 } 1099 }
1100 } 1100 }
1101 } 1101 }
1102 } 1102 }
1103 } 1103 }
@@ -1119,33 +1119,33 @@ namespace OpenSim.Region.Environment.Scenes
1119 /// </summary> 1119 /// </summary>
1120 protected void SetMovementAnimation(LLUUID anim) 1120 protected void SetMovementAnimation(LLUUID anim)
1121 { 1121 {
1122 if(m_animations.Count < 1) 1122 if(m_animations.Count < 1)
1123 { 1123 {
1124 m_animations.Add(Animations.AnimsLLUUID["STAND"]); 1124 m_animations.Add(Animations.AnimsLLUUID["STAND"]);
1125 m_animationSeqs.Add(1); 1125 m_animationSeqs.Add(1);
1126 1126
1127 SendAnimPack(); 1127 SendAnimPack();
1128 } 1128 }
1129 else 1129 else
1130 { 1130 {
1131 try 1131 try
1132 { 1132 {
1133 if (m_animations[0] != anim) 1133 if (m_animations[0] != anim)
1134 { 1134 {
1135 m_animations[0] = anim; 1135 m_animations[0] = anim;
1136 m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber; 1136 m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber;
1137 } 1137 }
1138 SendAnimPack(); 1138 SendAnimPack();
1139 } 1139 }
1140 catch 1140 catch
1141 { 1141 {
1142 m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery..."); 1142 m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery...");
1143 m_animations[0] = anim; 1143 m_animations[0] = anim;
1144 m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber; 1144 m_animationSeqs[0] = m_controllingClient.NextAnimationSequenceNumber;
1145 SendAnimPack(); 1145 SendAnimPack();
1146 } 1146 }
1147 } 1147 }
1148 } 1148 }
1149 1149
1150 /// <summary> 1150 /// <summary>
1151 /// This method handles agent movement related animations 1151 /// This method handles agent movement related animations
@@ -1536,8 +1536,8 @@ namespace OpenSim.Region.Environment.Scenes
1536 /// <param name="seqs"></param> 1536 /// <param name="seqs"></param>
1537 public void SendAnimPack(LLUUID[] animations, int[] seqs) 1537 public void SendAnimPack(LLUUID[] animations, int[] seqs)
1538 { 1538 {
1539 if(m_isChildAgent) 1539 if(m_isChildAgent)
1540 return; 1540 return;
1541 1541
1542 m_scene.Broadcast( 1542 m_scene.Broadcast(
1543 delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId); }); 1543 delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId); });