aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-11-17 12:03:20 +0000
committerMW2007-11-17 12:03:20 +0000
commita4a1ff3d9b187dd4fad063510ae47bacac6904cd (patch)
treea7d51dcedbc14c835e0595c4e2e8d9fe900783ff
parentOut of a fog of alcohol and adenovirus, I present - POS! (diff)
downloadopensim-SC_OLD-a4a1ff3d9b187dd4fad063510ae47bacac6904cd.zip
opensim-SC_OLD-a4a1ff3d9b187dd4fad063510ae47bacac6904cd.tar.gz
opensim-SC_OLD-a4a1ff3d9b187dd4fad063510ae47bacac6904cd.tar.bz2
opensim-SC_OLD-a4a1ff3d9b187dd4fad063510ae47bacac6904cd.tar.xz
Added ClickAction property to SceneObjectPart (and the relevant changes in IClientAPI so its used), so that the default click action (ie touch, sit, etc) can be set on a prim. Note: Sill need to handle the incoming packets that set this, from the client.
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs14
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs2
4 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 06a8bab..e482cca 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -415,7 +415,7 @@ namespace OpenSim.Framework
415 415
416 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 416 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
417 LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, 417 LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
418 uint parentID, byte[] particleSystem, LLQuaternion rotation); 418 uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
419 419
420 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 420 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
421 LLQuaternion rotation); 421 LLQuaternion rotation);
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index f0ebf03..6f15c44 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -1031,7 +1031,7 @@ namespace OpenSim.Region.ClientStack
1031 public void SendPrimitiveToClient( 1031 public void SendPrimitiveToClient(
1032 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, 1032 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos,
1033 uint flags, 1033 uint flags,
1034 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, LLQuaternion rotation) 1034 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction)
1035 { 1035 {
1036 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 1036 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
1037 outPacket.RegionData.RegionHandle = regionHandle; 1037 outPacket.RegionData.RegionHandle = regionHandle;
@@ -1050,7 +1050,7 @@ namespace OpenSim.Region.ClientStack
1050 outPacket.ObjectData[0].TextColor[3] = color[3]; 1050 outPacket.ObjectData[0].TextColor[3] = color[3];
1051 outPacket.ObjectData[0].ParentID = parentID; 1051 outPacket.ObjectData[0].ParentID = parentID;
1052 outPacket.ObjectData[0].PSBlock = particleSystem; 1052 outPacket.ObjectData[0].PSBlock = particleSystem;
1053 outPacket.ObjectData[0].ClickAction = 0; 1053 outPacket.ObjectData[0].ClickAction = clickAction;
1054 //outPacket.ObjectData[0].Flags = 0; 1054 //outPacket.ObjectData[0].Flags = 0;
1055 outPacket.ObjectData[0].Radius = 20; 1055 outPacket.ObjectData[0].Radius = 20;
1056 1056
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index b2e585d..0da90d5 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -352,6 +352,17 @@ namespace OpenSim.Region.Environment.Scenes
352 set { m_touchName = value; } 352 set { m_touchName = value; }
353 } 353 }
354 354
355 private byte m_clickAction = 0;
356 public byte ClickAction
357 {
358 get { return m_clickAction; }
359 set
360 {
361 m_clickAction = value;
362 this.ScheduleFullUpdate();
363 }
364 }
365
355 protected PrimitiveBaseShape m_shape; 366 protected PrimitiveBaseShape m_shape;
356 367
357 public PrimitiveBaseShape Shape 368 public PrimitiveBaseShape Shape
@@ -384,6 +395,7 @@ namespace OpenSim.Region.Environment.Scenes
384 set { m_updateFlag = value; } 395 set { m_updateFlag = value; }
385 } 396 }
386 397
398
387 #region Constructors 399 #region Constructors
388 400
389 /// <summary> 401 /// <summary>
@@ -1096,7 +1108,7 @@ namespace OpenSim.Region.Environment.Scenes
1096 byte[] color = new byte[] { m_color.R, m_color.G, m_color.B, m_color.A }; 1108 byte[] color = new byte[] { m_color.R, m_color.G, m_color.B, m_color.A };
1097 remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid, 1109 remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid,
1098 OwnerID, 1110 OwnerID,
1099 m_text, color, ParentID, m_particleSystem, lRot); 1111 m_text, color, ParentID, m_particleSystem, lRot, m_clickAction);
1100 } 1112 }
1101 1113
1102 /// Terse updates 1114 /// Terse updates
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index 07d43b8..d107aab 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -280,7 +280,7 @@ namespace SimpleApp
280 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, 280 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
281 PrimitiveBaseShape primShape, LLVector3 pos, uint flags, 281 PrimitiveBaseShape primShape, LLVector3 pos, uint flags,
282 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, 282 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID,
283 byte[] particleSystem, LLQuaternion rotation) 283 byte[] particleSystem, LLQuaternion rotation, byte clickAction)
284 { 284 {
285 } 285 }
286 286