added ObjectPhysicsProperties http event message to send viewer that data. For now on caps/EventQueue, and still only used on a material change...

This commit is contained in:
UbitUmarov
2012-03-15 02:24:13 +00:00
parent cf9ebd301c
commit 84ca09f7c5
10 changed files with 76 additions and 1 deletions

View File

@@ -395,5 +395,25 @@ namespace OpenSim.Region.ClientStack.Linden
return message;
}
public static OSD partPhysicsProperties(uint localID, byte physhapetype,
float density, float friction, float bounce, float gravmod)
{
OSDMap physinfo = new OSDMap(6);
physinfo["LocalID"] = localID;
physinfo["Density"] = density;
physinfo["Friction"] = friction;
physinfo["GravityMultiplier"] = gravmod;
physinfo["Restitution"] = bounce;
physinfo["PhysicsShapeType"] = (int)physhapetype;
OSDArray array = new OSDArray(1);
array.Add(physinfo);
OSDMap llsdBody = new OSDMap(1);
llsdBody.Add("ObjectData", array);
return BuildEvent("ObjectPhysicsProperties", llsdBody);
}
}
}