From cf16ca9bdaad75d42213089e18c0ee8f8422bbd6 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 1 Aug 2012 22:36:24 +0100 Subject: Create the ability for physics modules to request assets on demand by themselves. For that, the physics module simply calls RequestAssetMethod, which in turn points to Scene.PhysicsRequestAsset. This gives physics access to the asset system without introducing unwanted knowledge of the scene class. --- OpenSim/Region/Physics/Manager/PhysicsScene.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/Manager') diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index b32cd30..6a0558a 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -43,6 +43,9 @@ namespace OpenSim.Region.Physics.Manager public delegate void JointDeactivated(PhysicsJoint joint); public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" + public delegate void RequestAssetDelegate(UUID assetID, AssetReceivedDelegate callback); + public delegate void AssetReceivedDelegate(AssetBase asset); + /// /// Contact result from a raycast. /// @@ -73,6 +76,8 @@ namespace OpenSim.Region.Physics.Manager get { return new NullPhysicsScene(); } } + public RequestAssetDelegate RequestAssetMethod { private get; set; } + public virtual void TriggerPhysicsBasedRestart() { physicsCrash handler = OnPhysicsCrash; -- cgit v1.1