have a stab at sending the correct number of media entries to shapes

actually, this is probably wrong anyway if there's a default texture
it's going to be easier just to gather the object media updates and retain those in-memory now
but what the hell
prebuild-update
Justin Clark-Casey (justincc) 2010-07-01 00:47:12 +01:00
parent 94646599f0
commit 9250268753
1 changed files with 14 additions and 2 deletions

View File

@ -128,8 +128,20 @@ namespace OpenSim.Region.CoreModules.Media.Moap
protected string HandleObjectMediaRequestGet(
string path, Hashtable osdParams, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
// Yeah, only for cubes right now. I know it's dumb.
int faces = 6;
UUID primId = (UUID)osdParams["object_id"];
SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
if (null == part)
{
m_log.WarnFormat(
"[MOAP]: Received a GET ObjectMediaRequest for prim {0} but this doesn't exist in the scene",
primId);
return string.Empty;
}
int faces = part.GetNumberOfSides();
m_log.DebugFormat("[MOAP]: Faces [{0}] for [{1}]", faces, primId);
MediaEntry[] media = new MediaEntry[faces];
for (int i = 0; i < faces; i++)