aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorJonathan Freedman2010-11-21 19:51:23 -0800
committerJonathan Freedman2010-11-21 19:51:23 -0800
commit562147475cc24a18da2b812a69ce2330c7633cf6 (patch)
tree1168b5591f615442f8a09fd9776209d0923c2b3d /OpenSim/Region/CoreModules/World
parentMerge git://github.com/opensim/opensim into mantis5110 (diff)
parentMerge branch 'master' of /var/git/opensim/ (diff)
downloadopensim-SC_OLD-562147475cc24a18da2b812a69ce2330c7633cf6.zip
opensim-SC_OLD-562147475cc24a18da2b812a69ce2330c7633cf6.tar.gz
opensim-SC_OLD-562147475cc24a18da2b812a69ce2330c7633cf6.tar.bz2
opensim-SC_OLD-562147475cc24a18da2b812a69ce2330c7633cf6.tar.xz
Merge https://github.com/opensim/opensim into mantis5110
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs29
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModule.cs1
3 files changed, 18 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 1bf0d67..6844c60 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -1098,12 +1098,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
1098 if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) 1098 if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
1099 flags |= RegionFlags.AllowParcelChanges; 1099 flags |= RegionFlags.AllowParcelChanges;
1100 if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) 1100 if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
1101 flags |= (RegionFlags)(1 << 29); 1101 flags |= RegionFlags.BlockParcelSearch;
1102 1102
1103 if (m_scene.RegionInfo.RegionSettings.FixedSun) 1103 if (m_scene.RegionInfo.RegionSettings.FixedSun)
1104 flags |= RegionFlags.SunFixed; 1104 flags |= RegionFlags.SunFixed;
1105 if (m_scene.RegionInfo.RegionSettings.Sandbox) 1105 if (m_scene.RegionInfo.RegionSettings.Sandbox)
1106 flags |= RegionFlags.Sandbox; 1106 flags |= RegionFlags.Sandbox;
1107 if (m_scene.RegionInfo.EstateSettings.AllowVoice)
1108 flags |= RegionFlags.AllowVoice;
1107 1109
1108 // Fudge these to always on, so the menu options activate 1110 // Fudge these to always on, so the menu options activate
1109 // 1111 //
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 634685a..695202f 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -88,7 +88,8 @@ namespace OpenSim.Region.CoreModules.World.Land
88 88
89 // caches ExtendedLandData 89 // caches ExtendedLandData
90 private Cache parcelInfoCache; 90 private Cache parcelInfoCache;
91 private Vector3? forcedPosition = null; 91 private Dictionary<UUID, Vector3> forcedPosition =
92 new Dictionary<UUID, Vector3>();
92 93
93 #region INonSharedRegionModule Members 94 #region INonSharedRegionModule Members
94 95
@@ -177,7 +178,7 @@ namespace OpenSim.Region.CoreModules.World.Land
177 void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) 178 void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
178 { 179 {
179 //If we are forcing a position for them to go 180 //If we are forcing a position for them to go
180 if (forcedPosition != null) 181 if (forcedPosition.ContainsKey(remoteClient.AgentId))
181 { 182 {
182 ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId); 183 ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId);
183 184
@@ -187,23 +188,23 @@ namespace OpenSim.Region.CoreModules.World.Land
187 188
188 189
189 //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines 190 //Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines
190 if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) < .2) 191 if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2)
191 { 192 {
192 Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); 193 Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition));
193 forcedPosition = null; 194 forcedPosition.Remove(remoteClient.AgentId);
194 } 195 }
195 //if we are far away, teleport 196 //if we are far away, teleport
196 else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) 197 else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3)
197 { 198 {
198 Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); 199 Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition));
199 clientAvatar.Teleport(forcedPosition.Value); 200 clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]);
200 forcedPosition = null; 201 forcedPosition.Remove(remoteClient.AgentId);
201 } 202 }
202 else 203 else
203 { 204 {
204 //Forces them toward the forced position we want if they aren't there yet 205 //Forces them toward the forced position we want if they aren't there yet
205 agentData.UseClientAgentPosition = true; 206 agentData.UseClientAgentPosition = true;
206 agentData.ClientAgentPosition = forcedPosition.Value; 207 agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId];
207 } 208 }
208 } 209 }
209 } 210 }
@@ -326,7 +327,7 @@ namespace OpenSim.Region.CoreModules.World.Land
326 if (m_scene.Permissions.IsGod(avatar.UUID)) return; 327 if (m_scene.Permissions.IsGod(avatar.UUID)) return;
327 if (position.HasValue) 328 if (position.HasValue)
328 { 329 {
329 forcedPosition = position; 330 forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position;
330 } 331 }
331 } 332 }
332 333
@@ -457,7 +458,7 @@ namespace OpenSim.Region.CoreModules.World.Land
457 parcel.IsBannedFromLand(clientAvatar.UUID)) 458 parcel.IsBannedFromLand(clientAvatar.UUID))
458 { 459 {
459 //once we've sent the message once, keep going toward the target until we are done 460 //once we've sent the message once, keep going toward the target until we are done
460 if (forcedPosition == null) 461 if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId))
461 { 462 {
462 SendYouAreBannedNotice(clientAvatar); 463 SendYouAreBannedNotice(clientAvatar);
463 ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); 464 ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
@@ -466,7 +467,7 @@ namespace OpenSim.Region.CoreModules.World.Land
466 else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) 467 else if (parcel.IsRestrictedFromLand(clientAvatar.UUID))
467 { 468 {
468 //once we've sent the message once, keep going toward the target until we are done 469 //once we've sent the message once, keep going toward the target until we are done
469 if (forcedPosition == null) 470 if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId))
470 { 471 {
471 SendYouAreRestrictedNotice(clientAvatar); 472 SendYouAreRestrictedNotice(clientAvatar);
472 ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); 473 ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
@@ -475,7 +476,7 @@ namespace OpenSim.Region.CoreModules.World.Land
475 else 476 else
476 { 477 {
477 //when we are finally in a safe place, lets release the forced position lock 478 //when we are finally in a safe place, lets release the forced position lock
478 forcedPosition = null; 479 forcedPosition.Remove(clientAvatar.ControllingClient.AgentId);
479 } 480 }
480 } 481 }
481 } 482 }
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
index 8df645d..abd28c8 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
@@ -97,7 +97,6 @@ namespace OpenSim.Region.CoreModules.World.Sound
97 else 97 else
98 gain = (float)((double)gain * ((radius - dis) / radius)); 98 gain = (float)((double)gain * ((radius - dis) / radius));
99 99
100 m_log.DebugFormat("Play sound, gain {0}", gain);
101 sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); 100 sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags);
102 }); 101 });
103 } 102 }