diff options
author | Teravus Ovares | 2007-12-18 12:08:34 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-18 12:08:34 +0000 |
commit | ccc8ffaaec915f0561d9aded6cc4b32b911f473c (patch) | |
tree | e07135474e1986cd09177db8e62787b4f74c114a /OpenSim/Region/Environment | |
parent | * Removed redundant code in RestService.cs (diff) | |
download | opensim-SC-ccc8ffaaec915f0561d9aded6cc4b32b911f473c.zip opensim-SC-ccc8ffaaec915f0561d9aded6cc4b32b911f473c.tar.gz opensim-SC-ccc8ffaaec915f0561d9aded6cc4b32b911f473c.tar.bz2 opensim-SC-ccc8ffaaec915f0561d9aded6cc4b32b911f473c.tar.xz |
* Added Incomplete Handling of the RegionInfoRequest packet
* Added Incomplete Handling of the EstateCovenantRequest packet
* Added Incomplete Handling of the EstateOwnerMessageRequest.ChangeEstateCovenantid method
* Fixed a race condition with avatar animations
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/EstateManager.cs | 52 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/AvatarAnimations.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 |
3 files changed, 60 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index e1bb4d8..081a8cd 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs | |||
@@ -177,6 +177,12 @@ namespace OpenSim.Region.Environment | |||
177 | estateRestartSim(packet); | 177 | estateRestartSim(packet); |
178 | } | 178 | } |
179 | break; | 179 | break; |
180 | case "estatechangecovenantid": | ||
181 | if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) | ||
182 | { | ||
183 | EstateChangeCovenant(packet); | ||
184 | } | ||
185 | break; | ||
180 | default: | 186 | default: |
181 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); | 187 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); |
182 | break; | 188 | break; |
@@ -340,8 +346,54 @@ namespace OpenSim.Region.Environment | |||
340 | 346 | ||
341 | } | 347 | } |
342 | } | 348 | } |
349 | private void EstateChangeCovenant(EstateOwnerMessagePacket packet) | ||
350 | { | ||
351 | foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) | ||
352 | { | ||
353 | LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter)); | ||
354 | m_regInfo.CovenantID = newCovenantID; | ||
343 | 355 | ||
356 | } | ||
357 | |||
358 | } | ||
359 | public void HandleRegionInfoRequest(IClientAPI client, LLUUID sessionID) | ||
360 | { | ||
361 | RegionInfoPacket rinfopack = new RegionInfoPacket(); | ||
362 | RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock(); | ||
363 | |||
364 | rinfoblk.BillableFactor = 0; | ||
365 | rinfoblk.EstateID = 02; | ||
366 | rinfoblk.MaxAgents = 100; | ||
367 | rinfoblk.ObjectBonusFactor = 1.0f; | ||
368 | rinfoblk.ParentEstateID = 0; | ||
369 | rinfoblk.PricePerMeter = 0; | ||
370 | rinfoblk.RedirectGridX = 0; | ||
371 | rinfoblk.RedirectGridY = 0; | ||
372 | rinfoblk.RegionFlags = (uint)m_regInfo.EstateSettings.regionFlags; | ||
373 | rinfoblk.SimAccess = (byte)m_regInfo.EstateSettings.simAccess; | ||
374 | rinfoblk.SunHour = m_regInfo.EstateSettings.sunHour; | ||
375 | rinfoblk.TerrainLowerLimit = 20; | ||
376 | rinfoblk.TerrainRaiseLimit = 20; | ||
377 | rinfoblk.UseEstateSun = true; | ||
378 | rinfoblk.WaterHeight = m_regInfo.EstateSettings.waterHeight; | ||
379 | rinfoblk.SimName = Helpers.StringToField(m_regInfo.RegionName); | ||
380 | |||
381 | rinfopack.RegionInfo = rinfoblk; | ||
382 | |||
383 | client.OutPacket(rinfopack, ThrottleOutPacketType.Task); | ||
344 | 384 | ||
385 | } | ||
386 | public void HandleEstateCovenantRequest(IClientAPI client, LLUUID sessionID) | ||
387 | { | ||
388 | EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); | ||
389 | EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); | ||
390 | edata.CovenantID = m_regInfo.CovenantID; | ||
391 | edata.CovenantTimestamp = 0; | ||
392 | edata.EstateOwnerID = m_regInfo.MasterAvatarAssignedUUID; | ||
393 | edata.EstateName = Helpers.StringToField(m_regInfo.MasterAvatarFirstName + " " + m_regInfo.MasterAvatarLastName); | ||
394 | einfopack.Data = edata; | ||
395 | client.OutPacket(einfopack, ThrottleOutPacketType.Task); | ||
396 | } | ||
345 | #endregion | 397 | #endregion |
346 | 398 | ||
347 | #region Outgoing Packets | 399 | #region Outgoing Packets |
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs index d508c9e..82ecda8 100644 --- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs +++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs | |||
@@ -59,10 +59,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
59 | } | 59 | } |
60 | 60 | ||
61 | // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); | 61 | // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); |
62 | 62 | ||
63 | foreach (KeyValuePair<string, LLUUID> kp in ScenePresence.Animations.AnimsLLUUID) | 63 | lock (ScenePresence.Animations.AnimsLLUUID) |
64 | { | 64 | { |
65 | AnimsNames.Add(kp.Value, kp.Key); | 65 | foreach (KeyValuePair<string, LLUUID> kp in ScenePresence.Animations.AnimsLLUUID) |
66 | { | ||
67 | AnimsNames.Add(kp.Value, kp.Key); | ||
68 | } | ||
66 | } | 69 | } |
67 | } | 70 | } |
68 | } | 71 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 9ca23d5..eec07fc 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1122,6 +1122,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1122 | client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(m_LandManager.handleParcelAccessUpdateRequest); | 1122 | client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(m_LandManager.handleParcelAccessUpdateRequest); |
1123 | 1123 | ||
1124 | client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); | 1124 | client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); |
1125 | client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest; | ||
1126 | client.OnEstateCovenantRequest += m_estateManager.HandleEstateCovenantRequest; | ||
1125 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; | 1127 | client.OnRequestGodlikePowers += handleRequestGodlikePowers; |
1126 | client.OnGodKickUser += handleGodlikeKickUser; | 1128 | client.OnGodKickUser += handleGodlikeKickUser; |
1127 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; | 1129 | client.OnObjectPermissions += HandleObjectPermissionsUpdate; |