diff options
Diffstat (limited to 'OpenSim/Region')
14 files changed, 274 insertions, 205 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 311b1e4..789e86c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -5003,7 +5003,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5003 | AddLocalPacketHandler(PacketType.TeleportLocationRequest, HandleTeleportLocationRequest); | 5003 | AddLocalPacketHandler(PacketType.TeleportLocationRequest, HandleTeleportLocationRequest); |
5004 | AddLocalPacketHandler(PacketType.UUIDNameRequest, HandleUUIDNameRequest, false); | 5004 | AddLocalPacketHandler(PacketType.UUIDNameRequest, HandleUUIDNameRequest, false); |
5005 | AddLocalPacketHandler(PacketType.RegionHandleRequest, HandleRegionHandleRequest); | 5005 | AddLocalPacketHandler(PacketType.RegionHandleRequest, HandleRegionHandleRequest); |
5006 | AddLocalPacketHandler(PacketType.ParcelInfoRequest, HandleParcelInfoRequest, false); | 5006 | AddLocalPacketHandler(PacketType.ParcelInfoRequest, HandleParcelInfoRequest); |
5007 | AddLocalPacketHandler(PacketType.ParcelAccessListRequest, HandleParcelAccessListRequest, false); | 5007 | AddLocalPacketHandler(PacketType.ParcelAccessListRequest, HandleParcelAccessListRequest, false); |
5008 | AddLocalPacketHandler(PacketType.ParcelAccessListUpdate, HandleParcelAccessListUpdate, false); | 5008 | AddLocalPacketHandler(PacketType.ParcelAccessListUpdate, HandleParcelAccessListUpdate, false); |
5009 | AddLocalPacketHandler(PacketType.ParcelPropertiesRequest, HandleParcelPropertiesRequest, false); | 5009 | AddLocalPacketHandler(PacketType.ParcelPropertiesRequest, HandleParcelPropertiesRequest, false); |
@@ -8876,13 +8876,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8876 | case "instantmessage": | 8876 | case "instantmessage": |
8877 | if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) | 8877 | if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) |
8878 | { | 8878 | { |
8879 | if (messagePacket.ParamList.Length < 5) | 8879 | if (messagePacket.ParamList.Length < 2) |
8880 | return true; | 8880 | return true; |
8881 | |||
8881 | UUID invoice = messagePacket.MethodData.Invoice; | 8882 | UUID invoice = messagePacket.MethodData.Invoice; |
8882 | UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); | ||
8883 | string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); | ||
8884 | string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); | ||
8885 | UUID sessionID = messagePacket.AgentData.SessionID; | 8883 | UUID sessionID = messagePacket.AgentData.SessionID; |
8884 | |||
8885 | UUID SenderID; | ||
8886 | string SenderName; | ||
8887 | string Message; | ||
8888 | |||
8889 | if (messagePacket.ParamList.Length < 5) | ||
8890 | { | ||
8891 | SenderID = AgentId; | ||
8892 | SenderName = Utils.BytesToString(messagePacket.ParamList[0].Parameter); | ||
8893 | Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter); | ||
8894 | } | ||
8895 | else | ||
8896 | { | ||
8897 | SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); | ||
8898 | SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); | ||
8899 | Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); | ||
8900 | } | ||
8901 | |||
8886 | OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); | 8902 | OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); |
8887 | } | 8903 | } |
8888 | return true; | 8904 | return true; |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index e8b5af0..6d9cb7f 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -202,12 +202,13 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
202 | } | 202 | } |
203 | Scene.RegionInfo.RegionSettings.Save(); | 203 | Scene.RegionInfo.RegionSettings.Save(); |
204 | TriggerRegionInfoChange(); | 204 | TriggerRegionInfoChange(); |
205 | sendRegionHandshakeToAll(); | ||
205 | sendRegionInfoPacketToAll(); | 206 | sendRegionInfoPacketToAll(); |
206 | } | 207 | } |
207 | 208 | ||
208 | private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient) | 209 | private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient) |
209 | { | 210 | { |
210 | sendRegionHandshakeToAll(); | 211 | // sendRegionHandshakeToAll(); |
211 | } | 212 | } |
212 | 213 | ||
213 | public void setRegionTerrainSettings(float WaterHeight, | 214 | public void setRegionTerrainSettings(float WaterHeight, |
@@ -276,8 +277,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
276 | { | 277 | { |
277 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 278 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
278 | { | 279 | { |
280 | if ((estateAccessType & 1) != 0) // All estates | ||
281 | { | ||
282 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
283 | EstateSettings estateSettings; | ||
284 | |||
285 | foreach (int estateID in estateIDs) | ||
286 | { | ||
287 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
288 | { | ||
289 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
290 | estateSettings.AddEstateUser(user); | ||
291 | estateSettings.Save(); | ||
292 | } | ||
293 | } | ||
294 | } | ||
295 | |||
279 | Scene.RegionInfo.EstateSettings.AddEstateUser(user); | 296 | Scene.RegionInfo.EstateSettings.AddEstateUser(user); |
280 | Scene.RegionInfo.EstateSettings.Save(); | 297 | Scene.RegionInfo.EstateSettings.Save(); |
298 | |||
281 | TriggerEstateInfoChange(); | 299 | TriggerEstateInfoChange(); |
282 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); | 300 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); |
283 | } | 301 | } |
@@ -291,10 +309,26 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
291 | { | 309 | { |
292 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 310 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
293 | { | 311 | { |
312 | if ((estateAccessType & 1) != 0) // All estates | ||
313 | { | ||
314 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
315 | EstateSettings estateSettings; | ||
316 | |||
317 | foreach (int estateID in estateIDs) | ||
318 | { | ||
319 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
320 | { | ||
321 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
322 | estateSettings.RemoveEstateUser(user); | ||
323 | estateSettings.Save(); | ||
324 | } | ||
325 | } | ||
326 | } | ||
327 | |||
294 | Scene.RegionInfo.EstateSettings.RemoveEstateUser(user); | 328 | Scene.RegionInfo.EstateSettings.RemoveEstateUser(user); |
295 | Scene.RegionInfo.EstateSettings.Save(); | 329 | Scene.RegionInfo.EstateSettings.Save(); |
296 | TriggerEstateInfoChange(); | ||
297 | 330 | ||
331 | TriggerEstateInfoChange(); | ||
298 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); | 332 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); |
299 | } | 333 | } |
300 | else | 334 | else |
@@ -306,8 +340,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
306 | { | 340 | { |
307 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 341 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
308 | { | 342 | { |
343 | if ((estateAccessType & 1) != 0) // All estates | ||
344 | { | ||
345 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
346 | EstateSettings estateSettings; | ||
347 | |||
348 | foreach (int estateID in estateIDs) | ||
349 | { | ||
350 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
351 | { | ||
352 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
353 | estateSettings.AddEstateGroup(user); | ||
354 | estateSettings.Save(); | ||
355 | } | ||
356 | } | ||
357 | } | ||
358 | |||
309 | Scene.RegionInfo.EstateSettings.AddEstateGroup(user); | 359 | Scene.RegionInfo.EstateSettings.AddEstateGroup(user); |
310 | Scene.RegionInfo.EstateSettings.Save(); | 360 | Scene.RegionInfo.EstateSettings.Save(); |
361 | |||
311 | TriggerEstateInfoChange(); | 362 | TriggerEstateInfoChange(); |
312 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); | 363 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); |
313 | } | 364 | } |
@@ -320,10 +371,26 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
320 | { | 371 | { |
321 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 372 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
322 | { | 373 | { |
374 | if ((estateAccessType & 1) != 0) // All estates | ||
375 | { | ||
376 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
377 | EstateSettings estateSettings; | ||
378 | |||
379 | foreach (int estateID in estateIDs) | ||
380 | { | ||
381 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
382 | { | ||
383 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
384 | estateSettings.RemoveEstateGroup(user); | ||
385 | estateSettings.Save(); | ||
386 | } | ||
387 | } | ||
388 | } | ||
389 | |||
323 | Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); | 390 | Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); |
324 | Scene.RegionInfo.EstateSettings.Save(); | 391 | Scene.RegionInfo.EstateSettings.Save(); |
325 | TriggerEstateInfoChange(); | ||
326 | 392 | ||
393 | TriggerEstateInfoChange(); | ||
327 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); | 394 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); |
328 | } | 395 | } |
329 | else | 396 | else |
@@ -351,6 +418,29 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
351 | if (!alreadyInList) | 418 | if (!alreadyInList) |
352 | { | 419 | { |
353 | 420 | ||
421 | if ((estateAccessType & 1) != 0) // All estates | ||
422 | { | ||
423 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
424 | EstateSettings estateSettings; | ||
425 | |||
426 | foreach (int estateID in estateIDs) | ||
427 | { | ||
428 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
429 | { | ||
430 | EstateBan bitem = new EstateBan(); | ||
431 | |||
432 | bitem.BannedUserID = user; | ||
433 | bitem.EstateID = (uint)estateID; | ||
434 | bitem.BannedHostAddress = "0.0.0.0"; | ||
435 | bitem.BannedHostIPMask = "0.0.0.0"; | ||
436 | |||
437 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
438 | estateSettings.AddBan(bitem); | ||
439 | estateSettings.Save(); | ||
440 | } | ||
441 | } | ||
442 | } | ||
443 | |||
354 | EstateBan item = new EstateBan(); | 444 | EstateBan item = new EstateBan(); |
355 | 445 | ||
356 | item.BannedUserID = user; | 446 | item.BannedUserID = user; |
@@ -360,6 +450,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
360 | 450 | ||
361 | Scene.RegionInfo.EstateSettings.AddBan(item); | 451 | Scene.RegionInfo.EstateSettings.AddBan(item); |
362 | Scene.RegionInfo.EstateSettings.Save(); | 452 | Scene.RegionInfo.EstateSettings.Save(); |
453 | |||
363 | TriggerEstateInfoChange(); | 454 | TriggerEstateInfoChange(); |
364 | 455 | ||
365 | ScenePresence s = Scene.GetScenePresence(user); | 456 | ScenePresence s = Scene.GetScenePresence(user); |
@@ -409,8 +500,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
409 | 500 | ||
410 | if (alreadyInList && listitem != null) | 501 | if (alreadyInList && listitem != null) |
411 | { | 502 | { |
503 | if ((estateAccessType & 1) != 0) // All estates | ||
504 | { | ||
505 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
506 | EstateSettings estateSettings; | ||
507 | |||
508 | foreach (int estateID in estateIDs) | ||
509 | { | ||
510 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
511 | { | ||
512 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
513 | estateSettings.RemoveBan(user); | ||
514 | estateSettings.Save(); | ||
515 | } | ||
516 | } | ||
517 | } | ||
518 | |||
412 | Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); | 519 | Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); |
413 | Scene.RegionInfo.EstateSettings.Save(); | 520 | Scene.RegionInfo.EstateSettings.Save(); |
521 | |||
414 | TriggerEstateInfoChange(); | 522 | TriggerEstateInfoChange(); |
415 | } | 523 | } |
416 | else | 524 | else |
@@ -430,8 +538,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
430 | { | 538 | { |
431 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 539 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
432 | { | 540 | { |
541 | if ((estateAccessType & 1) != 0) // All estates | ||
542 | { | ||
543 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
544 | EstateSettings estateSettings; | ||
545 | |||
546 | foreach (int estateID in estateIDs) | ||
547 | { | ||
548 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
549 | { | ||
550 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
551 | estateSettings.AddEstateManager(user); | ||
552 | estateSettings.Save(); | ||
553 | } | ||
554 | } | ||
555 | } | ||
556 | |||
433 | Scene.RegionInfo.EstateSettings.AddEstateManager(user); | 557 | Scene.RegionInfo.EstateSettings.AddEstateManager(user); |
434 | Scene.RegionInfo.EstateSettings.Save(); | 558 | Scene.RegionInfo.EstateSettings.Save(); |
559 | |||
435 | TriggerEstateInfoChange(); | 560 | TriggerEstateInfoChange(); |
436 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); | 561 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); |
437 | } | 562 | } |
@@ -444,10 +569,26 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
444 | { | 569 | { |
445 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 570 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
446 | { | 571 | { |
572 | if ((estateAccessType & 1) != 0) // All estates | ||
573 | { | ||
574 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
575 | EstateSettings estateSettings; | ||
576 | |||
577 | foreach (int estateID in estateIDs) | ||
578 | { | ||
579 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
580 | { | ||
581 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
582 | estateSettings.RemoveEstateManager(user); | ||
583 | estateSettings.Save(); | ||
584 | } | ||
585 | } | ||
586 | } | ||
587 | |||
447 | Scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | 588 | Scene.RegionInfo.EstateSettings.RemoveEstateManager(user); |
448 | Scene.RegionInfo.EstateSettings.Save(); | 589 | Scene.RegionInfo.EstateSettings.Save(); |
449 | TriggerEstateInfoChange(); | ||
450 | 590 | ||
591 | TriggerEstateInfoChange(); | ||
451 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); | 592 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); |
452 | } | 593 | } |
453 | else | 594 | else |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 7d990c2..7fc358d 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs | |||
@@ -133,16 +133,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
133 | return new List<ILandObject>(); | 133 | return new List<ILandObject>(); |
134 | } | 134 | } |
135 | 135 | ||
136 | public bool IsLandPrimCountTainted() | ||
137 | { | ||
138 | if (m_landManagementModule != null) | ||
139 | { | ||
140 | return m_landManagementModule.IsLandPrimCountTainted(); | ||
141 | } | ||
142 | |||
143 | return false; | ||
144 | } | ||
145 | |||
146 | public bool IsForcefulBansAllowed() | 136 | public bool IsForcefulBansAllowed() |
147 | { | 137 | { |
148 | if (m_landManagementModule != null) | 138 | if (m_landManagementModule != null) |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index b5517a1..fae4f90 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -62,8 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
62 | 62 | ||
63 | public class LandManagementModule : INonSharedRegionModule | 63 | public class LandManagementModule : INonSharedRegionModule |
64 | { | 64 | { |
65 | private static readonly ILog m_log = | 65 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
66 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
67 | 66 | ||
68 | private static readonly string remoteParcelRequestPath = "0009/"; | 67 | private static readonly string remoteParcelRequestPath = "0009/"; |
69 | 68 | ||
@@ -89,7 +88,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
89 | /// </value> | 88 | /// </value> |
90 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); | 89 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); |
91 | 90 | ||
92 | private bool m_landPrimCountTainted; | ||
93 | private int m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; | 91 | private int m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; |
94 | 92 | ||
95 | private bool m_allowedForcefulBans = true; | 93 | private bool m_allowedForcefulBans = true; |
@@ -128,18 +126,18 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
128 | 126 | ||
129 | m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd; | 127 | m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd; |
130 | m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate; | 128 | m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate; |
129 | m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene; | ||
130 | m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate; | ||
131 | |||
131 | m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel; | 132 | m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel; |
132 | m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement; | 133 | m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement; |
133 | m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy; | 134 | m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy; |
134 | m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy; | 135 | m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy; |
135 | m_scene.EventManager.OnNewClient += EventManagerOnNewClient; | 136 | m_scene.EventManager.OnNewClient += EventManagerOnNewClient; |
136 | m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement; | 137 | m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement; |
137 | m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene; | ||
138 | m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage; | 138 | m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage; |
139 | m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage; | 139 | m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage; |
140 | m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan; | 140 | m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan; |
141 | m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate; | ||
142 | m_scene.EventManager.OnParcelPrimCountTainted += EventManagerOnParcelPrimCountTainted; | ||
143 | m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps; | 141 | m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps; |
144 | m_scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole; | 142 | m_scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole; |
145 | 143 | ||
@@ -277,8 +275,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
277 | /// <returns>The parcel created.</returns> | 275 | /// <returns>The parcel created.</returns> |
278 | protected ILandObject CreateDefaultParcel() | 276 | protected ILandObject CreateDefaultParcel() |
279 | { | 277 | { |
280 | // m_log.DebugFormat( | 278 | m_log.DebugFormat( |
281 | // "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); | 279 | "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); |
282 | 280 | ||
283 | ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); | 281 | ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); |
284 | fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); | 282 | fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); |
@@ -695,34 +693,24 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
695 | 693 | ||
696 | #region Parcel Modification | 694 | #region Parcel Modification |
697 | 695 | ||
698 | public void ResetAllLandPrimCounts() | 696 | public void ResetOverMeRecords() |
699 | { | 697 | { |
700 | lock (m_landList) | 698 | lock (m_landList) |
701 | { | 699 | { |
702 | foreach (LandObject p in m_landList.Values) | 700 | foreach (LandObject p in m_landList.Values) |
703 | { | 701 | { |
704 | p.ResetLandPrimCounts(); | 702 | p.ResetOverMeRecord(); |
705 | } | 703 | } |
706 | } | 704 | } |
707 | } | 705 | } |
708 | 706 | ||
709 | public void EventManagerOnParcelPrimCountTainted() | ||
710 | { | ||
711 | m_landPrimCountTainted = true; | ||
712 | } | ||
713 | |||
714 | public bool IsLandPrimCountTainted() | ||
715 | { | ||
716 | return m_landPrimCountTainted; | ||
717 | } | ||
718 | |||
719 | public void EventManagerOnParcelPrimCountAdd(SceneObjectGroup obj) | 707 | public void EventManagerOnParcelPrimCountAdd(SceneObjectGroup obj) |
720 | { | 708 | { |
721 | Vector3 position = obj.AbsolutePosition; | 709 | Vector3 position = obj.AbsolutePosition; |
722 | ILandObject landUnderPrim = GetLandObject(position.X, position.Y); | 710 | ILandObject landUnderPrim = GetLandObject(position.X, position.Y); |
723 | if (landUnderPrim != null) | 711 | if (landUnderPrim != null) |
724 | { | 712 | { |
725 | ((LandObject)landUnderPrim).AddPrimToCount(obj); | 713 | ((LandObject)landUnderPrim).AddPrimOverMe(obj); |
726 | } | 714 | } |
727 | } | 715 | } |
728 | 716 | ||
@@ -732,7 +720,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
732 | { | 720 | { |
733 | foreach (LandObject p in m_landList.Values) | 721 | foreach (LandObject p in m_landList.Values) |
734 | { | 722 | { |
735 | p.RemovePrimFromCount(obj); | 723 | p.RemovePrimFromOverMe(obj); |
736 | } | 724 | } |
737 | } | 725 | } |
738 | } | 726 | } |
@@ -765,8 +753,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
765 | foreach (LandObject p in landOwnersAndParcels[owner]) | 753 | foreach (LandObject p in landOwnersAndParcels[owner]) |
766 | { | 754 | { |
767 | simArea += p.LandData.Area; | 755 | simArea += p.LandData.Area; |
768 | simPrims += p.LandData.OwnerPrims + p.LandData.OtherPrims + p.LandData.GroupPrims + | 756 | simPrims += p.PrimCounts.Total; |
769 | p.LandData.SelectedPrims; | ||
770 | } | 757 | } |
771 | 758 | ||
772 | foreach (LandObject p in landOwnersAndParcels[owner]) | 759 | foreach (LandObject p in landOwnersAndParcels[owner]) |
@@ -783,7 +770,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
783 | // "[LAND MANAGEMENT MODULE]: Triggered EventManagerOnParcelPrimCountUpdate() for {0}", | 770 | // "[LAND MANAGEMENT MODULE]: Triggered EventManagerOnParcelPrimCountUpdate() for {0}", |
784 | // m_scene.RegionInfo.RegionName); | 771 | // m_scene.RegionInfo.RegionName); |
785 | 772 | ||
786 | ResetAllLandPrimCounts(); | 773 | ResetOverMeRecords(); |
787 | EntityBase[] entities = m_scene.Entities.GetEntities(); | 774 | EntityBase[] entities = m_scene.Entities.GetEntities(); |
788 | foreach (EntityBase obj in entities) | 775 | foreach (EntityBase obj in entities) |
789 | { | 776 | { |
@@ -796,15 +783,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
796 | } | 783 | } |
797 | } | 784 | } |
798 | FinalizeLandPrimCountUpdate(); | 785 | FinalizeLandPrimCountUpdate(); |
799 | m_landPrimCountTainted = false; | ||
800 | } | 786 | } |
801 | 787 | ||
802 | public void EventManagerOnRequestParcelPrimCountUpdate() | 788 | public void EventManagerOnRequestParcelPrimCountUpdate() |
803 | { | 789 | { |
804 | ResetAllLandPrimCounts(); | 790 | ResetOverMeRecords(); |
805 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); | 791 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); |
806 | FinalizeLandPrimCountUpdate(); | 792 | FinalizeLandPrimCountUpdate(); |
807 | m_landPrimCountTainted = false; | ||
808 | } | 793 | } |
809 | 794 | ||
810 | /// <summary> | 795 | /// <summary> |
@@ -868,8 +853,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
868 | m_landList[startLandObjectIndex].ForceUpdateLandInfo(); | 853 | m_landList[startLandObjectIndex].ForceUpdateLandInfo(); |
869 | } | 854 | } |
870 | 855 | ||
871 | EventManagerOnParcelPrimCountTainted(); | ||
872 | |||
873 | //Now add the new land object | 856 | //Now add the new land object |
874 | ILandObject result = AddLandObject(newLand); | 857 | ILandObject result = AddLandObject(newLand); |
875 | UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData); | 858 | UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData); |
@@ -936,7 +919,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
936 | performFinalLandJoin(masterLandObject, slaveLandObject); | 919 | performFinalLandJoin(masterLandObject, slaveLandObject); |
937 | } | 920 | } |
938 | } | 921 | } |
939 | EventManagerOnParcelPrimCountTainted(); | ||
940 | 922 | ||
941 | masterLandObject.SendLandUpdateToAvatarsOverMe(); | 923 | masterLandObject.SendLandUpdateToAvatarsOverMe(); |
942 | } | 924 | } |
@@ -1130,6 +1112,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1130 | 1112 | ||
1131 | if (land != null) | 1113 | if (land != null) |
1132 | { | 1114 | { |
1115 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); | ||
1133 | m_landList[local_id].SendLandObjectOwners(remote_client); | 1116 | m_landList[local_id].SendLandObjectOwners(remote_client); |
1134 | } | 1117 | } |
1135 | else | 1118 | else |
@@ -1375,7 +1358,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1375 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) | 1358 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) |
1376 | { | 1359 | { |
1377 | IClientAPI client; | 1360 | IClientAPI client; |
1378 | if (! m_scene.TryGetClient(agentID, out client)) { | 1361 | if (!m_scene.TryGetClient(agentID, out client)) |
1362 | { | ||
1379 | m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID); | 1363 | m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID); |
1380 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1364 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1381 | } | 1365 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index e87153b..57c7fc6 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -64,8 +64,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
64 | 64 | ||
65 | #endregion | 65 | #endregion |
66 | 66 | ||
67 | #region ILandObject Members | ||
68 | |||
69 | public int GetPrimsFree() | 67 | public int GetPrimsFree() |
70 | { | 68 | { |
71 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); | 69 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); |
@@ -213,6 +211,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
213 | return simMax; | 211 | return simMax; |
214 | } | 212 | } |
215 | } | 213 | } |
214 | |||
216 | #endregion | 215 | #endregion |
217 | 216 | ||
218 | #region Packet Request Handling | 217 | #region Packet Request Handling |
@@ -944,9 +943,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
944 | 943 | ||
945 | lock (primsOverMe) | 944 | lock (primsOverMe) |
946 | { | 945 | { |
946 | // m_log.DebugFormat( | ||
947 | // "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region", | ||
948 | // remote_client.Name, primsOverMe.Count); | ||
949 | |||
947 | try | 950 | try |
948 | { | 951 | { |
949 | |||
950 | foreach (SceneObjectGroup obj in primsOverMe) | 952 | foreach (SceneObjectGroup obj in primsOverMe) |
951 | { | 953 | { |
952 | try | 954 | try |
@@ -958,7 +960,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
958 | } | 960 | } |
959 | catch (NullReferenceException) | 961 | catch (NullReferenceException) |
960 | { | 962 | { |
961 | m_log.Info("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel"); | 963 | m_log.Error("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel"); |
962 | } | 964 | } |
963 | try | 965 | try |
964 | { | 966 | { |
@@ -985,6 +987,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
985 | public Dictionary<UUID, int> GetLandObjectOwners() | 987 | public Dictionary<UUID, int> GetLandObjectOwners() |
986 | { | 988 | { |
987 | Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); | 989 | Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); |
990 | |||
988 | lock (primsOverMe) | 991 | lock (primsOverMe) |
989 | { | 992 | { |
990 | try | 993 | try |
@@ -1021,8 +1024,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1021 | 1024 | ||
1022 | public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client) | 1025 | public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client) |
1023 | { | 1026 | { |
1024 | Dictionary<UUID,List<SceneObjectGroup>> returns = | 1027 | // m_log.DebugFormat( |
1025 | new Dictionary<UUID,List<SceneObjectGroup>>(); | 1028 | // "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name); |
1029 | |||
1030 | Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>(); | ||
1026 | 1031 | ||
1027 | lock (primsOverMe) | 1032 | lock (primsOverMe) |
1028 | { | 1033 | { |
@@ -1095,83 +1100,29 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1095 | 1100 | ||
1096 | #region Object Adding/Removing from Parcel | 1101 | #region Object Adding/Removing from Parcel |
1097 | 1102 | ||
1098 | public void ResetLandPrimCounts() | 1103 | public void ResetOverMeRecord() |
1099 | { | 1104 | { |
1100 | LandData.GroupPrims = 0; | ||
1101 | LandData.OwnerPrims = 0; | ||
1102 | LandData.OtherPrims = 0; | ||
1103 | LandData.SelectedPrims = 0; | ||
1104 | |||
1105 | |||
1106 | lock (primsOverMe) | 1105 | lock (primsOverMe) |
1107 | primsOverMe.Clear(); | 1106 | primsOverMe.Clear(); |
1108 | } | 1107 | } |
1109 | 1108 | ||
1110 | public void AddPrimToCount(SceneObjectGroup obj) | 1109 | public void AddPrimOverMe(SceneObjectGroup obj) |
1111 | { | 1110 | { |
1112 | 1111 | // m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name); | |
1113 | UUID prim_owner = obj.OwnerID; | 1112 | |
1114 | int prim_count = obj.PrimCount; | ||
1115 | |||
1116 | if (obj.IsSelected) | ||
1117 | { | ||
1118 | LandData.SelectedPrims += prim_count; | ||
1119 | } | ||
1120 | else | ||
1121 | { | ||
1122 | if (prim_owner == LandData.OwnerID) | ||
1123 | { | ||
1124 | LandData.OwnerPrims += prim_count; | ||
1125 | } | ||
1126 | else if ((obj.GroupID == LandData.GroupID || | ||
1127 | prim_owner == LandData.GroupID) && | ||
1128 | LandData.GroupID != UUID.Zero) | ||
1129 | { | ||
1130 | LandData.GroupPrims += prim_count; | ||
1131 | } | ||
1132 | else | ||
1133 | { | ||
1134 | LandData.OtherPrims += prim_count; | ||
1135 | } | ||
1136 | } | ||
1137 | |||
1138 | lock (primsOverMe) | 1113 | lock (primsOverMe) |
1139 | primsOverMe.Add(obj); | 1114 | primsOverMe.Add(obj); |
1140 | } | 1115 | } |
1141 | 1116 | ||
1142 | public void RemovePrimFromCount(SceneObjectGroup obj) | 1117 | public void RemovePrimFromOverMe(SceneObjectGroup obj) |
1143 | { | 1118 | { |
1119 | // m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name); | ||
1120 | |||
1144 | lock (primsOverMe) | 1121 | lock (primsOverMe) |
1145 | { | 1122 | primsOverMe.Remove(obj); |
1146 | if (primsOverMe.Contains(obj)) | ||
1147 | { | ||
1148 | UUID prim_owner = obj.OwnerID; | ||
1149 | int prim_count = obj.PrimCount; | ||
1150 | |||
1151 | if (prim_owner == LandData.OwnerID) | ||
1152 | { | ||
1153 | LandData.OwnerPrims -= prim_count; | ||
1154 | } | ||
1155 | else if (obj.GroupID == LandData.GroupID || | ||
1156 | prim_owner == LandData.GroupID) | ||
1157 | { | ||
1158 | LandData.GroupPrims -= prim_count; | ||
1159 | } | ||
1160 | else | ||
1161 | { | ||
1162 | LandData.OtherPrims -= prim_count; | ||
1163 | } | ||
1164 | |||
1165 | primsOverMe.Remove(obj); | ||
1166 | } | ||
1167 | } | ||
1168 | } | 1123 | } |
1169 | 1124 | ||
1170 | #endregion | 1125 | #endregion |
1171 | |||
1172 | #endregion | ||
1173 | |||
1174 | #endregion | ||
1175 | 1126 | ||
1176 | /// <summary> | 1127 | /// <summary> |
1177 | /// Set the media url for this land parcel | 1128 | /// Set the media url for this land parcel |
@@ -1192,5 +1143,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1192 | LandData.MusicURL = url; | 1143 | LandData.MusicURL = url; |
1193 | SendLandUpdateToAvatarsOverMe(); | 1144 | SendLandUpdateToAvatarsOverMe(); |
1194 | } | 1145 | } |
1146 | |||
1147 | #endregion | ||
1195 | } | 1148 | } |
1196 | } | 1149 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs index 2a9036d..9e931a6 100644 --- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | |||
@@ -201,25 +201,29 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
201 | else | 201 | else |
202 | parcelCounts.Users[obj.OwnerID] = partCount; | 202 | parcelCounts.Users[obj.OwnerID] = partCount; |
203 | 203 | ||
204 | if (landData.IsGroupOwned) | 204 | if (obj.IsSelected) |
205 | { | 205 | { |
206 | if (obj.OwnerID == landData.GroupID) | 206 | parcelCounts.Selected += partCount; |
207 | parcelCounts.Owner += partCount; | ||
208 | else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID) | ||
209 | parcelCounts.Group += partCount; | ||
210 | else | ||
211 | parcelCounts.Others += partCount; | ||
212 | } | 207 | } |
213 | else | 208 | else |
214 | { | 209 | { |
215 | if (obj.OwnerID == landData.OwnerID) | 210 | if (landData.IsGroupOwned) |
216 | parcelCounts.Owner += partCount; | 211 | { |
212 | if (obj.OwnerID == landData.GroupID) | ||
213 | parcelCounts.Owner += partCount; | ||
214 | else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID) | ||
215 | parcelCounts.Group += partCount; | ||
216 | else | ||
217 | parcelCounts.Others += partCount; | ||
218 | } | ||
217 | else | 219 | else |
218 | parcelCounts.Others += partCount; | 220 | { |
221 | if (obj.OwnerID == landData.OwnerID) | ||
222 | parcelCounts.Owner += partCount; | ||
223 | else | ||
224 | parcelCounts.Others += partCount; | ||
225 | } | ||
219 | } | 226 | } |
220 | |||
221 | if (obj.IsSelected) | ||
222 | parcelCounts.Selected += partCount; | ||
223 | } | 227 | } |
224 | } | 228 | } |
225 | 229 | ||
@@ -375,6 +379,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
375 | count = counts.Owner; | 379 | count = counts.Owner; |
376 | count += counts.Group; | 380 | count += counts.Group; |
377 | count += counts.Others; | 381 | count += counts.Others; |
382 | count += counts.Selected; | ||
378 | } | 383 | } |
379 | } | 384 | } |
380 | 385 | ||
diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index cea7c78..4e14c73 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs | |||
@@ -469,8 +469,8 @@ namespace OpenSim.Region.CoreModules | |||
469 | m_SunFixedHour = FixedSunHour; | 469 | m_SunFixedHour = FixedSunHour; |
470 | m_SunFixed = FixedSun; | 470 | m_SunFixed = FixedSun; |
471 | 471 | ||
472 | m_log.DebugFormat("[SUN]: Sun Settings Update: Fixed Sun? : {0}", m_SunFixed.ToString()); | 472 | // m_log.DebugFormat("[SUN]: Sun Settings Update: Fixed Sun? : {0}", m_SunFixed.ToString()); |
473 | m_log.DebugFormat("[SUN]: Sun Settings Update: Sun Hour : {0}", m_SunFixedHour.ToString()); | 473 | // m_log.DebugFormat("[SUN]: Sun Settings Update: Sun Hour : {0}", m_SunFixedHour.ToString()); |
474 | 474 | ||
475 | receivedEstateToolsSunUpdate = true; | 475 | receivedEstateToolsSunUpdate = true; |
476 | 476 | ||
@@ -480,7 +480,7 @@ namespace OpenSim.Region.CoreModules | |||
480 | // When sun settings are updated, we should update all clients with new settings. | 480 | // When sun settings are updated, we should update all clients with new settings. |
481 | SunUpdateToAllClients(); | 481 | SunUpdateToAllClients(); |
482 | 482 | ||
483 | m_log.DebugFormat("[SUN]: PosTime : {0}", PosTime.ToString()); | 483 | // m_log.DebugFormat("[SUN]: PosTime : {0}", PosTime.ToString()); |
484 | } | 484 | } |
485 | } | 485 | } |
486 | 486 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs index 38c10a6..7066cf2 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs | |||
@@ -71,6 +71,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
71 | List<int> GetEstates(string search); | 71 | List<int> GetEstates(string search); |
72 | 72 | ||
73 | /// <summary> | 73 | /// <summary> |
74 | /// Get the IDs of all estates owned by the given user. | ||
75 | /// </summary> | ||
76 | /// <returns>An empty list if no estates were found.</returns> | ||
77 | List<int> GetEstatesByOwner(UUID ownerID); | ||
78 | |||
79 | /// <summary> | ||
74 | /// Get the IDs of all estates. | 80 | /// Get the IDs of all estates. |
75 | /// </summary> | 81 | /// </summary> |
76 | /// <returns>An empty list if no estates were found.</returns> | 82 | /// <returns>An empty list if no estates were found.</returns> |
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs index c82661d..d790a30 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs | |||
@@ -74,6 +74,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
74 | /// <param name="search">Name of estate to search for. This is the exact name, no parttern matching is done.</param> | 74 | /// <param name="search">Name of estate to search for. This is the exact name, no parttern matching is done.</param> |
75 | /// <returns></returns> | 75 | /// <returns></returns> |
76 | List<int> GetEstates(string search); | 76 | List<int> GetEstates(string search); |
77 | |||
78 | /// <summary> | ||
79 | /// Get the IDs of all estates owned by the given user. | ||
80 | /// </summary> | ||
81 | /// <returns>An empty list if no estates were found.</returns> | ||
82 | List<int> GetEstatesByOwner(UUID ownerID); | ||
77 | 83 | ||
78 | /// <summary> | 84 | /// <summary> |
79 | /// Get the IDs of all estates. | 85 | /// Get the IDs of all estates. |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4eb5d64..2e82e1f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1458,20 +1458,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1458 | } | 1458 | } |
1459 | 1459 | ||
1460 | /// <summary> | 1460 | /// <summary> |
1461 | /// Recount SceneObjectPart in parcel aabb | ||
1462 | /// </summary> | ||
1463 | private void UpdateLand() | ||
1464 | { | ||
1465 | if (LandChannel != null) | ||
1466 | { | ||
1467 | if (LandChannel.IsLandPrimCountTainted()) | ||
1468 | { | ||
1469 | EventManager.TriggerParcelPrimCountUpdate(); | ||
1470 | } | ||
1471 | } | ||
1472 | } | ||
1473 | |||
1474 | /// <summary> | ||
1475 | /// Update the terrain if it needs to be updated. | 1461 | /// Update the terrain if it needs to be updated. |
1476 | /// </summary> | 1462 | /// </summary> |
1477 | private void UpdateTerrain() | 1463 | private void UpdateTerrain() |
@@ -1565,8 +1551,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1565 | } | 1551 | } |
1566 | 1552 | ||
1567 | /// <summary> | 1553 | /// <summary> |
1568 | /// Return object to avatar Message | 1554 | /// Tell an agent that their object has been returned. |
1569 | /// </summary> | 1555 | /// </summary> |
1556 | /// <remarks> | ||
1557 | /// The actual return is handled by the caller. | ||
1558 | /// </remarks> | ||
1570 | /// <param name="agentID">Avatar Unique Id</param> | 1559 | /// <param name="agentID">Avatar Unique Id</param> |
1571 | /// <param name="objectName">Name of object returned</param> | 1560 | /// <param name="objectName">Name of object returned</param> |
1572 | /// <param name="location">Location of object returned</param> | 1561 | /// <param name="location">Location of object returned</param> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 776b3b3..86f06ca 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1590,8 +1590,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1590 | parcel.LandData.OtherCleanTime) | 1590 | parcel.LandData.OtherCleanTime) |
1591 | { | 1591 | { |
1592 | DetachFromBackup(); | 1592 | DetachFromBackup(); |
1593 | m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString()); | 1593 | m_log.DebugFormat( |
1594 | m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel auto return"); | 1594 | "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn", |
1595 | RootPart.UUID); | ||
1596 | m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel autoreturn"); | ||
1595 | m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, | 1597 | m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, |
1596 | DeRezAction.Return, UUID.Zero); | 1598 | DeRezAction.Return, UUID.Zero); |
1597 | 1599 | ||
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs index 781fe95..dddea3e 100644 --- a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs +++ b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs | |||
@@ -33,6 +33,9 @@ using Nini.Config; | |||
33 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
34 | using OpenSim.Region.Framework.Scenes; | 34 | using OpenSim.Region.Framework.Scenes; |
35 | 35 | ||
36 | [assembly: Addin("BareBonesSharedModule", "0.1")] | ||
37 | [assembly: AddinDependency("OpenSim", "0.5")] | ||
38 | |||
36 | namespace OpenSim.Region.OptionalModules.Example.BareBonesShared | 39 | namespace OpenSim.Region.OptionalModules.Example.BareBonesShared |
37 | { | 40 | { |
38 | /// <summary> | 41 | /// <summary> |
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs index 98e5453..a133e51 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs | |||
@@ -130,11 +130,6 @@ public class RegionCombinerLargeLandChannel : ILandChannel | |||
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | public bool IsLandPrimCountTainted() | ||
134 | { | ||
135 | return RootRegionLandChannel.IsLandPrimCountTainted(); | ||
136 | } | ||
137 | |||
138 | public bool IsForcefulBansAllowed() | 133 | public bool IsForcefulBansAllowed() |
139 | { | 134 | { |
140 | return RootRegionLandChannel.IsForcefulBansAllowed(); | 135 | return RootRegionLandChannel.IsForcefulBansAllowed(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ea38427..c0b490a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10472,63 +10472,42 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10472 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) | 10472 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) |
10473 | { | 10473 | { |
10474 | m_host.AddScriptLPS(1); | 10474 | m_host.AddScriptLPS(1); |
10475 | |||
10476 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | ||
10475 | 10477 | ||
10476 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); | 10478 | if (lo == null) |
10477 | |||
10478 | if (land == null) | ||
10479 | { | ||
10480 | return 0; | 10479 | return 0; |
10481 | } | 10480 | |
10481 | IPrimCounts pc = lo.PrimCounts; | ||
10482 | 10482 | ||
10483 | else | 10483 | if (sim_wide != ScriptBaseClass.FALSE) |
10484 | { | 10484 | { |
10485 | if (sim_wide != 0) | 10485 | if (category == ScriptBaseClass.PARCEL_COUNT_TOTAL) |
10486 | { | 10486 | { |
10487 | if (category == 0) | 10487 | return pc.Simulator; |
10488 | { | ||
10489 | return land.SimwidePrims; | ||
10490 | } | ||
10491 | |||
10492 | else | ||
10493 | { | ||
10494 | //public int simwideArea = 0; | ||
10495 | return 0; | ||
10496 | } | ||
10497 | } | 10488 | } |
10498 | |||
10499 | else | 10489 | else |
10500 | { | 10490 | { |
10501 | if (category == 0)//Total Prims | 10491 | // counts not implemented yet |
10502 | { | 10492 | return 0; |
10503 | return 0;//land. | ||
10504 | } | ||
10505 | |||
10506 | else if (category == 1)//Owner Prims | ||
10507 | { | ||
10508 | return land.OwnerPrims; | ||
10509 | } | ||
10510 | |||
10511 | else if (category == 2)//Group Prims | ||
10512 | { | ||
10513 | return land.GroupPrims; | ||
10514 | } | ||
10515 | |||
10516 | else if (category == 3)//Other Prims | ||
10517 | { | ||
10518 | return land.OtherPrims; | ||
10519 | } | ||
10520 | |||
10521 | else if (category == 4)//Selected | ||
10522 | { | ||
10523 | return land.SelectedPrims; | ||
10524 | } | ||
10525 | |||
10526 | else if (category == 5)//Temp | ||
10527 | { | ||
10528 | return 0;//land. | ||
10529 | } | ||
10530 | } | 10493 | } |
10531 | } | 10494 | } |
10495 | else | ||
10496 | { | ||
10497 | if (category == ScriptBaseClass.PARCEL_COUNT_TOTAL) | ||
10498 | return pc.Total; | ||
10499 | else if (category == ScriptBaseClass.PARCEL_COUNT_OWNER) | ||
10500 | return pc.Owner; | ||
10501 | else if (category == ScriptBaseClass.PARCEL_COUNT_GROUP) | ||
10502 | return pc.Group; | ||
10503 | else if (category == ScriptBaseClass.PARCEL_COUNT_OTHER) | ||
10504 | return pc.Others; | ||
10505 | else if (category == ScriptBaseClass.PARCEL_COUNT_SELECTED) | ||
10506 | return pc.Selected; | ||
10507 | else if (category == ScriptBaseClass.PARCEL_COUNT_TEMP) | ||
10508 | return 0; // counts not implemented yet | ||
10509 | } | ||
10510 | |||
10532 | return 0; | 10511 | return 0; |
10533 | } | 10512 | } |
10534 | 10513 | ||