aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Scenes/Avatar.cs
diff options
context:
space:
mode:
authorMW2007-06-17 14:10:19 +0000
committerMW2007-06-17 14:10:19 +0000
commitef0e5e913e2c22f8e2cba96d54436443b573c1ed (patch)
tree68ba282891693aa9777491ec95f9d99e9597096b /OpenSim/OpenSim.Region/Scenes/Avatar.cs
parent* Added 'LogFilename' attribute to simconfig.xml - in order to specify log name (diff)
downloadopensim-SC_OLD-ef0e5e913e2c22f8e2cba96d54436443b573c1ed.zip
opensim-SC_OLD-ef0e5e913e2c22f8e2cba96d54436443b573c1ed.tar.gz
opensim-SC_OLD-ef0e5e913e2c22f8e2cba96d54436443b573c1ed.tar.bz2
opensim-SC_OLD-ef0e5e913e2c22f8e2cba96d54436443b573c1ed.tar.xz
Very Preliminary local teleporting added (currently only can teleport within the current region).
Now need to add teleporting between regions and use of the dynamic texture for the terrain.
Diffstat (limited to 'OpenSim/OpenSim.Region/Scenes/Avatar.cs')
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Avatar.cs42
1 files changed, 39 insertions, 3 deletions
diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.cs
index 98d7564..d40e213 100644
--- a/OpenSim/OpenSim.Region/Scenes/Avatar.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Avatar.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Scenes
103 ControllingClient.OnCompleteMovementToRegion += new GenericCall2(this.SendInitialPosition); 103 ControllingClient.OnCompleteMovementToRegion += new GenericCall2(this.SendInitialPosition);
104 ControllingClient.OnAgentUpdate += new UpdateAgent(this.HandleAgentUpdate); 104 ControllingClient.OnAgentUpdate += new UpdateAgent(this.HandleAgentUpdate);
105 // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); 105 // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
106 ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); 106 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
107 //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); 107 //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
108 108
109 } 109 }
@@ -138,7 +138,34 @@ namespace OpenSim.Region.Scenes
138 138
139 } 139 }
140 } 140 }
141 141
142 /// <summary>
143 ///
144 /// </summary>
145 /// <param name="pos"></param>
146 public void UpGradeAvatar(LLVector3 pos)
147 {
148 //this.childAvatar = false;
149 this.Pos = pos;
150 }
151
152 protected void DownGradeAvatar()
153 {
154 this.Velocity = new LLVector3(0, 0, 0);
155 this.Pos = new LLVector3(128, 128, 70);
156 this.childAvatar = true;
157 }
158
159 /// <summary>
160 ///
161 /// </summary>
162 /// <param name="pos"></param>
163 public void Teleport(LLVector3 pos)
164 {
165 this.Pos = pos;
166 this.SendTerseUpdateToALLClients();
167 }
168
142 /// <summary> 169 /// <summary>
143 /// 170 ///
144 /// </summary> 171 /// </summary>
@@ -189,7 +216,16 @@ namespace OpenSim.Region.Scenes
189 /// </summary> 216 /// </summary>
190 public void CompleteMovement() 217 public void CompleteMovement()
191 { 218 {
192 this.ControllingClient.MoveAgentIntoRegion(m_regionInfo, Pos); 219 LLVector3 look = this.Velocity;
220 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
221 {
222 look = new LLVector3(0.99f, 0.042f, 0);
223 }
224 this.ControllingClient.MoveAgentIntoRegion(m_regionInfo, Pos, look);
225 if (this.childAvatar)
226 {
227 this.childAvatar = false;
228 }
193 } 229 }
194 230
195 /// <summary> 231 /// <summary>