diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f7d74db..3a28d42 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5816,5 +5816,21 @@ Environment.Exit(1); | |||
5816 | { | 5816 | { |
5817 | GC.Collect(); | 5817 | GC.Collect(); |
5818 | } | 5818 | } |
5819 | |||
5820 | // Wrappers to get physics modules retrieve assets. Has to be done this way | ||
5821 | // because we can't assign the asset service to physics directly - at the | ||
5822 | // time physics are instantiated it's not registered but it will be by | ||
5823 | // the time the first prim exists. | ||
5824 | public void PhysicsRequestAsset(UUID assetID, AssetReceivedDelegate callback) | ||
5825 | { | ||
5826 | AssetService.Get(assetID.ToString(), callback, PhysicsAssetReceived); | ||
5827 | } | ||
5828 | |||
5829 | private void PhysicsAssetReceived(string id, Object sender, AssetBase asset) | ||
5830 | { | ||
5831 | AssetReceivedDelegate callback = (AssetReceivedDelegate)sender; | ||
5832 | |||
5833 | callback(asset); | ||
5834 | } | ||
5819 | } | 5835 | } |
5820 | } | 5836 | } |