diff options
It wasn't me who messed up flying when adding a test NPC class. (honestly!)
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index 1c267c6..e6bc715 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | |||
@@ -20,6 +20,7 @@ namespace SimpleApp | |||
20 | private uint movementDirection = 0; | 20 | private uint movementDirection = 0; |
21 | private bool fly = true; | 21 | private bool fly = true; |
22 | private LLQuaternion bodyDirection = LLQuaternion.Identity; | 22 | private LLQuaternion bodyDirection = LLQuaternion.Identity; |
23 | private short count = 0; | ||
23 | 24 | ||
24 | public event ImprovedInstantMessage OnInstantMessage; | 25 | public event ImprovedInstantMessage OnInstantMessage; |
25 | public event ChatFromViewer OnChatFromViewer; | 26 | public event ChatFromViewer OnChatFromViewer; |
@@ -144,13 +145,12 @@ namespace SimpleApp | |||
144 | { | 145 | { |
145 | Timer timer = new Timer(); | 146 | Timer timer = new Timer(); |
146 | timer.Enabled = true; | 147 | timer.Enabled = true; |
147 | timer.Interval = 10000; | 148 | timer.Interval = 500; |
148 | timer.Elapsed += new ElapsedEventHandler(this.Heartbeat); | 149 | timer.Elapsed += new ElapsedEventHandler(this.Heartbeat); |
149 | } | 150 | } |
150 | 151 | ||
151 | public void Heartbeat(object sender, EventArgs e) | 152 | public void Heartbeat(object sender, EventArgs e) |
152 | { | 153 | { |
153 | |||
154 | Encoding enc = Encoding.ASCII; | 154 | Encoding enc = Encoding.ASCII; |
155 | 155 | ||
156 | this.OnAgentUpdate(this, movementDirection, bodyDirection); | 156 | this.OnAgentUpdate(this, movementDirection, bodyDirection); |
@@ -165,10 +165,13 @@ namespace SimpleApp | |||
165 | movementDirection = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY | (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS; | 165 | movementDirection = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY | (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS; |
166 | fly = true; | 166 | fly = true; |
167 | } | 167 | } |
168 | if (count >= 40) | ||
169 | { | ||
170 | this.OnChatFromViewer(enc.GetBytes("Kind of quiet around here isn't it! \0"), 2, new LLVector3(128, 128, 26), this.FirstName + " " + this.LastName, this.AgentId); | ||
171 | count = -1; | ||
172 | } | ||
168 | 173 | ||
169 | this.OnChatFromViewer(enc.GetBytes("Kind of quiet around here isn't it! \0"), 2, new LLVector3(128, 128, 26), this.FirstName + " " + this.LastName, this.AgentId); | 174 | count++; |
170 | |||
171 | |||
172 | } | 175 | } |
173 | } | 176 | } |
174 | } | 177 | } |