aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMelanie2012-08-01 22:36:24 +0100
committerMelanie2012-08-01 22:37:38 +0100
commitcf16ca9bdaad75d42213089e18c0ee8f8422bbd6 (patch)
tree95535b154bbb2eda07d217d2c3ac82f8a08cecb8 /OpenSim/Region/Framework/Scenes/Scene.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-cf16ca9bdaad75d42213089e18c0ee8f8422bbd6.zip
opensim-SC_OLD-cf16ca9bdaad75d42213089e18c0ee8f8422bbd6.tar.gz
opensim-SC_OLD-cf16ca9bdaad75d42213089e18c0ee8f8422bbd6.tar.bz2
opensim-SC_OLD-cf16ca9bdaad75d42213089e18c0ee8f8422bbd6.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index eb4ba41..c77457c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5421,5 +5421,21 @@ namespace OpenSim.Region.Framework.Scenes
5421 m_SpawnPoint = 1; 5421 m_SpawnPoint = 1;
5422 return m_SpawnPoint - 1; 5422 return m_SpawnPoint - 1;
5423 } 5423 }
5424
5425 // Wrappers to get physics modules retrieve assets. Has to be done this way
5426 // because we can't assign the asset service to physics directly - at the
5427 // time physics are instantiated it's not registered but it will be by
5428 // the time the first prim exists.
5429 public void PhysicsRequestAsset(UUID assetID, AssetReceivedDelegate callback)
5430 {
5431 AssetService.Get(assetID.ToString(), callback, PhysicsAssetReceived);
5432 }
5433
5434 private void PhysicsAssetReceived(string id, Object sender, AssetBase asset)
5435 {
5436 AssetReceivedDelegate callback = (AssetReceivedDelegate)sender;
5437
5438 callback(asset);
5439 }
5424 } 5440 }
5425} 5441}