diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 153 |
1 files changed, 86 insertions, 67 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index ddaa227..780ec69 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Linq; | ||
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using log4net; | 32 | using log4net; |
32 | using Nini.Config; | 33 | using Nini.Config; |
@@ -38,6 +39,7 @@ using OpenSim.Region.Framework.Scenes; | |||
38 | using OpenSim.Services.Interfaces; | 39 | using OpenSim.Services.Interfaces; |
39 | 40 | ||
40 | using Mono.Addins; | 41 | using Mono.Addins; |
42 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
41 | 43 | ||
42 | namespace OpenSim.Region.CoreModules.World.Permissions | 44 | namespace OpenSim.Region.CoreModules.World.Permissions |
43 | { | 45 | { |
@@ -156,37 +158,44 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
156 | 158 | ||
157 | public void Initialise(IConfigSource config) | 159 | public void Initialise(IConfigSource config) |
158 | { | 160 | { |
159 | IConfig myConfig = config.Configs["Startup"]; | 161 | string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules", |
162 | new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); | ||
160 | 163 | ||
161 | string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule"); | 164 | List<string> modules = new List<string>(permissionModules.Split(',').Select(m => m.Trim())); |
162 | |||
163 | List<string> modules = new List<string>(permissionModules.Split(',')); | ||
164 | 165 | ||
165 | if (!modules.Contains("DefaultPermissionsModule")) | 166 | if (!modules.Contains("DefaultPermissionsModule")) |
166 | return; | 167 | return; |
167 | 168 | ||
168 | m_Enabled = true; | 169 | m_Enabled = true; |
169 | 170 | ||
170 | m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false); | 171 | m_allowGridGods = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods", |
171 | m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); | 172 | new string[] { "Startup", "Permissions" }, false); |
172 | m_propagatePermissions = myConfig.GetBoolean("propagate_permissions", true); | 173 | m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(config, "serverside_object_permissions", |
173 | m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true); | 174 | new string[] { "Startup", "Permissions" }, true); |
174 | m_RegionManagerIsGod = myConfig.GetBoolean("region_manager_is_god", false); | 175 | m_propagatePermissions = Util.GetConfigVarFromSections<bool>(config, "propagate_permissions", |
175 | m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true); | 176 | new string[] { "Startup", "Permissions" }, true); |
176 | 177 | m_RegionOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god", | |
177 | m_SimpleBuildPermissions = myConfig.GetBoolean("simple_build_permissions", false); | 178 | new string[] { "Startup", "Permissions" }, true); |
179 | m_RegionManagerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god", | ||
180 | new string[] { "Startup", "Permissions" }, false); | ||
181 | m_ParcelOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "parcel_owner_is_god", | ||
182 | new string[] { "Startup", "Permissions" }, true); | ||
183 | |||
184 | m_SimpleBuildPermissions = Util.GetConfigVarFromSections<bool>(config, "simple_build_permissions", | ||
185 | new string[] { "Startup", "Permissions" }, false); | ||
178 | 186 | ||
179 | m_allowedScriptCreators | 187 | m_allowedScriptCreators |
180 | = ParseUserSetConfigSetting(myConfig, "allowed_script_creators", m_allowedScriptCreators); | 188 | = ParseUserSetConfigSetting(config, "allowed_script_creators", m_allowedScriptCreators); |
181 | m_allowedScriptEditors | 189 | m_allowedScriptEditors |
182 | = ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors); | 190 | = ParseUserSetConfigSetting(config, "allowed_script_editors", m_allowedScriptEditors); |
183 | 191 | ||
184 | if (m_bypassPermissions) | 192 | if (m_bypassPermissions) |
185 | m_log.Info("[PERMISSIONS]: serverside_object_permissions = false in ini file so disabling all region service permission checks"); | 193 | m_log.Info("[PERMISSIONS]: serverside_object_permissions = false in ini file so disabling all region service permission checks"); |
186 | else | 194 | else |
187 | m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks"); | 195 | m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks"); |
188 | 196 | ||
189 | string grant = myConfig.GetString("GrantLSL", ""); | 197 | string grant = Util.GetConfigVarFromSections<string>(config, "GrantLSL", |
198 | new string[] { "Startup", "Permissions" }, string.Empty); | ||
190 | if (grant.Length > 0) | 199 | if (grant.Length > 0) |
191 | { | 200 | { |
192 | foreach (string uuidl in grant.Split(',')) | 201 | foreach (string uuidl in grant.Split(',')) |
@@ -196,7 +205,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
196 | } | 205 | } |
197 | } | 206 | } |
198 | 207 | ||
199 | grant = myConfig.GetString("GrantCS", ""); | 208 | grant = Util.GetConfigVarFromSections<string>(config, "GrantCS", |
209 | new string[] { "Startup", "Permissions" }, string.Empty); | ||
200 | if (grant.Length > 0) | 210 | if (grant.Length > 0) |
201 | { | 211 | { |
202 | foreach (string uuidl in grant.Split(',')) | 212 | foreach (string uuidl in grant.Split(',')) |
@@ -206,7 +216,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
206 | } | 216 | } |
207 | } | 217 | } |
208 | 218 | ||
209 | grant = myConfig.GetString("GrantVB", ""); | 219 | grant = Util.GetConfigVarFromSections<string>(config, "GrantVB", |
220 | new string[] { "Startup", "Permissions" }, string.Empty); | ||
210 | if (grant.Length > 0) | 221 | if (grant.Length > 0) |
211 | { | 222 | { |
212 | foreach (string uuidl in grant.Split(',')) | 223 | foreach (string uuidl in grant.Split(',')) |
@@ -216,7 +227,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
216 | } | 227 | } |
217 | } | 228 | } |
218 | 229 | ||
219 | grant = myConfig.GetString("GrantJS", ""); | 230 | grant = Util.GetConfigVarFromSections<string>(config, "GrantJS", |
231 | new string[] { "Startup", "Permissions" }, string.Empty); | ||
220 | if (grant.Length > 0) | 232 | if (grant.Length > 0) |
221 | { | 233 | { |
222 | foreach (string uuidl in grant.Split(',')) | 234 | foreach (string uuidl in grant.Split(',')) |
@@ -226,7 +238,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
226 | } | 238 | } |
227 | } | 239 | } |
228 | 240 | ||
229 | grant = myConfig.GetString("GrantYP", ""); | 241 | grant = Util.GetConfigVarFromSections<string>(config, "GrantYP", |
242 | new string[] { "Startup", "Permissions" }, string.Empty); | ||
230 | if (grant.Length > 0) | 243 | if (grant.Length > 0) |
231 | { | 244 | { |
232 | foreach (string uuidl in grant.Split(',')) | 245 | foreach (string uuidl in grant.Split(',')) |
@@ -456,7 +469,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
456 | 469 | ||
457 | return false; | 470 | return false; |
458 | } | 471 | } |
459 | 472 | ||
460 | /// <summary> | 473 | /// <summary> |
461 | /// Parse a user set configuration setting | 474 | /// Parse a user set configuration setting |
462 | /// </summary> | 475 | /// </summary> |
@@ -464,11 +477,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
464 | /// <param name="settingName"></param> | 477 | /// <param name="settingName"></param> |
465 | /// <param name="defaultValue">The default value for this attribute</param> | 478 | /// <param name="defaultValue">The default value for this attribute</param> |
466 | /// <returns>The parsed value</returns> | 479 | /// <returns>The parsed value</returns> |
467 | private static UserSet ParseUserSetConfigSetting(IConfig config, string settingName, UserSet defaultValue) | 480 | private static UserSet ParseUserSetConfigSetting(IConfigSource config, string settingName, UserSet defaultValue) |
468 | { | 481 | { |
469 | UserSet userSet = defaultValue; | 482 | UserSet userSet = defaultValue; |
470 | 483 | ||
471 | string rawSetting = config.GetString(settingName, defaultValue.ToString()); | 484 | string rawSetting = Util.GetConfigVarFromSections<string>(config, settingName, |
485 | new string[] {"Startup", "Permissions"}, defaultValue.ToString()); | ||
472 | 486 | ||
473 | // Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term | 487 | // Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term |
474 | // this should disappear. | 488 | // this should disappear. |
@@ -787,8 +801,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
787 | 801 | ||
788 | // Friends with benefits should be able to edit the objects too | 802 | // Friends with benefits should be able to edit the objects too |
789 | if (IsFriendWithPerms(currentUser, objectOwner)) | 803 | if (IsFriendWithPerms(currentUser, objectOwner)) |
804 | { | ||
790 | // Return immediately, so that the administrator can share objects with friends | 805 | // Return immediately, so that the administrator can share objects with friends |
791 | return true; | 806 | return true; |
807 | } | ||
792 | 808 | ||
793 | // Users should be able to edit what is over their land. | 809 | // Users should be able to edit what is over their land. |
794 | ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); | 810 | ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); |
@@ -887,7 +903,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
887 | return permission; | 903 | return permission; |
888 | } | 904 | } |
889 | 905 | ||
890 | protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers) | 906 | protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers, bool allowEstateManager) |
891 | { | 907 | { |
892 | if (parcel.LandData.OwnerID == user) | 908 | if (parcel.LandData.OwnerID == user) |
893 | { | 909 | { |
@@ -902,7 +918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
902 | return true; | 918 | return true; |
903 | } | 919 | } |
904 | 920 | ||
905 | if (IsEstateManager(user)) | 921 | if (allowEstateManager && IsEstateManager(user)) |
906 | { | 922 | { |
907 | return true; | 923 | return true; |
908 | } | 924 | } |
@@ -929,7 +945,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
929 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 945 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
930 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 946 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
931 | 947 | ||
932 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease); | 948 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease, false); |
933 | } | 949 | } |
934 | 950 | ||
935 | private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene) | 951 | private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene) |
@@ -937,7 +953,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
937 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 953 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
938 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 954 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
939 | 955 | ||
940 | return GenericParcelOwnerPermission(user, parcel, 0); | 956 | return GenericParcelOwnerPermission(user, parcel, 0,true); |
941 | } | 957 | } |
942 | 958 | ||
943 | private bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene) | 959 | private bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene) |
@@ -954,7 +970,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
954 | if ((client.GetGroupPowers(parcel.LandData.GroupID) & (ulong)GroupPowers.LandDeed) == 0) | 970 | if ((client.GetGroupPowers(parcel.LandData.GroupID) & (ulong)GroupPowers.LandDeed) == 0) |
955 | return false; | 971 | return false; |
956 | 972 | ||
957 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed); | 973 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed, false); |
958 | } | 974 | } |
959 | 975 | ||
960 | private bool CanDeedObject(UUID user, UUID group, Scene scene) | 976 | private bool CanDeedObject(UUID user, UUID group, Scene scene) |
@@ -995,9 +1011,11 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
995 | return false; | 1011 | return false; |
996 | 1012 | ||
997 | if (part.OwnerID == owner) | 1013 | if (part.OwnerID == owner) |
998 | return ((part.OwnerMask & PERM_COPY) != 0); | 1014 | { |
999 | 1015 | if ((part.OwnerMask & PERM_COPY) == 0) | |
1000 | if (part.GroupID != UUID.Zero) | 1016 | return false; |
1017 | } | ||
1018 | else if (part.GroupID != UUID.Zero) | ||
1001 | { | 1019 | { |
1002 | if ((part.OwnerID == part.GroupID) && ((owner != part.LastOwnerID) || ((part.GroupMask & PERM_TRANS) == 0))) | 1020 | if ((part.OwnerID == part.GroupID) && ((owner != part.LastOwnerID) || ((part.GroupMask & PERM_TRANS) == 0))) |
1003 | return false; | 1021 | return false; |
@@ -1039,7 +1057,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1039 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1057 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1040 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1058 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1041 | 1059 | ||
1042 | return GenericParcelOwnerPermission(user, parcel, (ulong)p); | 1060 | return GenericParcelOwnerPermission(user, parcel, (ulong)p, false); |
1043 | } | 1061 | } |
1044 | 1062 | ||
1045 | /// <summary> | 1063 | /// <summary> |
@@ -1438,27 +1456,33 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1438 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1456 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1439 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1457 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1440 | 1458 | ||
1441 | bool permission = false; | 1459 | // m_log.DebugFormat("[PERMISSIONS MODULE]: Checking rez object at {0} in {1}", objectPosition, m_scene.Name); |
1442 | |||
1443 | ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); | ||
1444 | if (land == null) return false; | ||
1445 | 1460 | ||
1446 | if ((land.LandData.Flags & ((int)ParcelFlags.CreateObjects)) == | 1461 | ILandObject parcel = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); |
1447 | (int)ParcelFlags.CreateObjects) | 1462 | if (parcel == null) |
1448 | permission = true; | 1463 | return false; |
1449 | 1464 | ||
1450 | if (IsAdministrator(owner)) | 1465 | if ((parcel.LandData.Flags & (uint)ParcelFlags.CreateObjects) != 0) |
1451 | { | 1466 | { |
1452 | permission = true; | 1467 | return true; |
1453 | } | 1468 | } |
1454 | 1469 | else if ((owner == parcel.LandData.OwnerID) || IsAdministrator(owner)) | |
1455 | // Powers are zero, because GroupPowers.AllowRez is not a precondition for rezzing objects | ||
1456 | if (GenericParcelPermission(owner, objectPosition, 0)) | ||
1457 | { | 1470 | { |
1458 | permission = true; | 1471 | return true; |
1472 | } | ||
1473 | else if (((parcel.LandData.Flags & (uint)ParcelFlags.CreateGroupObjects) != 0) | ||
1474 | && (parcel.LandData.GroupID != UUID.Zero) && IsGroupMember(parcel.LandData.GroupID, owner, 0)) | ||
1475 | { | ||
1476 | return true; | ||
1477 | } | ||
1478 | else if (parcel.LandData.GroupID != UUID.Zero && IsGroupMember(parcel.LandData.GroupID, owner, (ulong)GroupPowers.AllowRez)) | ||
1479 | { | ||
1480 | return true; | ||
1481 | } | ||
1482 | else | ||
1483 | { | ||
1484 | return false; | ||
1459 | } | 1485 | } |
1460 | |||
1461 | return permission; | ||
1462 | } | 1486 | } |
1463 | 1487 | ||
1464 | private bool CanRunConsoleCommand(UUID user, Scene requestFromScene) | 1488 | private bool CanRunConsoleCommand(UUID user, Scene requestFromScene) |
@@ -1483,7 +1507,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1483 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1507 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1484 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1508 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1485 | 1509 | ||
1486 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandSetSale); | 1510 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandSetSale, false); |
1487 | } | 1511 | } |
1488 | 1512 | ||
1489 | private bool CanTakeObject(UUID objectID, UUID stealer, Scene scene) | 1513 | private bool CanTakeObject(UUID objectID, UUID stealer, Scene scene) |
@@ -1500,6 +1524,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1500 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1524 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1501 | 1525 | ||
1502 | bool permission = GenericObjectPermission(userID, objectID, false); | 1526 | bool permission = GenericObjectPermission(userID, objectID, false); |
1527 | |||
1528 | SceneObjectGroup so = (SceneObjectGroup)m_scene.Entities[objectID]; | ||
1529 | |||
1503 | if (!permission) | 1530 | if (!permission) |
1504 | { | 1531 | { |
1505 | if (!m_scene.Entities.ContainsKey(objectID)) | 1532 | if (!m_scene.Entities.ContainsKey(objectID)) |
@@ -1513,31 +1540,23 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1513 | return false; | 1540 | return false; |
1514 | } | 1541 | } |
1515 | 1542 | ||
1516 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; | ||
1517 | // UUID taskOwner = null; | 1543 | // UUID taskOwner = null; |
1518 | // Added this because at this point in time it wouldn't be wise for | 1544 | // Added this because at this point in time it wouldn't be wise for |
1519 | // the administrator object permissions to take effect. | 1545 | // the administrator object permissions to take effect. |
1520 | // UUID objectOwner = task.OwnerID; | 1546 | // UUID objectOwner = task.OwnerID; |
1521 | 1547 | ||
1522 | if ((task.RootPart.EveryoneMask & PERM_COPY) != 0) | 1548 | if ((so.RootPart.EveryoneMask & PERM_COPY) != 0) |
1523 | permission = true; | 1549 | permission = true; |
1550 | } | ||
1524 | 1551 | ||
1525 | if (task.OwnerID != userID) | 1552 | if (so.OwnerID != userID) |
1526 | { | 1553 | { |
1527 | if ((task.GetEffectivePermissions() & (PERM_COPY | PERM_TRANS)) != (PERM_COPY | PERM_TRANS)) | 1554 | if ((so.GetEffectivePermissions() & (PERM_COPY | PERM_TRANS)) != (PERM_COPY | PERM_TRANS)) |
1528 | permission = false; | 1555 | permission = false; |
1529 | } | ||
1530 | else | ||
1531 | { | ||
1532 | if ((task.GetEffectivePermissions() & PERM_COPY) != PERM_COPY) | ||
1533 | permission = false; | ||
1534 | } | ||
1535 | } | 1556 | } |
1536 | else | 1557 | else |
1537 | { | 1558 | { |
1538 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; | 1559 | if ((so.GetEffectivePermissions() & PERM_COPY) != PERM_COPY) |
1539 | |||
1540 | if ((task.GetEffectivePermissions() & (PERM_COPY | PERM_TRANS)) != (PERM_COPY | PERM_TRANS)) | ||
1541 | permission = false; | 1560 | permission = false; |
1542 | } | 1561 | } |
1543 | 1562 | ||
@@ -1556,10 +1575,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1556 | float X = position.X; | 1575 | float X = position.X; |
1557 | float Y = position.Y; | 1576 | float Y = position.Y; |
1558 | 1577 | ||
1559 | if (X > ((int)Constants.RegionSize - 1)) | 1578 | if (X > ((int)m_scene.RegionInfo.RegionSizeX - 1)) |
1560 | X = ((int)Constants.RegionSize - 1); | 1579 | X = ((int)m_scene.RegionInfo.RegionSizeX - 1); |
1561 | if (Y > ((int)Constants.RegionSize - 1)) | 1580 | if (Y > ((int)m_scene.RegionInfo.RegionSizeY - 1)) |
1562 | Y = ((int)Constants.RegionSize - 1); | 1581 | Y = ((int)m_scene.RegionInfo.RegionSizeY - 1); |
1563 | if (X < 0) | 1582 | if (X < 0) |
1564 | X = 0; | 1583 | X = 0; |
1565 | if (Y < 0) | 1584 | if (Y < 0) |