aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs46
1 files changed, 12 insertions, 34 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 95d6f1f..e70fbe2 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -998,7 +998,7 @@ namespace OpenSim.Region.Environment.Scenes
998 // Cannot create a map for a nonexistant heightmap yet. 998 // Cannot create a map for a nonexistant heightmap yet.
999 if (Heightmap == null) 999 if (Heightmap == null)
1000 return; 1000 return;
1001 1001
1002 if (terrain == null) 1002 if (terrain == null)
1003 { 1003 {
1004 int tc = System.Environment.TickCount; 1004 int tc = System.Environment.TickCount;
@@ -1122,12 +1122,9 @@ namespace OpenSim.Region.Environment.Scenes
1122 mapbmp.SetPixel(x, (256 - y) - 1, black); 1122 mapbmp.SetPixel(x, (256 - y) - 1, black);
1123 } 1123 }
1124 } 1124 }
1125
1126 } 1125 }
1127 //} 1126 //}
1128 1127
1129
1130
1131 //tc = System.Environment.TickCount - tc; 1128 //tc = System.Environment.TickCount - tc;
1132 //m_log.Info("[MAPTILE]: Completed One row in " + tc + " ms"); 1129 //m_log.Info("[MAPTILE]: Completed One row in " + tc + " ms");
1133 } 1130 }
@@ -1135,7 +1132,6 @@ namespace OpenSim.Region.Environment.Scenes
1135 1132
1136 bool drawPrimVolume = true; 1133 bool drawPrimVolume = true;
1137 1134
1138
1139 try 1135 try
1140 { 1136 {
1141 IConfig startupConfig = m_config.Configs["Startup"]; 1137 IConfig startupConfig = m_config.Configs["Startup"];
@@ -1145,7 +1141,6 @@ namespace OpenSim.Region.Environment.Scenes
1145 { 1141 {
1146 m_log.Warn("Failed to load StarupConfg"); 1142 m_log.Warn("Failed to load StarupConfg");
1147 } 1143 }
1148
1149 1144
1150 if (drawPrimVolume) 1145 if (drawPrimVolume)
1151 { 1146 {
@@ -1168,8 +1163,8 @@ namespace OpenSim.Region.Environment.Scenes
1168 // Draw if the object is at least 1 meter wide in any direction 1163 // Draw if the object is at least 1 meter wide in any direction
1169 if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f) 1164 if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f)
1170 { 1165 {
1171 // Try to get the RGBA of the default texture entry.. 1166 // Try to get the RGBA of the default texture entry..
1172 // 1167 //
1173 try 1168 try
1174 { 1169 {
1175 LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; 1170 LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA;
@@ -1177,9 +1172,7 @@ namespace OpenSim.Region.Environment.Scenes
1177 int colorg = 255 - (int)(texcolor.G * 255f); 1172 int colorg = 255 - (int)(texcolor.G * 255f);
1178 int colorb = 255 - (int)(texcolor.B * 255f); 1173 int colorb = 255 - (int)(texcolor.B * 255f);
1179 1174
1180 if (colorr == 255 && colorg == 255 && colorb == 255) 1175 if (!(colorr == 255 && colorg == 255 && colorb == 255))
1181 { }
1182 else
1183 { 1176 {
1184 //Try to set the map spot color 1177 //Try to set the map spot color
1185 try 1178 try
@@ -1248,10 +1241,9 @@ namespace OpenSim.Region.Environment.Scenes
1248 || mapdrawendY > 255) 1241 || mapdrawendY > 255)
1249 continue; 1242 continue;
1250 1243
1251
1252 int wy = 0; 1244 int wy = 0;
1253 1245
1254 bool breakYN = false; // If we run into an error drawing, break out of the 1246 bool breakYN = false; // If we run into an error drawing, break out of the
1255 // loop so we don't lag to death on error handling 1247 // loop so we don't lag to death on error handling
1256 for (int wx = mapdrawstartX; wx < mapdrawendX; wx++) 1248 for (int wx = mapdrawstartX; wx < mapdrawendX; wx++)
1257 { 1249 {
@@ -1274,7 +1266,7 @@ namespace OpenSim.Region.Environment.Scenes
1274 1266
1275 if (breakYN) 1267 if (breakYN)
1276 break; 1268 break;
1277 } 1269 }
1278 } // Object is within 256m Z of terrain 1270 } // Object is within 256m Z of terrain
1279 } // object is at least a meter wide 1271 } // object is at least a meter wide
1280 } // loop over group children 1272 } // loop over group children
@@ -1304,7 +1296,6 @@ namespace OpenSim.Region.Environment.Scenes
1304 asset.Type = 0; 1296 asset.Type = 0;
1305 asset.Temporary = temporary; 1297 asset.Temporary = temporary;
1306 AssetCache.AddAsset(asset); 1298 AssetCache.AddAsset(asset);
1307
1308 } 1299 }
1309 else 1300 else
1310 { 1301 {
@@ -1322,7 +1313,6 @@ namespace OpenSim.Region.Environment.Scenes
1322 AssetCache.AddAsset(asset); 1313 AssetCache.AddAsset(asset);
1323 } 1314 }
1324 } 1315 }
1325
1326 } 1316 }
1327 1317
1328 #endregion 1318 #endregion
@@ -1442,10 +1432,8 @@ namespace OpenSim.Region.Environment.Scenes
1442 1432
1443 // Un-offset the prim (it gets offset later by the consumer method) 1433 // Un-offset the prim (it gets offset later by the consumer method)
1444 pos.Z -= 0.25F; 1434 pos.Z -= 0.25F;
1445
1446 } 1435 }
1447 1436
1448
1449 return pos; 1437 return pos;
1450 } 1438 }
1451 else 1439 else
@@ -1523,7 +1511,7 @@ namespace OpenSim.Region.Environment.Scenes
1523 // case... other tree types 1511 // case... other tree types
1524 // tree.Scale = new LLVector3(?, ?, ?); 1512 // tree.Scale = new LLVector3(?, ?, ?);
1525 // break; 1513 // break;
1526 1514
1527 default: 1515 default:
1528 tree.Scale = new LLVector3(4, 4, 4); 1516 tree.Scale = new LLVector3(4, 4, 4);
1529 break; 1517 break;
@@ -1557,7 +1545,7 @@ namespace OpenSim.Region.Environment.Scenes
1557 /// </summary> 1545 /// </summary>
1558 /// <param name="sceneObject"></param> 1546 /// <param name="sceneObject"></param>
1559 /// <param name="attachToBackup"> 1547 /// <param name="attachToBackup">
1560 /// If true, the object is made persistent into the scene. 1548 /// If true, the object is made persistent into the scene.
1561 /// If false, the object will not persist over server restarts 1549 /// If false, the object will not persist over server restarts
1562 /// </param> 1550 /// </param>
1563 public void AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) 1551 public void AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
@@ -1889,11 +1877,9 @@ namespace OpenSim.Region.Environment.Scenes
1889 client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; 1877 client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay;
1890 client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; 1878 client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags;
1891 client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; 1879 client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily;
1892
1893 client.OnRequestGodlikePowers += handleRequestGodlikePowers; 1880 client.OnRequestGodlikePowers += handleRequestGodlikePowers;
1894 client.OnGodKickUser += HandleGodlikeKickUser; 1881 client.OnGodKickUser += HandleGodlikeKickUser;
1895 client.OnObjectPermissions += HandleObjectPermissionsUpdate; 1882 client.OnObjectPermissions += HandleObjectPermissionsUpdate;
1896
1897 client.OnCreateNewInventoryItem += CreateNewInventoryItem; 1883 client.OnCreateNewInventoryItem += CreateNewInventoryItem;
1898 client.OnCreateNewInventoryFolder += CommsManager.UserProfileCacheService.HandleCreateInventoryFolder; 1884 client.OnCreateNewInventoryFolder += CommsManager.UserProfileCacheService.HandleCreateInventoryFolder;
1899 client.OnUpdateInventoryFolder += CommsManager.UserProfileCacheService.HandleUpdateInventoryFolder; 1885 client.OnUpdateInventoryFolder += CommsManager.UserProfileCacheService.HandleUpdateInventoryFolder;
@@ -1907,29 +1893,23 @@ namespace OpenSim.Region.Environment.Scenes
1907 client.OnRemoveInventoryItem += RemoveInventoryItem; 1893 client.OnRemoveInventoryItem += RemoveInventoryItem;
1908 client.OnRemoveInventoryFolder += RemoveInventoryFolder; 1894 client.OnRemoveInventoryFolder += RemoveInventoryFolder;
1909 client.OnRezScript += RezScript; 1895 client.OnRezScript += RezScript;
1910
1911 client.OnRequestTaskInventory += RequestTaskInventory; 1896 client.OnRequestTaskInventory += RequestTaskInventory;
1912 client.OnRemoveTaskItem += RemoveTaskInventory; 1897 client.OnRemoveTaskItem += RemoveTaskInventory;
1913 client.OnUpdateTaskInventory += UpdateTaskInventory; 1898 client.OnUpdateTaskInventory += UpdateTaskInventory;
1914 client.OnMoveTaskItem += MoveTaskInventoryItem; 1899 client.OnMoveTaskItem += MoveTaskInventoryItem;
1915
1916 client.OnGrabObject += ProcessObjectGrab; 1900 client.OnGrabObject += ProcessObjectGrab;
1917 client.OnDeGrabObject += ProcessObjectDeGrab; 1901 client.OnDeGrabObject += ProcessObjectDeGrab;
1918 client.OnMoneyTransferRequest += ProcessMoneyTransferRequest; 1902 client.OnMoneyTransferRequest += ProcessMoneyTransferRequest;
1919 client.OnParcelBuy += ProcessParcelBuy; 1903 client.OnParcelBuy += ProcessParcelBuy;
1920 client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; 1904 client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
1921 client.OnPacketStats += AddPacketStats; 1905 client.OnPacketStats += AddPacketStats;
1922
1923 client.OnObjectIncludeInSearch += m_innerScene.MakeObjectSearchable; 1906 client.OnObjectIncludeInSearch += m_innerScene.MakeObjectSearchable;
1924
1925 client.OnTeleportHomeRequest += TeleportClientHome; 1907 client.OnTeleportHomeRequest += TeleportClientHome;
1926
1927 client.OnSetStartLocationRequest += SetHomeRezPoint; 1908 client.OnSetStartLocationRequest += SetHomeRezPoint;
1928 client.OnUndo += m_innerScene.HandleUndo; 1909 client.OnUndo += m_innerScene.HandleUndo;
1929 client.OnObjectGroupRequest += m_innerScene.HandleObjectGroupUpdate; 1910 client.OnObjectGroupRequest += m_innerScene.HandleObjectGroupUpdate;
1930 client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel; 1911 client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
1931 client.OnScriptReset += ProcessScriptReset; 1912 client.OnScriptReset += ProcessScriptReset;
1932
1933 1913
1934 // EventManager.TriggerOnNewClient(client); 1914 // EventManager.TriggerOnNewClient(client);
1935 } 1915 }
@@ -1947,8 +1927,8 @@ namespace OpenSim.Region.Environment.Scenes
1947 } 1927 }
1948 1928
1949 public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, 1929 public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID,
1950 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, 1930 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart,
1951 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) 1931 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates)
1952 { 1932 {
1953 LLVector3 pos; 1933 LLVector3 pos;
1954 const bool frontFacesOnly = true; 1934 const bool frontFacesOnly = true;
@@ -1958,7 +1938,6 @@ namespace OpenSim.Region.Environment.Scenes
1958 1938
1959 if (target != null && target2 != null) 1939 if (target != null && target2 != null)
1960 { 1940 {
1961
1962 LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); 1941 LLVector3 direction = LLVector3.Norm(RayEnd - RayStart);
1963 Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); 1942 Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z);
1964 Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); 1943 Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z);
@@ -1991,10 +1970,9 @@ namespace OpenSim.Region.Environment.Scenes
1991 ScaleOffset = Math.Abs(ScaleOffset); 1970 ScaleOffset = Math.Abs(ScaleOffset);
1992 LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); 1971 LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z);
1993 LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); 1972 LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z);
1994 LLVector3 offset = (normal * (ScaleOffset / 2f)); 1973 LLVector3 offset = normal * (ScaleOffset / 2f);
1995 pos = (intersectionpoint + offset); 1974 pos = intersectionpoint + offset;
1996 1975
1997
1998 // stick in offset format from the original prim 1976 // stick in offset format from the original prim
1999 pos = pos - target.ParentGroup.AbsolutePosition; 1977 pos = pos - target.ParentGroup.AbsolutePosition;
2000 if (CopyRotates) 1978 if (CopyRotates)