diff options
Diffstat (limited to 'OpenSim/Region/Examples')
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/RegionModule.cs | 2 |
2 files changed, 17 insertions, 6 deletions
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index c975df5..bc675ff 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -42,6 +42,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
42 | private LLQuaternion bodyDirection = LLQuaternion.Identity; | 42 | private LLQuaternion bodyDirection = LLQuaternion.Identity; |
43 | private short count = 0; | 43 | private short count = 0; |
44 | private short frame = 0; | 44 | private short frame = 0; |
45 | private Scene m_scene; | ||
45 | 46 | ||
46 | // disable warning: public events, part of the public API | 47 | // disable warning: public events, part of the public API |
47 | #pragma warning disable 67 | 48 | #pragma warning disable 67 |
@@ -165,7 +166,6 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
165 | public event FriendActionDelegate OnApproveFriendRequest; | 166 | public event FriendActionDelegate OnApproveFriendRequest; |
166 | public event FriendActionDelegate OnDenyFriendRequest; | 167 | public event FriendActionDelegate OnDenyFriendRequest; |
167 | public event FriendshipTermination OnTerminateFriendship; | 168 | public event FriendshipTermination OnTerminateFriendship; |
168 | public event PacketStats OnPacketStats; | ||
169 | 169 | ||
170 | public event EconomyDataRequest OnEconomyDataRequest; | 170 | public event EconomyDataRequest OnEconomyDataRequest; |
171 | public event MoneyBalanceRequest OnMoneyBalanceRequest; | 171 | public event MoneyBalanceRequest OnMoneyBalanceRequest; |
@@ -208,10 +208,12 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
208 | 208 | ||
209 | private LLUUID myID = LLUUID.Random(); | 209 | private LLUUID myID = LLUUID.Random(); |
210 | 210 | ||
211 | public MyNpcCharacter(EventManager eventManager) | 211 | public MyNpcCharacter(Scene scene) |
212 | { | 212 | { |
213 | |||
213 | // startPos = new LLVector3(128, (float)(Util.RandomClass.NextDouble()*100), 2); | 214 | // startPos = new LLVector3(128, (float)(Util.RandomClass.NextDouble()*100), 2); |
214 | eventManager.OnFrame += Update; | 215 | m_scene = scene; |
216 | m_scene.EventManager.OnFrame += Update; | ||
215 | } | 217 | } |
216 | 218 | ||
217 | private LLVector3 startPos = new LLVector3(128, 128, 2); | 219 | private LLVector3 startPos = new LLVector3(128, 128, 2); |
@@ -280,6 +282,11 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
280 | get { return 1; } | 282 | get { return 1; } |
281 | } | 283 | } |
282 | 284 | ||
285 | public IScene Scene | ||
286 | { | ||
287 | get { return m_scene; } | ||
288 | } | ||
289 | |||
283 | public virtual void OutPacket(Packet newPack, ThrottleOutPacketType packType) | 290 | public virtual void OutPacket(Packet newPack, ThrottleOutPacketType packType) |
284 | { | 291 | { |
285 | } | 292 | } |
@@ -432,7 +439,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
432 | LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, | 439 | LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, |
433 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, | 440 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, |
434 | uint parentID, | 441 | uint parentID, |
435 | byte[] particleSystem, byte clickAction, bool track) | 442 | byte[] particleSystem, byte clickAction) |
436 | { | 443 | { |
437 | } | 444 | } |
438 | public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, | 445 | public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, |
@@ -441,7 +448,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
441 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, | 448 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, |
442 | uint parentID, | 449 | uint parentID, |
443 | byte[] particleSystem, byte clickAction, byte[] textureanimation, | 450 | byte[] particleSystem, byte clickAction, byte[] textureanimation, |
444 | bool attachment, uint AttachmentPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius, bool track) | 451 | bool attachment, uint AttachmentPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) |
445 | { | 452 | { |
446 | } | 453 | } |
447 | public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, | 454 | public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, |
@@ -700,6 +707,10 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
700 | { | 707 | { |
701 | } | 708 | } |
702 | 709 | ||
710 | public void ProcessInPacket(Packet NewPack) | ||
711 | { | ||
712 | } | ||
713 | |||
703 | public void Close(bool ShutdownCircuit) | 714 | public void Close(bool ShutdownCircuit) |
704 | { | 715 | { |
705 | } | 716 | } |
diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs index 46b7efd..441c696 100644 --- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs +++ b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
84 | { | 84 | { |
85 | for (int i = 0; i < 1; i++) | 85 | for (int i = 0; i < 1; i++) |
86 | { | 86 | { |
87 | MyNpcCharacter m_character = new MyNpcCharacter(m_scene.EventManager); | 87 | MyNpcCharacter m_character = new MyNpcCharacter(m_scene); |
88 | m_scene.AddNewClient(m_character, false); | 88 | m_scene.AddNewClient(m_character, false); |
89 | } | 89 | } |
90 | 90 | ||