diff options
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/ComplexObject.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs index b1da33a..5821b9f 100644 --- a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | |||
@@ -5,6 +5,7 @@ using OpenSim.Region.Environment.Scenes; | |||
5 | using Axiom.Math; | 5 | using Axiom.Math; |
6 | using libsecondlife; | 6 | using libsecondlife; |
7 | using OpenSim.Framework.Types; | 7 | using OpenSim.Framework.Types; |
8 | using OpenSim.Framework.Interfaces; | ||
8 | 9 | ||
9 | namespace SimpleApp | 10 | namespace SimpleApp |
10 | { | 11 | { |
@@ -35,6 +36,8 @@ namespace SimpleApp | |||
35 | base.UpdateMovement(); | 36 | base.UpdateMovement(); |
36 | } | 37 | } |
37 | 38 | ||
39 | |||
40 | |||
38 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) | 41 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) |
39 | : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) | 42 | : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) |
40 | { | 43 | { |
@@ -51,5 +54,25 @@ namespace SimpleApp | |||
51 | 54 | ||
52 | UpdateParentIDs(); | 55 | UpdateParentIDs(); |
53 | } | 56 | } |
57 | |||
58 | public override void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient) | ||
59 | { | ||
60 | m_parts.Remove(part.UUID); | ||
61 | remoteClient.SendKillObject(m_regionHandle, part.LocalID); | ||
62 | remoteClient.AddMoney(1); | ||
63 | remoteClient.SendChatMessage("Poof!", 1, Pos, "Party Party", LLUUID.Zero); | ||
64 | } | ||
65 | |||
66 | public override void OnGrabGroup( LLVector3 offsetPos, IClientAPI remoteClient) | ||
67 | { | ||
68 | if( m_parts.Count == 1 ) | ||
69 | { | ||
70 | m_parts.Remove(m_rootPart.UUID); | ||
71 | m_scene.RemoveEntity(this); | ||
72 | remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalID); | ||
73 | remoteClient.AddMoney(50); | ||
74 | remoteClient.SendChatMessage("KABLAM!!!", 1, Pos, "Groupie Groupie", LLUUID.Zero); | ||
75 | } | ||
76 | } | ||
54 | } | 77 | } |
55 | } | 78 | } |