diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index 3f49aba..7dcf137 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | |||
@@ -151,6 +151,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
151 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, | 151 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, |
152 | uint locationID, uint flags, string capsURL, UUID agentID) | 152 | uint locationID, uint flags, string capsURL, UUID agentID) |
153 | { | 153 | { |
154 | // not sure why flags get overwritten here | ||
155 | if ((flags & (uint)TeleportFlags.IsFlying) != 0) | ||
156 | flags = (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.IsFlying; | ||
157 | else | ||
158 | flags = (uint)TeleportFlags.ViaLocation; | ||
159 | |||
154 | OSDMap info = new OSDMap(); | 160 | OSDMap info = new OSDMap(); |
155 | info.Add("AgentID", OSD.FromUUID(agentID)); | 161 | info.Add("AgentID", OSD.FromUUID(agentID)); |
156 | info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this? | 162 | info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this? |
@@ -159,7 +165,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
159 | info.Add("SimAccess", OSD.FromInteger(simAccess)); | 165 | info.Add("SimAccess", OSD.FromInteger(simAccess)); |
160 | info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); | 166 | info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); |
161 | info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); | 167 | info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); |
162 | info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation | 168 | // info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation |
169 | info.Add("TeleportFlags", OSD.FromUInteger(flags)); | ||
163 | 170 | ||
164 | OSDArray infoArr = new OSDArray(); | 171 | OSDArray infoArr = new OSDArray(); |
165 | infoArr.Add(info); | 172 | infoArr.Add(info); |
@@ -395,5 +402,25 @@ namespace OpenSim.Region.ClientStack.Linden | |||
395 | return message; | 402 | return message; |
396 | } | 403 | } |
397 | 404 | ||
405 | public static OSD partPhysicsProperties(uint localID, byte physhapetype, | ||
406 | float density, float friction, float bounce, float gravmod) | ||
407 | { | ||
408 | |||
409 | OSDMap physinfo = new OSDMap(6); | ||
410 | physinfo["LocalID"] = localID; | ||
411 | physinfo["Density"] = density; | ||
412 | physinfo["Friction"] = friction; | ||
413 | physinfo["GravityMultiplier"] = gravmod; | ||
414 | physinfo["Restitution"] = bounce; | ||
415 | physinfo["PhysicsShapeType"] = (int)physhapetype; | ||
416 | |||
417 | OSDArray array = new OSDArray(1); | ||
418 | array.Add(physinfo); | ||
419 | |||
420 | OSDMap llsdBody = new OSDMap(1); | ||
421 | llsdBody.Add("ObjectData", array); | ||
422 | |||
423 | return BuildEvent("ObjectPhysicsProperties", llsdBody); | ||
424 | } | ||
398 | } | 425 | } |
399 | } | 426 | } |