added ObjectPhysicsProperties http event message to send viewer that data. For now on caps/EventQueue, and still only used on a material change...
parent
cf9ebd301c
commit
84ca09f7c5
|
@ -1320,6 +1320,8 @@ namespace OpenSim.Framework
|
|||
|
||||
void SendObjectPropertiesReply(ISceneEntity Entity);
|
||||
|
||||
void SendPartPhysicsProprieties(ISceneEntity Entity);
|
||||
|
||||
void SendAgentOffline(UUID[] agentIDs);
|
||||
|
||||
void SendAgentOnline(UUID[] agentIDs);
|
||||
|
|
|
@ -805,5 +805,13 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
{
|
||||
return EventQueueHelper.BuildEvent(eventName, eventBody);
|
||||
}
|
||||
|
||||
public void partPhysicsProperties(uint localID, byte physhapetype,
|
||||
float density, float friction, float bounce, float gravmod,UUID avatarID)
|
||||
{
|
||||
OSD item = EventQueueHelper.partPhysicsProperties(localID, physhapetype,
|
||||
density, friction, bounce, gravmod);
|
||||
Enqueue(item, avatarID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2609,6 +2609,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
}
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
SceneObjectPart part = (SceneObjectPart)entity;
|
||||
if (part != null && AgentId != UUID.Zero)
|
||||
{
|
||||
try
|
||||
{
|
||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||
if (eq != null)
|
||||
{
|
||||
uint localid = part.LocalId;
|
||||
byte physshapetype = part.PhysicsShapeType;
|
||||
float density = part.Density;
|
||||
float friction = part.Friction;
|
||||
float bounce = part.Bounciness;
|
||||
float gravmod = part.GravityModifier;
|
||||
|
||||
eq.partPhysicsProperties(localid, physshapetype, density, friction, bounce, gravmod,AgentId);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
m_log.Error("Unable to send part Physics Proprieties - exception: " + ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void SendGroupNameReply(UUID groupLLUID, string GroupName)
|
||||
{
|
||||
|
|
|
@ -59,5 +59,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID);
|
||||
OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono);
|
||||
OSD BuildEvent(string eventName, OSD eventBody);
|
||||
void partPhysicsProperties(uint localID, byte physhapetype, float density, float friction, float bounce, float gravmod, UUID avatarID);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1695,6 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
part.Material = Convert.ToByte(material);
|
||||
group.HasGroupChanged = true;
|
||||
remoteClient.SendPartPhysicsProprieties(part);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4730,7 +4730,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
ParentGroup.HasGroupChanged = true;
|
||||
ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
|
||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -1703,5 +1703,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1195,5 +1195,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1258,5 +1258,9 @@ namespace OpenSim.Tests.Common.Mock
|
|||
public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue