aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Scenes/Avatar.cs
diff options
context:
space:
mode:
authorMW2007-06-15 16:03:02 +0000
committerMW2007-06-15 16:03:02 +0000
commit17b4818b8e9a141b54540b342542bcb2ad21b4db (patch)
tree5abca9ede1e82d4a2e01301cc19eed25ad88702a /OpenSim/OpenSim.Region/Scenes/Avatar.cs
parentPreliminary movement added to sugilite, forwards walking only and no animations. (diff)
downloadopensim-SC_OLD-17b4818b8e9a141b54540b342542bcb2ad21b4db.zip
opensim-SC_OLD-17b4818b8e9a141b54540b342542bcb2ad21b4db.tar.gz
opensim-SC_OLD-17b4818b8e9a141b54540b342542bcb2ad21b4db.tar.bz2
opensim-SC_OLD-17b4818b8e9a141b54540b342542bcb2ad21b4db.tar.xz
Very Preliminary border crossing added to sugilite. (Note: Sugilite doesn't have any backend ogs communication support yet so everything is Sandbox mode only )
Diffstat (limited to 'OpenSim/OpenSim.Region/Scenes/Avatar.cs')
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Avatar.cs39
1 files changed, 18 insertions, 21 deletions
diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.cs
index 17b2437..98d7564 100644
--- a/OpenSim/OpenSim.Region/Scenes/Avatar.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Avatar.cs
@@ -102,10 +102,10 @@ namespace OpenSim.Region.Scenes
102 ControllingClient.OnCompleteMovementToRegion += new GenericCall2(this.CompleteMovement); 102 ControllingClient.OnCompleteMovementToRegion += new GenericCall2(this.CompleteMovement);
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 }
110 110
111 /// <summary> 111 /// <summary>
@@ -129,7 +129,14 @@ namespace OpenSim.Region.Scenes
129 /// <param name="status"></param> 129 /// <param name="status"></param>
130 public void ChildStatusChange(bool status) 130 public void ChildStatusChange(bool status)
131 { 131 {
132 this.childAvatar = status;
132 133
134 if (this.childAvatar == true)
135 {
136 this.Velocity = new LLVector3(0, 0, 0);
137 this.Pos = new LLVector3(128, 128, 70);
138
139 }
133 } 140 }
134 141
135 /// <summary> 142 /// <summary>
@@ -137,22 +144,17 @@ namespace OpenSim.Region.Scenes
137 /// </summary> 144 /// </summary>
138 public override void addForces() 145 public override void addForces()
139 { 146 {
147 newForce = false;
140 lock (this.forcesList) 148 lock (this.forcesList)
141 { 149 {
142 newForce = false;
143 if (this.forcesList.Count > 0) 150 if (this.forcesList.Count > 0)
144 { 151 {
145 for (int i = 0; i < this.forcesList.Count; i++) 152 for (int i = 0; i < this.forcesList.Count; i++)
146 { 153 {
147 NewForce force = this.forcesList[i]; 154 NewForce force = this.forcesList[i];
148 PhysicsVector phyVector = new PhysicsVector(force.X, force.Y, force.Z); 155
149 lock (m_world.SyncRoot)
150 {
151 this._physActor.Velocity = phyVector;
152 }
153 this.updateflag = true; 156 this.updateflag = true;
154 this.velocity = new LLVector3(force.X, force.Y, force.Z); //shouldn't really be doing this 157 this.Velocity = new LLVector3(force.X, force.Y, force.Z); //shouldn't really be doing this
155 // but as we are setting the velocity (rather than using real forces) at the moment it is okay.
156 this.newForce = true; 158 this.newForce = true;
157 } 159 }
158 for (int i = 0; i < this.forcesList.Count; i++) 160 for (int i = 0; i < this.forcesList.Count; i++)
@@ -165,7 +167,9 @@ namespace OpenSim.Region.Scenes
165 167
166 public void SendTerseUpdateToClient(IClientAPI RemoteClient) 168 public void SendTerseUpdateToClient(IClientAPI RemoteClient)
167 { 169 {
168 RemoteClient.SendAvatarTerseUpdate(this.m_regionHandle, 64096, this.localid, new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z), new LLVector3(this._physActor.Velocity.X, this._physActor.Velocity.Y, this._physActor.Velocity.Z)); 170 LLVector3 pos = this.Pos;
171 LLVector3 vel = this.Velocity;
172 RemoteClient.SendAvatarTerseUpdate(this.m_regionHandle, 64096, this.localid, new LLVector3(pos.X, pos.Y, pos.Z), new LLVector3(vel.X, vel.Y, vel.Z));
169 } 173 }
170 174
171 /// <summary> 175 /// <summary>
@@ -185,7 +189,7 @@ namespace OpenSim.Region.Scenes
185 /// </summary> 189 /// </summary>
186 public void CompleteMovement() 190 public void CompleteMovement()
187 { 191 {
188 this.ControllingClient.MoveAgentIntoRegion(m_regionInfo); 192 this.ControllingClient.MoveAgentIntoRegion(m_regionInfo, Pos);
189 } 193 }
190 194
191 /// <summary> 195 /// <summary>
@@ -240,10 +244,6 @@ namespace OpenSim.Region.Scenes
240 } 244 }
241 else 245 else
242 { 246 {
243 if (movementflag == 16)
244 {
245 movementflag = 0;
246 }
247 if ((movementflag) != 0) 247 if ((movementflag) != 0)
248 { 248 {
249 NewForce newVelocity = new NewForce(); 249 NewForce newVelocity = new NewForce();
@@ -252,9 +252,6 @@ namespace OpenSim.Region.Scenes
252 newVelocity.Z = 0; 252 newVelocity.Z = 0;
253 this.forcesList.Add(newVelocity); 253 this.forcesList.Add(newVelocity);
254 movementflag = 0; 254 movementflag = 0;
255
256 this.movementflag = 16;
257
258 } 255 }
259 } 256 }
260 257