aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples
diff options
context:
space:
mode:
authorMW2008-04-01 13:09:29 +0000
committerMW2008-04-01 13:09:29 +0000
commitf43e077150d39b454bd66d43a72736a75614a721 (patch)
tree983031434fff79aa0ecc41478efccb205557d2ce /OpenSim/Region/Examples
parentsadly, had to modify line by Ter because it caused mono cil compiler (diff)
downloadopensim-SC-f43e077150d39b454bd66d43a72736a75614a721.zip
opensim-SC-f43e077150d39b454bd66d43a72736a75614a721.tar.gz
opensim-SC-f43e077150d39b454bd66d43a72736a75614a721.tar.bz2
opensim-SC-f43e077150d39b454bd66d43a72736a75614a721.tar.xz
a few small changes
Diffstat (limited to 'OpenSim/Region/Examples')
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs82
-rw-r--r--OpenSim/Region/Examples/SimpleModule/RegionModule.cs2
2 files changed, 45 insertions, 39 deletions
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 39d05eb..8fcc3cf 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -41,6 +41,7 @@ namespace OpenSim.Region.Examples.SimpleModule
41 private short flyState = 0; 41 private short flyState = 0;
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 45
45#pragma warning disable 67 46#pragma warning disable 67
46 47
@@ -450,49 +451,54 @@ namespace OpenSim.Region.Examples.SimpleModule
450 451
451 private void Update() 452 private void Update()
452 { 453 {
453 if (OnAgentUpdate != null) 454 frame++;
455 if (frame > 20)
454 { 456 {
455 AgentUpdatePacket pack = new AgentUpdatePacket(); 457 frame = 0;
456 pack.AgentData.ControlFlags = movementFlag; 458 if (OnAgentUpdate != null)
457 pack.AgentData.BodyRotation = bodyDirection; 459 {
458 OnAgentUpdate(this, pack); 460 AgentUpdatePacket pack = new AgentUpdatePacket();
459 } 461 pack.AgentData.ControlFlags = movementFlag;
460 if (flyState == 0) 462 pack.AgentData.BodyRotation = bodyDirection;
461 { 463 OnAgentUpdate(this, pack);
462 movementFlag = (uint) AgentManager.ControlFlags.AGENT_CONTROL_FLY | 464 }
463 (uint) AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG; 465 if (flyState == 0)
464 flyState = 1; 466 {
465 } 467 movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY |
466 else if (flyState == 1) 468 (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG;
467 { 469 flyState = 1;
468 movementFlag = (uint) AgentManager.ControlFlags.AGENT_CONTROL_FLY | 470 }
469 (uint) AgentManager.ControlFlags.AGENT_CONTROL_UP_POS; 471 else if (flyState == 1)
470 flyState = 2; 472 {
471 } 473 movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY |
472 else 474 (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS;
473 { 475 flyState = 2;
474 movementFlag = (uint) AgentManager.ControlFlags.AGENT_CONTROL_FLY; 476 }
475 flyState = 0; 477 else
476 } 478 {
479 movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
480 flyState = 0;
481 }
477 482
478 if (count >= 200) 483 if (count >= 10)
479 {
480 if (OnChatFromViewer != null)
481 { 484 {
482 ChatFromViewerArgs args = new ChatFromViewerArgs(); 485 if (OnChatFromViewer != null)
483 args.Message = "Kinda quiet around here, isn't it?"; 486 {
484 args.Channel = 0; 487 ChatFromViewerArgs args = new ChatFromViewerArgs();
485 args.From = FirstName + " " + LastName; 488 args.Message = "Kinda quiet around here, isn't it?";
486 args.Position = new LLVector3(128, 128, 26); 489 args.Channel = 0;
487 args.Sender = this; 490 args.From = FirstName + " " + LastName;
488 args.Type = ChatTypeEnum.Shout; 491 args.Position = new LLVector3(128, 128, 26);
489 492 args.Sender = this;
490 OnChatFromViewer(this, args); 493 args.Type = ChatTypeEnum.Shout;
494
495 OnChatFromViewer(this, args);
496 }
497 count = -1;
491 } 498 }
492 count = -1;
493 }
494 499
495 count++; 500 count++;
501 }
496 } 502 }
497 503
498 public bool AddMoney(int debit) 504 public bool AddMoney(int debit)
diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
index 3b21d43..1e043dd 100644
--- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
+++ b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.Examples.SimpleModule
56 56
57 AddCpuCounter(regionInfo, pos); 57 AddCpuCounter(regionInfo, pos);
58 // AddComplexObjects(regionInfo, pos); 58 // AddComplexObjects(regionInfo, pos);
59 // AddAvatars(); 59 AddAvatars();
60 AddFileSystemObjects(); 60 AddFileSystemObjects();
61 } 61 }
62 62