aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs')
-rw-r--r--OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs212
1 files changed, 0 insertions, 212 deletions
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs b/OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs
deleted file mode 100644
index b14db31..0000000
--- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Update.cs
+++ /dev/null
@@ -1,212 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.Physics.Manager;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36
37namespace OpenSim.Region.Scenes
38{
39 partial class ScenePresence
40 {
41 /// <summary>
42 ///
43 /// </summary>
44 public override void update()
45 {
46 if (this.childAvatar == false)
47 {
48 if (this.newForce)
49 {
50 this.SendTerseUpdateToALLClients();
51 _updateCount = 0;
52 }
53 else if (movementflag != 0)
54 {
55 _updateCount++;
56 if (_updateCount > 3)
57 {
58 this.SendTerseUpdateToALLClients();
59 _updateCount = 0;
60 }
61 }
62
63 this.CheckForBorderCrossing();
64 }
65 }
66
67 /// <summary>
68 ///
69 /// </summary>
70 /// <param name="remoteAvatar"></param>
71 public void SendUpdateToOtherClient(ScenePresence remoteAvatar)
72 {
73
74 }
75
76 /// <summary>
77 ///
78 /// </summary>
79 public void SendInitialPosition()
80 {
81 this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos);
82 if (this.newAvatar)
83 {
84 this.m_world.InformClientOfNeighbours(this.ControllingClient);
85 this.newAvatar = false;
86 }
87 }
88
89 /// <summary>
90 ///
91 /// </summary>
92 /// <param name="OurClient"></param>
93 public void SendOurAppearance(IClientAPI OurClient)
94 {
95 this.ControllingClient.SendWearables(this.Wearables);
96 }
97
98 /// <summary>
99 ///
100 /// </summary>
101 /// <param name="avatarInfo"></param>
102 public void SendAppearanceToOtherAgent(ScenePresence avatarInfo)
103 {
104
105 }
106
107 /// <summary>
108 ///
109 /// </summary>
110 /// <param name="texture"></param>
111 /// <param name="visualParam"></param>
112 public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam)
113 {
114
115 }
116
117 /// <summary>
118 ///
119 /// </summary>
120 public void StopMovement()
121 {
122
123 }
124
125 /// <summary>
126 ///
127 /// </summary>
128 /// <param name="animID"></param>
129 /// <param name="seq"></param>
130 public void SendAnimPack(LLUUID animID, int seq)
131 {
132
133
134 }
135
136 /// <summary>
137 ///
138 /// </summary>
139 public void SendAnimPack()
140 {
141
142 }
143
144 /// <summary>
145 ///
146 /// </summary>
147 protected void CheckForBorderCrossing()
148 {
149 LLVector3 pos2 = this.Pos;
150 LLVector3 vel = this.Velocity;
151
152 float timeStep = 0.2f;
153 pos2.X = pos2.X + (vel.X * timeStep);
154 pos2.Y = pos2.Y + (vel.Y * timeStep);
155 pos2.Z = pos2.Z + (vel.Z * timeStep);
156
157 if ((pos2.X < 0) || (pos2.X > 256))
158 {
159 this.CrossToNewRegion();
160 }
161
162 if ((pos2.Y < 0) || (pos2.Y > 256))
163 {
164 this.CrossToNewRegion();
165 }
166 }
167
168 /// <summary>
169 ///
170 /// </summary>
171 protected void CrossToNewRegion()
172 {
173 LLVector3 pos = this.Pos;
174 LLVector3 newpos = new LLVector3(pos.X, pos.Y, pos.Z);
175 uint neighbourx = this.m_regionInfo.RegionLocX;
176 uint neighboury = this.m_regionInfo.RegionLocY;
177
178 if (pos.X < 2)
179 {
180 neighbourx -= 1;
181 newpos.X = 254;
182 }
183 if (pos.X > 253)
184 {
185 neighbourx += 1;
186 newpos.X = 1;
187 }
188 if (pos.Y < 2)
189 {
190 neighboury -= 1;
191 newpos.Y = 254;
192 }
193 if (pos.Y > 253)
194 {
195 neighboury += 1;
196 newpos.Y = 1;
197 }
198
199 LLVector3 vel = this.velocity;
200 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury* 256));
201 RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle);
202 if (neighbourRegion != null)
203 {
204 this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos);
205 this.DownGradeAvatar();
206 this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, System.Net.IPAddress.Parse(neighbourRegion.IPListenAddr), (ushort)neighbourRegion.IPListenPort);
207
208 }
209 }
210
211 }
212}