/indra/llmessage/llregionflags.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 171 lines · 87 code · 36 blank · 48 comment · 3 complexity · 8b1442795cf50091fb7d5b2cc8c910da MD5 · raw file

  1. /**
  2. * @file llregionflags.h
  3. * @brief Flags that are sent in the statistics message region_flags field.
  4. *
  5. * $LicenseInfo:firstyear=2002&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLREGIONFLAGS_H
  27. #define LL_LLREGIONFLAGS_H
  28. // Can you be hurt here? Should health be on?
  29. const U32 REGION_FLAGS_ALLOW_DAMAGE = (1 << 0);
  30. // Can you make landmarks here?
  31. const U32 REGION_FLAGS_ALLOW_LANDMARK = (1 << 1);
  32. // Do we reset the home position when someone teleports away from here?
  33. const U32 REGION_FLAGS_ALLOW_SET_HOME = (1 << 2);
  34. // Do we reset the home position when someone teleports away from here?
  35. const U32 REGION_FLAGS_RESET_HOME_ON_TELEPORT = (1 << 3);
  36. // Does the sun move?
  37. const U32 REGION_FLAGS_SUN_FIXED = (1 << 4);
  38. // Can't change the terrain heightfield, even on owned parcels,
  39. // but can plant trees and grass.
  40. const U32 REGION_FLAGS_BLOCK_TERRAFORM = (1 << 6);
  41. // Can't release, sell, or buy land.
  42. const U32 REGION_FLAGS_BLOCK_LAND_RESELL = (1 << 7);
  43. // All content wiped once per night
  44. const U32 REGION_FLAGS_SANDBOX = (1 << 8);
  45. const U32 REGION_FLAGS_SKIP_COLLISIONS = (1 << 12); // Pin all non agent rigid bodies
  46. const U32 REGION_FLAGS_SKIP_SCRIPTS = (1 << 13);
  47. const U32 REGION_FLAGS_SKIP_PHYSICS = (1 << 14); // Skip all physics
  48. const U32 REGION_FLAGS_EXTERNALLY_VISIBLE = (1 << 15);
  49. const U32 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_OBJECT = (1 << 16);
  50. const U32 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_ESTATE_OBJECT = (1 << 17);
  51. const U32 REGION_FLAGS_BLOCK_DWELL = (1 << 18);
  52. // Is flight allowed?
  53. const U32 REGION_FLAGS_BLOCK_FLY = (1 << 19);
  54. // Is direct teleport (p2p) allowed?
  55. const U32 REGION_FLAGS_ALLOW_DIRECT_TELEPORT = (1 << 20);
  56. // Is there an administrative override on scripts in the region at the
  57. // moment. This is the similar skip scripts, except this flag is
  58. // presisted in the database on an estate level.
  59. const U32 REGION_FLAGS_ESTATE_SKIP_SCRIPTS = (1 << 21);
  60. const U32 REGION_FLAGS_RESTRICT_PUSHOBJECT = (1 << 22);
  61. const U32 REGION_FLAGS_DENY_ANONYMOUS = (1 << 23);
  62. const U32 REGION_FLAGS_ALLOW_PARCEL_CHANGES = (1 << 26);
  63. const U32 REGION_FLAGS_ALLOW_VOICE = (1 << 28);
  64. const U32 REGION_FLAGS_BLOCK_PARCEL_SEARCH = (1 << 29);
  65. const U32 REGION_FLAGS_DENY_AGEUNVERIFIED = (1 << 30);
  66. const U32 REGION_FLAGS_DEFAULT = REGION_FLAGS_ALLOW_LANDMARK |
  67. REGION_FLAGS_ALLOW_SET_HOME |
  68. REGION_FLAGS_ALLOW_PARCEL_CHANGES |
  69. REGION_FLAGS_ALLOW_VOICE;
  70. const U32 REGION_FLAGS_PRELUDE_SET = REGION_FLAGS_RESET_HOME_ON_TELEPORT;
  71. const U32 REGION_FLAGS_PRELUDE_UNSET = REGION_FLAGS_ALLOW_LANDMARK
  72. | REGION_FLAGS_ALLOW_SET_HOME;
  73. const U32 REGION_FLAGS_ESTATE_MASK = REGION_FLAGS_EXTERNALLY_VISIBLE
  74. | REGION_FLAGS_SUN_FIXED
  75. | REGION_FLAGS_DENY_ANONYMOUS
  76. | REGION_FLAGS_DENY_AGEUNVERIFIED;
  77. inline BOOL is_prelude( U32 flags )
  78. {
  79. // definition of prelude does not depend on fixed-sun
  80. return 0 == (flags & REGION_FLAGS_PRELUDE_UNSET)
  81. && 0 != (flags & REGION_FLAGS_PRELUDE_SET);
  82. }
  83. inline U32 set_prelude_flags(U32 flags)
  84. {
  85. // also set the sun-fixed flag
  86. return ((flags & ~REGION_FLAGS_PRELUDE_UNSET)
  87. | (REGION_FLAGS_PRELUDE_SET | REGION_FLAGS_SUN_FIXED));
  88. }
  89. inline U32 unset_prelude_flags(U32 flags)
  90. {
  91. // also unset the fixed-sun flag
  92. return ((flags | REGION_FLAGS_PRELUDE_UNSET)
  93. & ~(REGION_FLAGS_PRELUDE_SET | REGION_FLAGS_SUN_FIXED));
  94. }
  95. // estate constants. Need to match first few etries in indra.estate table.
  96. const U32 ESTATE_ALL = 0; // will not match in db, reserved key for logic
  97. const U32 ESTATE_MAINLAND = 1;
  98. const U32 ESTATE_ORIENTATION = 2;
  99. const U32 ESTATE_INTERNAL = 3;
  100. const U32 ESTATE_SHOWCASE = 4;
  101. const U32 ESTATE_TEEN = 5;
  102. const U32 ESTATE_LAST_LINDEN = 5; // last linden owned/managed estate
  103. // for EstateOwnerRequest, setaccess message
  104. const U32 ESTATE_ACCESS_ALLOWED_AGENTS = 1 << 0;
  105. const U32 ESTATE_ACCESS_ALLOWED_GROUPS = 1 << 1;
  106. const U32 ESTATE_ACCESS_BANNED_AGENTS = 1 << 2;
  107. const U32 ESTATE_ACCESS_MANAGERS = 1 << 3;
  108. //maximum number of access list entries we can fit in one packet
  109. const S32 ESTATE_ACCESS_MAX_ENTRIES_PER_PACKET = 63;
  110. // for reply to "getinfo", don't need to forward to all sims in estate
  111. const U32 ESTATE_ACCESS_SEND_TO_AGENT_ONLY = 1 << 4;
  112. const U32 ESTATE_ACCESS_ALL = ESTATE_ACCESS_ALLOWED_AGENTS
  113. | ESTATE_ACCESS_ALLOWED_GROUPS
  114. | ESTATE_ACCESS_BANNED_AGENTS
  115. | ESTATE_ACCESS_MANAGERS;
  116. // for EstateOwnerRequest, estateaccessdelta message
  117. const U32 ESTATE_ACCESS_APPLY_TO_ALL_ESTATES = 1 << 0;
  118. const U32 ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES = 1 << 1;
  119. const U32 ESTATE_ACCESS_ALLOWED_AGENT_ADD = 1 << 2;
  120. const U32 ESTATE_ACCESS_ALLOWED_AGENT_REMOVE = 1 << 3;
  121. const U32 ESTATE_ACCESS_ALLOWED_GROUP_ADD = 1 << 4;
  122. const U32 ESTATE_ACCESS_ALLOWED_GROUP_REMOVE = 1 << 5;
  123. const U32 ESTATE_ACCESS_BANNED_AGENT_ADD = 1 << 6;
  124. const U32 ESTATE_ACCESS_BANNED_AGENT_REMOVE = 1 << 7;
  125. const U32 ESTATE_ACCESS_MANAGER_ADD = 1 << 8;
  126. const U32 ESTATE_ACCESS_MANAGER_REMOVE = 1 << 9;
  127. const U32 ESTATE_ACCESS_NO_REPLY = 1 << 10;
  128. const S32 ESTATE_MAX_MANAGERS = 10;
  129. const S32 ESTATE_MAX_ACCESS_IDS = 500; // max for access, banned
  130. const S32 ESTATE_MAX_GROUP_IDS = (S32) ESTATE_ACCESS_MAX_ENTRIES_PER_PACKET;
  131. // 'Sim Wide Delete' flags
  132. const U32 SWD_OTHERS_LAND_ONLY = (1 << 0);
  133. const U32 SWD_ALWAYS_RETURN_OBJECTS = (1 << 1);
  134. const U32 SWD_SCRIPTED_ONLY = (1 << 2);
  135. #endif