1
0

Constants.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using OpenMetaverse;
  29. namespace OpenSim.Framework
  30. {
  31. public class Constants
  32. {
  33. public const int MaxAgentAttachments = 38;
  34. public const int MaxAgentGroups = 60;
  35. // 'RegionSize' is the legacy region size.
  36. // DO NOT USE THIS FOR ANY NEW CODE. Use Scene.RegionInfo.RegionSize[XYZ] as a region might not
  37. // be the legacy region size.
  38. public const uint RegionSize = 256;
  39. public const uint RegionHeight = 4096;
  40. public const uint MaximumRegionSize = 4096;
  41. // Since terrain is stored in 16x16 heights, regions must be a multiple of this number and that is the minimum
  42. // but for placement on a grid min must be 256m
  43. public const int MinRegionSize = 256;
  44. public const int TerrainPatchSize = 16;
  45. public const float MinSimulationHeight = -100f;
  46. public const float MaxSimulationHeight = 50000f;
  47. public const float MinTerrainHeightmap = -100f;
  48. public const float MaxTerrainHeightmap = 4000f;
  49. public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f";
  50. public static readonly UUID m_MrOpenSimID = new UUID("11111111-1111-0000-0000-000100bba000");
  51. public static readonly DateTime m_MrOpenSimBorn = new DateTime(2007, 1, 1, 0, 0, 0, DateTimeKind.Utc);
  52. public enum EstateAccessCodex : uint
  53. {
  54. AllowedAccess = 1,
  55. AllowedGroups = 2,
  56. EstateBans = 4,
  57. EstateManagers = 8
  58. }
  59. public enum EstateAccessLimits : int
  60. {
  61. AllowedAccess = 500,
  62. AllowedGroups = 63,
  63. EstateBans = 500,
  64. EstateManagers = 10
  65. }
  66. [Flags]public enum TeleportFlags : uint
  67. {
  68. /// <summary>No flags set, or teleport failed</summary>
  69. Default = 0,
  70. /// <summary>Set when newbie leaves help island for first time</summary>
  71. SetHomeToTarget = 1 << 0,
  72. /// <summary></summary>
  73. SetLastToTarget = 1 << 1,
  74. /// <summary>Via Lure</summary>
  75. ViaLure = 1 << 2,
  76. /// <summary>Via Landmark</summary>
  77. ViaLandmark = 1 << 3,
  78. /// <summary>Via Location</summary>
  79. ViaLocation = 1 << 4,
  80. /// <summary>Via Home</summary>
  81. ViaHome = 1 << 5,
  82. /// <summary>Via Telehub</summary>
  83. ViaTelehub = 1 << 6,
  84. /// <summary>Via Login</summary>
  85. ViaLogin = 1 << 7,
  86. /// <summary>Linden Summoned</summary>
  87. ViaGodlikeLure = 1 << 8,
  88. /// <summary>Linden Forced me</summary>
  89. Godlike = 1 << 9,
  90. /// <summary></summary>
  91. NineOneOne = 1 << 10,
  92. /// <summary>Agent Teleported Home via Script</summary>
  93. DisableCancel = 1 << 11,
  94. /// <summary></summary>
  95. ViaRegionID = 1 << 12,
  96. /// <summary></summary>
  97. IsFlying = 1 << 13,
  98. /// <summary></summary>
  99. ResetHome = 1 << 14,
  100. /// <summary>forced to new location for example when avatar is banned or ejected</summary>
  101. ForceRedirect = 1 << 15,
  102. /// <summary>Teleport Finished via a Lure</summary>
  103. FinishedViaLure = 1 << 26,
  104. /// <summary>Finished, Sim Changed</summary>
  105. FinishedViaNewSim = 1 << 28,
  106. /// <summary>Finished, Same Sim</summary>
  107. FinishedViaSameSim = 1 << 29,
  108. /// <summary>Agent coming into the grid from another grid</summary>
  109. ViaHGLogin = 1 << 30,
  110. notViaHGLogin = 0xbffffff
  111. }
  112. }
  113. }