Fix a rather stupid VS warning "The operation overflows at compile time in checked mode" - doesn't make much sense to me, but for some reason it doesn't like 256 - 6 when 256 is a constant...

avinationmerge
Tom 2011-09-14 19:31:55 -07:00
parent 5484c9b585
commit 1129b80629
1 changed files with 3 additions and 3 deletions

View File

@ -834,14 +834,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// m_log.DebugFormat(
// "[ATTACHMENTS MODULE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2}",
// grp.Name, grp.LocalId, remoteClient.Name);
uint regionSize = Constants.RegionSize; //Avoid VS error "The operation overflows at compile time in checked mode"
Vector3 inventoryStoredPosition = new Vector3
(((grp.AbsolutePosition.X > (int)Constants.RegionSize)
? Constants.RegionSize - 6
? regionSize - 6
: grp.AbsolutePosition.X)
,
(grp.AbsolutePosition.Y > (int)Constants.RegionSize)
? Constants.RegionSize - 6
? regionSize - 6
: grp.AbsolutePosition.Y,
grp.AbsolutePosition.Z);