aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs17
-rw-r--r--OpenSim/Data/MySQL/MySQLLegacyRegionData.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs12
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs10
-rw-r--r--OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs1
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs18
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs50
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs32
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITerrainModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs29
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs5
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs3
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs2
17 files changed, 167 insertions, 40 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 325816d..b22003c 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -413,8 +413,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController
413 413
414 ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>(); 414 ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>();
415 if (null == terrainModule) throw new Exception("terrain module not available"); 415 if (null == terrainModule) throw new Exception("terrain module not available");
416 terrainModule.LoadFromFile(file); 416 if (Uri.IsWellFormedUriString(file, UriKind.Absolute))
417 417 {
418 m_log.Info("[RADMIN]: Terrain path is URL");
419 Uri result;
420 if (Uri.TryCreate(file, UriKind.RelativeOrAbsolute, out result))
421 {
422 // the url is valid
423 string fileType = file.Substring(file.LastIndexOf('/') + 1);
424 terrainModule.LoadFromStream(fileType, result);
425 }
426 }
427 else
428 {
429 terrainModule.LoadFromFile(file);
430 }
418 responseData["success"] = false; 431 responseData["success"] = false;
419 432
420 response.Value = responseData; 433 response.Value = responseData;
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
index c49153f..aecfaa3 100644
--- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
@@ -479,7 +479,9 @@ namespace OpenSim.Data.MySQL
479 } 479 }
480 else 480 else
481 { 481 {
482 m_log.Warn("[REGION DB]: Database contains an orphan child prim " + prim.UUID + " pointing to missing parent " + prim.ParentUUID); 482 m_log.WarnFormat(
483 "[REGION DB]: Database contains an orphan child prim {0} {1} at {2} in region {3} pointing to missing parent {4}. This prim will not be loaded.",
484 prim.Name, prim.UUID, prim.AbsolutePosition, regionID, prim.ParentUUID);
483 } 485 }
484 } 486 }
485 } 487 }
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index bec5ed3..75cdeb4 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -724,12 +724,20 @@ namespace OpenSim.Framework.Servers.HttpServer
724 } 724 }
725 catch(Exception e) 725 catch(Exception e)
726 { 726 {
727 string errorMessage
728 = String.Format(
729 "Requested method [{0}] from {1} threw exception: {2} {3}",
730 methodName, request.RemoteIPEndPoint.Address, e.Message, e.StackTrace);
731
732 m_log.ErrorFormat("[BASE HTTP SERVER]: {0}", errorMessage);
733
727 // if the registered XmlRpc method threw an exception, we pass a fault-code along 734 // if the registered XmlRpc method threw an exception, we pass a fault-code along
728 xmlRpcResponse = new XmlRpcResponse(); 735 xmlRpcResponse = new XmlRpcResponse();
736
729 // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php 737 // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
730 xmlRpcResponse.SetFault(-32603, String.Format("Requested method [{0}] threw exception: {1}", 738 xmlRpcResponse.SetFault(-32603, errorMessage);
731 methodName, e.Message));
732 } 739 }
740
733 // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here 741 // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here
734 response.KeepAlive = m_rpcHandlersKeepAlive[methodName]; 742 response.KeepAlive = m_rpcHandlersKeepAlive[methodName];
735 } 743 }
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
index c53160f..bcfb0a4 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
@@ -188,7 +188,15 @@ namespace OpenSim.Framework.Servers.HttpServer
188 try 188 try
189 { 189 {
190 IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]); 190 IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]);
191 int port = Int32.Parse(req.Headers["remote_port"]); 191 // sometimes req.Headers["remote_port"] returns a comma separated list, so use
192 // the first one in the list and log it
193 string[] strPorts = req.Headers["remote_port"].Split(new char[] { ',' });
194 if (strPorts.Length > 1)
195 {
196 _log.ErrorFormat("[OSHttpRequest]: format exception on addr/port {0}:{1}, ignoring",
197 req.Headers["remote_addr"], req.Headers["remote_port"]);
198 }
199 int port = Int32.Parse(strPorts[0]);
192 _remoteIPEndPoint = new IPEndPoint(addr, port); 200 _remoteIPEndPoint = new IPEndPoint(addr, port);
193 } 201 }
194 catch (FormatException) 202 catch (FormatException)
diff --git a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs
index f24cef6..3384952 100644
--- a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs
+++ b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs
@@ -201,6 +201,7 @@ namespace OpenSim.Grid.UserServer.Modules
201 } 201 }
202 return response; 202 return response;
203 } 203 }
204
204 public XmlRpcResponse XmlRPCUserMovedtoRegion(XmlRpcRequest request, IPEndPoint remoteClient) 205 public XmlRpcResponse XmlRPCUserMovedtoRegion(XmlRpcRequest request, IPEndPoint remoteClient)
205 { 206 {
206 XmlRpcResponse response = new XmlRpcResponse(); 207 XmlRpcResponse response = new XmlRpcResponse();
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index b588a2e..e812945 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -5504,6 +5504,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5504 5504
5505 if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId) 5505 if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId)
5506 { 5506 {
5507 // Linden Client limitation..
5508 if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f
5509 || avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f)
5510 {
5511 ScenePresence avatar = null;
5512 if (((Scene)m_scene).TryGetAvatar(AgentId, out avatar))
5513 {
5514 if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f)
5515 {
5516 avSetStartLocationRequestPacket.StartLocationData.LocationPos.X = avatar.AbsolutePosition.X;
5517 }
5518 if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f)
5519 {
5520 avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y = avatar.AbsolutePosition.Y;
5521 }
5522 }
5523
5524 }
5507 TeleportLocationRequest handlerSetStartLocationRequest = OnSetStartLocationRequest; 5525 TeleportLocationRequest handlerSetStartLocationRequest = OnSetStartLocationRequest;
5508 if (handlerSetStartLocationRequest != null) 5526 if (handlerSetStartLocationRequest != null)
5509 { 5527 {
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index e3a395e..b1dcb14 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -471,20 +471,45 @@ namespace OpenSim.Region.CoreModules.World.Estate
471 if (terr != null) 471 if (terr != null)
472 { 472 {
473 m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + m_scene.RegionInfo.RegionName); 473 m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + m_scene.RegionInfo.RegionName);
474 if (File.Exists(Util.dataDir() + "/terrain.raw")) 474
475 {
476 File.Delete(Util.dataDir() + "/terrain.raw");
477 }
478 try 475 try
479 { 476 {
480 FileStream input = new FileStream(Util.dataDir() + "/terrain.raw", FileMode.CreateNew); 477
478 string localfilename = "terrain.raw";
479
480 if (terrainData.Length == 851968)
481 {
482 localfilename = Path.Combine(Util.dataDir(),"terrain.raw"); // It's a .LLRAW
483 }
484
485 if (terrainData.Length == 196662) // 24-bit 256x256 Bitmap
486 localfilename = Path.Combine(Util.dataDir(), "terrain.bmp");
487
488 if (terrainData.Length == 256 * 256 * 4) // It's a .R32
489 localfilename = Path.Combine(Util.dataDir(), "terrain.r32");
490
491 if (terrainData.Length == 256 * 256 * 8) // It's a .R64
492 localfilename = Path.Combine(Util.dataDir(), "terrain.r64");
493
494 if (File.Exists(localfilename))
495 {
496 File.Delete(localfilename);
497 }
498
499 FileStream input = new FileStream(localfilename, FileMode.CreateNew);
481 input.Write(terrainData, 0, terrainData.Length); 500 input.Write(terrainData, 0, terrainData.Length);
482 input.Close(); 501 input.Close();
502
503 FileInfo x = new FileInfo(localfilename);
504
505 terr.LoadFromFile(localfilename);
506 remoteClient.SendAlertMessage("Your terrain was loaded as a ." + x.Extension + " file. It may take a few moments to appear.");
507
483 } 508 }
484 catch (IOException e) 509 catch (IOException e)
485 { 510 {
486 m_log.ErrorFormat("[TERRAIN]: Error Saving a terrain file uploaded via the estate tools. It gave us the following error: {0}", e.ToString()); 511 m_log.ErrorFormat("[TERRAIN]: Error Saving a terrain file uploaded via the estate tools. It gave us the following error: {0}", e.ToString());
487 remoteClient.SendAlertMessage("There was an IO Exception loading your terrain. Please check free space"); 512 remoteClient.SendAlertMessage("There was an IO Exception loading your terrain. Please check free space.");
488 513
489 return; 514 return;
490 } 515 }
@@ -502,29 +527,16 @@ namespace OpenSim.Region.CoreModules.World.Estate
502 527
503 return; 528 return;
504 } 529 }
505
506
507
508
509 try
510 {
511 terr.LoadFromFile(Util.dataDir() + "/terrain.raw");
512 remoteClient.SendAlertMessage("Your terrain was loaded. Give it a minute or two to apply");
513 }
514 catch (Exception e) 530 catch (Exception e)
515 { 531 {
516 m_log.ErrorFormat("[TERRAIN]: Error loading a terrain file uploaded via the estate tools. It gave us the following error: {0}", e.ToString()); 532 m_log.ErrorFormat("[TERRAIN]: Error loading a terrain file uploaded via the estate tools. It gave us the following error: {0}", e.ToString());
517 remoteClient.SendAlertMessage("There was a general error loading your terrain. Please fix the terrain file and try again"); 533 remoteClient.SendAlertMessage("There was a general error loading your terrain. Please fix the terrain file and try again");
518 } 534 }
519
520 } 535 }
521 else 536 else
522 { 537 {
523 remoteClient.SendAlertMessage("Unable to apply terrain. Cannot get an instance of the terrain module"); 538 remoteClient.SendAlertMessage("Unable to apply terrain. Cannot get an instance of the terrain module");
524 } 539 }
525
526
527
528 } 540 }
529 541
530 private void handleUploadTerrain(IClientAPI remote_client, string clientFileName) 542 private void handleUploadTerrain(IClientAPI remote_client, string clientFileName)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index ba271fd..a40828b 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Net;
32using log4net; 33using log4net;
33using Nini.Config; 34using Nini.Config;
34using OpenMetaverse; 35using OpenMetaverse;
@@ -259,6 +260,16 @@ namespace OpenSim.Region.CoreModules.World.Terrain
259 } 260 }
260 261
261 /// <summary> 262 /// <summary>
263 /// Loads a terrain file from the specified URI
264 /// </summary>
265 /// <param name="filename">The name of the terrain to load</param>
266 /// <param name="pathToTerrainHeightmap">The URI to the terrain height map</param>
267 public void LoadFromStream(string filename, Uri pathToTerrainHeightmap)
268 {
269 LoadFromStream(filename, URIFetch(pathToTerrainHeightmap));
270 }
271
272 /// <summary>
262 /// Loads a terrain file from a stream and installs it in the scene. 273 /// Loads a terrain file from a stream and installs it in the scene.
263 /// </summary> 274 /// </summary>
264 /// <param name="filename">Filename to terrain file. Type is determined by extension.</param> 275 /// <param name="filename">Filename to terrain file. Type is determined by extension.</param>
@@ -267,7 +278,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
267 { 278 {
268 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) 279 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders)
269 { 280 {
270 if (@filename.EndsWith(loader.Key)) 281 if (filename.EndsWith(loader.Key))
271 { 282 {
272 lock (m_scene) 283 lock (m_scene)
273 { 284 {
@@ -295,6 +306,25 @@ namespace OpenSim.Region.CoreModules.World.Terrain
295 throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename)); 306 throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename));
296 } 307 }
297 308
309 private static Stream URIFetch(Uri uri)
310 {
311 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
312
313 // request.Credentials = credentials;
314
315 request.ContentLength = 0;
316 request.KeepAlive = false;
317
318 WebResponse response = request.GetResponse();
319 Stream file = response.GetResponseStream();
320
321 if (response.ContentLength == 0)
322 throw new Exception(String.Format("{0} returned an empty file", uri.ToString()));
323
324 // return new BufferedStream(file, (int) response.ContentLength);
325 return new BufferedStream(file, 1000000);
326 }
327
298 /// <summary> 328 /// <summary>
299 /// Modify Land 329 /// Modify Land
300 /// </summary> 330 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
index 2dcba0c..7caac55 100644
--- a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Framework.Interfaces
51 /// </param> 51 /// </param>
52 /// <param name="stream"></param> 52 /// <param name="stream"></param>
53 void LoadFromStream(string filename, Stream stream); 53 void LoadFromStream(string filename, Stream stream);
54 54 void LoadFromStream(string filename, System.Uri pathToTerrainHeightmap);
55 /// <summary> 55 /// <summary>
56 /// Save a terrain to a stream. 56 /// Save a terrain to a stream.
57 /// </summary> 57 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 269fbcc..7ca779a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2397,6 +2397,12 @@ namespace OpenSim.Region.Framework.Scenes
2397 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); 2397 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
2398 item = InventoryService.GetItem(item); 2398 item = InventoryService.GetItem(item);
2399 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); 2399 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
2400
2401 if (m_AvatarFactory != null)
2402 {
2403 m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2404 }
2405
2400 } 2406 }
2401 } 2407 }
2402 2408
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index f5a1e74..a8bab5a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3046,6 +3046,7 @@ namespace OpenSim.Region.Framework.Scenes
3046 // TODO: The next line can be removed, as soon as only homeRegionID based UserServers are around. 3046 // TODO: The next line can be removed, as soon as only homeRegionID based UserServers are around.
3047 // TODO: The HomeRegion property can be removed then, too 3047 // TODO: The HomeRegion property can be removed then, too
3048 UserProfile.HomeRegion = RegionInfo.RegionHandle; 3048 UserProfile.HomeRegion = RegionInfo.RegionHandle;
3049
3049 UserProfile.HomeLocation = position; 3050 UserProfile.HomeLocation = position;
3050 UserProfile.HomeLookAt = lookAt; 3051 UserProfile.HomeLookAt = lookAt;
3051 CommsManager.UserService.UpdateUserProfile(UserProfile); 3052 CommsManager.UserService.UpdateUserProfile(UserProfile);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 42481ff..ecda80c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2776,8 +2776,13 @@ namespace OpenSim.Region.Framework.Scenes
2776 { 2776 {
2777 if (part.Scale.X > 10.0 || part.Scale.Y > 10.0 || part.Scale.Z > 10.0) 2777 if (part.Scale.X > 10.0 || part.Scale.Y > 10.0 || part.Scale.Z > 10.0)
2778 { 2778 {
2779 UsePhysics = false; // Reset physics 2779 if (part.Scale.X > m_scene.RegionInfo.PhysPrimMax ||
2780 break; 2780 part.Scale.Y > m_scene.RegionInfo.PhysPrimMax ||
2781 part.Scale.Z > m_scene.RegionInfo.PhysPrimMax)
2782 {
2783 UsePhysics = false; // Reset physics
2784 break;
2785 }
2781 } 2786 }
2782 } 2787 }
2783 2788
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index eca8588..4780ff2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -269,8 +269,9 @@ namespace OpenSim.Region.Framework.Scenes
269 { 269 {
270 m_log.ErrorFormat( 270 m_log.ErrorFormat(
271 "[PRIM INVENTORY]: " + 271 "[PRIM INVENTORY]: " +
272 "Couldn't start script {0}, {1} since asset ID {2} could not be found", 272 "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
273 item.Name, item.ItemID, item.AssetID); 273 item.Name, item.ItemID, m_part.AbsolutePosition,
274 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
274 } 275 }
275 else 276 else
276 { 277 {
@@ -317,9 +318,19 @@ namespace OpenSim.Region.Framework.Scenes
317 m_items.LockItemsForRead(true); 318 m_items.LockItemsForRead(true);
318 if (m_items.ContainsKey(itemId)) 319 if (m_items.ContainsKey(itemId))
319 { 320 {
320 TaskInventoryItem item = m_items[itemId]; 321 if (m_items.ContainsKey(itemId))
322 {
323 CreateScriptInstance(m_items[itemId], startParam, postOnRez, engine, stateSource);
324 }
325 else
326 {
327 m_log.ErrorFormat(
328 "[PRIM INVENTORY]: " +
329 "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
330 itemId, m_part.Name, m_part.UUID,
331 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
332 }
321 m_items.LockItemsForRead(false); 333 m_items.LockItemsForRead(false);
322 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
323 } 334 }
324 else 335 else
325 { 336 {
@@ -347,8 +358,9 @@ namespace OpenSim.Region.Framework.Scenes
347 { 358 {
348 m_log.ErrorFormat( 359 m_log.ErrorFormat(
349 "[PRIM INVENTORY]: " + 360 "[PRIM INVENTORY]: " +
350 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", 361 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
351 itemId, m_part.Name, m_part.UUID); 362 itemId, m_part.Name, m_part.UUID,
363 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
352 } 364 }
353 } 365 }
354 366
@@ -542,8 +554,9 @@ namespace OpenSim.Region.Framework.Scenes
542 { 554 {
543 m_log.ErrorFormat( 555 m_log.ErrorFormat(
544 "[PRIM INVENTORY]: " + 556 "[PRIM INVENTORY]: " +
545 "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", 557 "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
546 item.ItemID, m_part.Name, m_part.UUID); 558 item.ItemID, m_part.Name, m_part.UUID,
559 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
547 } 560 }
548 m_items.LockItemsForWrite(false); 561 m_items.LockItemsForWrite(false);
549 562
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e55acfe..cd28434 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3060,7 +3060,9 @@ namespace OpenSim.Region.Framework.Scenes
3060 3060
3061 // The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents( 3061 // The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents(
3062 // as of this comment the interval is set in AddToPhysicalScene 3062 // as of this comment the interval is set in AddToPhysicalScene
3063 3063 if (Animator!=null)
3064 Animator.UpdateMovementAnimations();
3065
3064 CollisionEventUpdate collisionData = (CollisionEventUpdate)e; 3066 CollisionEventUpdate collisionData = (CollisionEventUpdate)e;
3065 Dictionary<uint, ContactPoint> coldata = collisionData.m_objCollisionList; 3067 Dictionary<uint, ContactPoint> coldata = collisionData.m_objCollisionList;
3066 3068
@@ -3072,7 +3074,7 @@ namespace OpenSim.Region.Framework.Scenes
3072 m_lastColCount = coldata.Count; 3074 m_lastColCount = coldata.Count;
3073 } 3075 }
3074 3076
3075 if (coldata.Count != 0) 3077 if (coldata.Count != 0 && Animator != null)
3076 { 3078 {
3077 switch (Animator.CurrentMovementAnimation) 3079 switch (Animator.CurrentMovementAnimation)
3078 { 3080 {
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 905d3ba..b99baa2 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -1243,7 +1243,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1243 { 1243 {
1244 if (m_eventsubscription > m_requestedUpdateFrequency) 1244 if (m_eventsubscription > m_requestedUpdateFrequency)
1245 { 1245 {
1246 base.SendCollisionUpdate(CollisionEventsThisFrame); 1246 if (CollisionEventsThisFrame != null)
1247 {
1248 base.SendCollisionUpdate(CollisionEventsThisFrame);
1249 }
1247 CollisionEventsThisFrame = new CollisionEventUpdate(); 1250 CollisionEventsThisFrame = new CollisionEventUpdate();
1248 m_eventsubscription = 0; 1251 m_eventsubscription = 0;
1249 } 1252 }
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 8459dab..c27c420 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -743,6 +743,8 @@ namespace OpenSim.Region.Physics.OdePlugin
743 break; 743 break;
744 } 744 }
745 } 745 }
746 if (returnMass > _parent_scene.maximumMassObject)
747 returnMass = _parent_scene.maximumMassObject;
746 return returnMass; 748 return returnMass;
747 }// end CalculateMass 749 }// end CalculateMass
748 750
@@ -753,6 +755,7 @@ namespace OpenSim.Region.Physics.OdePlugin
753 if (Body != (IntPtr) 0) 755 if (Body != (IntPtr) 0)
754 { 756 {
755 float newmass = CalculateMass(); 757 float newmass = CalculateMass();
758
756 //m_log.Info("[PHYSICS]: New Mass: " + newmass.ToString()); 759 //m_log.Info("[PHYSICS]: New Mass: " + newmass.ToString());
757 760
758 d.MassSetBoxTotal(out pMass, newmass, _size.X, _size.Y, _size.Z); 761 d.MassSetBoxTotal(out pMass, newmass, _size.X, _size.Y, _size.Z);
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index a0aba2a..0384d6e 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -207,6 +207,7 @@ namespace OpenSim.Region.Physics.OdePlugin
207 private float avMovementDivisorWalk = 1.3f; 207 private float avMovementDivisorWalk = 1.3f;
208 private float avMovementDivisorRun = 0.8f; 208 private float avMovementDivisorRun = 0.8f;
209 private float minimumGroundFlightOffset = 3f; 209 private float minimumGroundFlightOffset = 3f;
210 public float maximumMassObject = 10000.01f;
210 211
211 public bool meshSculptedPrim = true; 212 public bool meshSculptedPrim = true;
212 public bool forceSimplePrimMeshing = false; 213 public bool forceSimplePrimMeshing = false;
@@ -480,6 +481,7 @@ namespace OpenSim.Region.Physics.OdePlugin
480 481
481 m_NINJA_physics_joints_enabled = physicsconfig.GetBoolean("use_NINJA_physics_joints", false); 482 m_NINJA_physics_joints_enabled = physicsconfig.GetBoolean("use_NINJA_physics_joints", false);
482 minimumGroundFlightOffset = physicsconfig.GetFloat("minimum_ground_flight_offset", 3f); 483 minimumGroundFlightOffset = physicsconfig.GetFloat("minimum_ground_flight_offset", 3f);
484 maximumMassObject = physicsconfig.GetFloat("maximum_mass_object", 10000.01f);
483 } 485 }
484 } 486 }
485 487