aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index b6fa53f..30507a4 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -128,8 +128,20 @@ namespace OpenSim.Region.CoreModules.Media.Moap
128 protected string HandleObjectMediaRequestGet( 128 protected string HandleObjectMediaRequestGet(
129 string path, Hashtable osdParams, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 129 string path, Hashtable osdParams, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
130 { 130 {
131 // Yeah, only for cubes right now. I know it's dumb. 131 UUID primId = (UUID)osdParams["object_id"];
132 int faces = 6; 132
133 SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
134
135 if (null == part)
136 {
137 m_log.WarnFormat(
138 "[MOAP]: Received a GET ObjectMediaRequest for prim {0} but this doesn't exist in the scene",
139 primId);
140 return string.Empty;
141 }
142
143 int faces = part.GetNumberOfSides();
144 m_log.DebugFormat("[MOAP]: Faces [{0}] for [{1}]", faces, primId);
133 145
134 MediaEntry[] media = new MediaEntry[faces]; 146 MediaEntry[] media = new MediaEntry[faces];
135 for (int i = 0; i < faces; i++) 147 for (int i = 0; i < faces; i++)