diff options
author | Melanie Thielker | 2008-07-22 17:58:42 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-07-22 17:58:42 +0000 |
commit | f112cebde2c1bc06108839acac82bc8addd7c506 (patch) | |
tree | 7f1e7fabf2fec74171d5982f09d847b47e20d7ca /OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |
parent | * refactor: move new inventory service call by user server to OGS1 with all t... (diff) | |
download | opensim-SC_OLD-f112cebde2c1bc06108839acac82bc8addd7c506.zip opensim-SC_OLD-f112cebde2c1bc06108839acac82bc8addd7c506.tar.gz opensim-SC_OLD-f112cebde2c1bc06108839acac82bc8addd7c506.tar.bz2 opensim-SC_OLD-f112cebde2c1bc06108839acac82bc8addd7c506.tar.xz |
Refactor the packet scheduling out of ClientView. Add intelligent
resending, timeouts, packet discarding. Add notification event for
packet discarding. Add priority scheduling for packet queues.
Add outgoing duplicate detection facility. Correct packet sequencing.
Make provisions for automatic server side throttle adjustments (comes
in next installment)
Diffstat (limited to 'OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 21 |
1 files changed, 16 insertions, 5 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 | } |